diff --git a/.github/workflows/sdk_test.yaml b/.github/workflows/sdk_test.yaml new file mode 100644 index 00000000..3dbd3117 --- /dev/null +++ b/.github/workflows/sdk_test.yaml @@ -0,0 +1,26 @@ +name: Test +permissions: + checks: write + contents: write + pull-requests: write + statuses: write + id-token: write +"on": + pull_request: + branches: + - main + paths: + - '**' + workflow_dispatch: + inputs: + target: + description: Provided SDK target to run tests for, (all) is valid + type: string +jobs: + test: + uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-test.yaml@v15 + with: + target: ${{ github.event.inputs.target || 'glean' }} + secrets: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index e413ffb4..5297b7bb 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -6,7 +6,7 @@ management: speakeasyVersion: 1.557.1 generationVersion: 2.623.2 releaseVersion: 0.5.4 - configChecksum: e02e6b892e0009293bdd0389c7ae5ebf + configChecksum: 0aa78699ebe017ecdfa82a61bef69fd9 repoURL: https://github.com/gleanwork/api-client-java.git published: true features: @@ -23,8 +23,10 @@ features: globalSecurityFlattening: 0.1.0 globalServerURLs: 2.82.2 groups: 2.81.2 + mockServer: 0.1.0 nameOverrides: 2.81.3 sdkHooks: 1.1.0 + tests: 0.8.4 unions: 0.0.6 generatedFiles: - .gitattributes @@ -1597,6 +1599,684 @@ generatedFiles: - src/main/java/com/glean/api_client/glean_api_client/utils/Types.java - src/main/java/com/glean/api_client/glean_api_client/utils/Utf8UrlEncoder.java - src/main/java/com/glean/api_client/glean_api_client/utils/Utils.java + - src/test/java/com/glean/api_client/glean_api_client/ActivitiesTests.java + - src/test/java/com/glean/api_client/glean_api_client/AgentsTests.java + - src/test/java/com/glean/api_client/glean_api_client/AnnouncementsTests.java + - src/test/java/com/glean/api_client/glean_api_client/AnswersTests.java + - src/test/java/com/glean/api_client/glean_api_client/CalendarTests.java + - src/test/java/com/glean/api_client/glean_api_client/ChatTests.java + - src/test/java/com/glean/api_client/glean_api_client/ClientActivityTests.java + - src/test/java/com/glean/api_client/glean_api_client/ClientAuthenticationTests.java + - src/test/java/com/glean/api_client/glean_api_client/ClientChatTests.java + - src/test/java/com/glean/api_client/glean_api_client/ClientDocumentsTests.java + - src/test/java/com/glean/api_client/glean_api_client/ClientShortcutsTests.java + - src/test/java/com/glean/api_client/glean_api_client/ClientUserTests.java + - src/test/java/com/glean/api_client/glean_api_client/ClientVerificationTests.java + - src/test/java/com/glean/api_client/glean_api_client/CollectionsTests.java + - src/test/java/com/glean/api_client/glean_api_client/DatasourcesTests.java + - src/test/java/com/glean/api_client/glean_api_client/DisplayablelistsTests.java + - src/test/java/com/glean/api_client/glean_api_client/EntitiesTests.java + - src/test/java/com/glean/api_client/glean_api_client/IndexingAuthenticationTests.java + - src/test/java/com/glean/api_client/glean_api_client/IndexingDocumentsTests.java + - src/test/java/com/glean/api_client/glean_api_client/IndexingPermissionsTests.java + - src/test/java/com/glean/api_client/glean_api_client/InsightsTests.java + - src/test/java/com/glean/api_client/glean_api_client/MessagesTests.java + - src/test/java/com/glean/api_client/glean_api_client/PeopleTests.java + - src/test/java/com/glean/api_client/glean_api_client/PinsTests.java + - src/test/java/com/glean/api_client/glean_api_client/PoliciesTests.java + - src/test/java/com/glean/api_client/glean_api_client/ReportsTests.java + - src/test/java/com/glean/api_client/glean_api_client/SearchTests.java + - src/test/java/com/glean/api_client/glean_api_client/SummarizeTests.java + - src/test/java/com/glean/api_client/glean_api_client/ToolsTests.java + - src/test/java/com/glean/api_client/glean_api_client/TroubleshootingTests.java + - src/test/java/com/glean/api_client/glean_api_client/VisibilityoverridesTests.java + - tests/mockserver/.gitignore + - tests/mockserver/Dockerfile + - tests/mockserver/Makefile + - tests/mockserver/README.md + - tests/mockserver/go.mod + - tests/mockserver/go.sum + - tests/mockserver/internal/handler/assert/contenttype.go + - tests/mockserver/internal/handler/assert/header.go + - tests/mockserver/internal/handler/assert/parameter.go + - tests/mockserver/internal/handler/assert/pointer.go + - tests/mockserver/internal/handler/assert/security.go + - tests/mockserver/internal/handler/doc.go + - tests/mockserver/internal/handler/generated_handler.go + - tests/mockserver/internal/handler/generated_handlers.go + - tests/mockserver/internal/handler/pathgetrestapiv1agentsagentid.go + - tests/mockserver/internal/handler/pathgetrestapiv1agentsagentidschemas.go + - tests/mockserver/internal/handler/pathgetrestapiv1governancedatapolicies.go + - tests/mockserver/internal/handler/pathgetrestapiv1governancedatapoliciesid.go + - tests/mockserver/internal/handler/pathgetrestapiv1toolslist.go + - tests/mockserver/internal/handler/pathpostapiindexv1adddatasource.go + - tests/mockserver/internal/handler/pathpostapiindexv1betausers.go + - tests/mockserver/internal/handler/pathpostapiindexv1bulkindexdocuments.go + - tests/mockserver/internal/handler/pathpostapiindexv1bulkindexgroups.go + - tests/mockserver/internal/handler/pathpostapiindexv1bulkindexmemberships.go + - tests/mockserver/internal/handler/pathpostapiindexv1bulkindexusers.go + - tests/mockserver/internal/handler/pathpostapiindexv1checkdocumentaccess.go + - tests/mockserver/internal/handler/pathpostapiindexv1deletedocument.go + - tests/mockserver/internal/handler/pathpostapiindexv1deletegroup.go + - tests/mockserver/internal/handler/pathpostapiindexv1deletemembership.go + - tests/mockserver/internal/handler/pathpostapiindexv1deleteuser.go + - tests/mockserver/internal/handler/pathpostapiindexv1getdatasourceconfig.go + - tests/mockserver/internal/handler/pathpostapiindexv1getdocumentcount.go + - tests/mockserver/internal/handler/pathpostapiindexv1getdocumentstatus.go + - tests/mockserver/internal/handler/pathpostapiindexv1getusercount.go + - tests/mockserver/internal/handler/pathpostapiindexv1indexdocument.go + - tests/mockserver/internal/handler/pathpostapiindexv1indexdocuments.go + - tests/mockserver/internal/handler/pathpostapiindexv1indexgroup.go + - tests/mockserver/internal/handler/pathpostapiindexv1indexmembership.go + - tests/mockserver/internal/handler/pathpostapiindexv1indexuser.go + - tests/mockserver/internal/handler/pathpostapiindexv1processalldocuments.go + - tests/mockserver/internal/handler/pathpostapiindexv1processallemployeesandteams.go + - tests/mockserver/internal/handler/pathpostapiindexv1processallmemberships.go + - tests/mockserver/internal/handler/pathpostapiindexv1rotatetoken.go + - tests/mockserver/internal/handler/pathpostapiindexv1updatepermissions.go + - tests/mockserver/internal/handler/pathpostrestapiv1activity.go + - tests/mockserver/internal/handler/pathpostrestapiv1addcollectionitems.go + - tests/mockserver/internal/handler/pathpostrestapiv1addverificationreminder.go + - tests/mockserver/internal/handler/pathpostrestapiv1adminsearch.go + - tests/mockserver/internal/handler/pathpostrestapiv1autocomplete.go + - tests/mockserver/internal/handler/pathpostrestapiv1chat.go + - tests/mockserver/internal/handler/pathpostrestapiv1createannouncement.go + - tests/mockserver/internal/handler/pathpostrestapiv1createanswer.go + - tests/mockserver/internal/handler/pathpostrestapiv1createauthtoken.go + - tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go + - tests/mockserver/internal/handler/pathpostrestapiv1createshortcut.go + - tests/mockserver/internal/handler/pathpostrestapiv1deleteallchats.go + - tests/mockserver/internal/handler/pathpostrestapiv1deleteannouncement.go + - tests/mockserver/internal/handler/pathpostrestapiv1deleteanswer.go + - tests/mockserver/internal/handler/pathpostrestapiv1deletechatfiles.go + - tests/mockserver/internal/handler/pathpostrestapiv1deletechats.go + - tests/mockserver/internal/handler/pathpostrestapiv1deletecollection.go + - tests/mockserver/internal/handler/pathpostrestapiv1deletecollectionitem.go + - tests/mockserver/internal/handler/pathpostrestapiv1deleteshortcut.go + - tests/mockserver/internal/handler/pathpostrestapiv1editanswer.go + - tests/mockserver/internal/handler/pathpostrestapiv1editcollection.go + - tests/mockserver/internal/handler/pathpostrestapiv1editcollectionitem.go + - tests/mockserver/internal/handler/pathpostrestapiv1editpin.go + - tests/mockserver/internal/handler/pathpostrestapiv1feed.go + - tests/mockserver/internal/handler/pathpostrestapiv1feedback.go + - tests/mockserver/internal/handler/pathpostrestapiv1getanswer.go + - tests/mockserver/internal/handler/pathpostrestapiv1getchat.go + - tests/mockserver/internal/handler/pathpostrestapiv1getchatapplication.go + - tests/mockserver/internal/handler/pathpostrestapiv1getchatfiles.go + - tests/mockserver/internal/handler/pathpostrestapiv1getcollection.go + - tests/mockserver/internal/handler/pathpostrestapiv1getdocpermissions.go + - tests/mockserver/internal/handler/pathpostrestapiv1getdocuments.go + - tests/mockserver/internal/handler/pathpostrestapiv1getdocumentsbyfacets.go + - tests/mockserver/internal/handler/pathpostrestapiv1getpin.go + - tests/mockserver/internal/handler/pathpostrestapiv1getshortcut.go + - tests/mockserver/internal/handler/pathpostrestapiv1insights.go + - tests/mockserver/internal/handler/pathpostrestapiv1listanswers.go + - tests/mockserver/internal/handler/pathpostrestapiv1listchats.go + - tests/mockserver/internal/handler/pathpostrestapiv1listcollections.go + - tests/mockserver/internal/handler/pathpostrestapiv1listentities.go + - tests/mockserver/internal/handler/pathpostrestapiv1listpins.go + - tests/mockserver/internal/handler/pathpostrestapiv1listshortcuts.go + - tests/mockserver/internal/handler/pathpostrestapiv1listverifications.go + - tests/mockserver/internal/handler/pathpostrestapiv1messages.go + - tests/mockserver/internal/handler/pathpostrestapiv1people.go + - tests/mockserver/internal/handler/pathpostrestapiv1pin.go + - tests/mockserver/internal/handler/pathpostrestapiv1recommendations.go + - tests/mockserver/internal/handler/pathpostrestapiv1search.go + - tests/mockserver/internal/handler/pathpostrestapiv1summarize.go + - tests/mockserver/internal/handler/pathpostrestapiv1toolscall.go + - tests/mockserver/internal/handler/pathpostrestapiv1unpin.go + - tests/mockserver/internal/handler/pathpostrestapiv1updateannouncement.go + - tests/mockserver/internal/handler/pathpostrestapiv1updateshortcut.go + - tests/mockserver/internal/handler/pathpostrestapiv1uploadchatfiles.go + - tests/mockserver/internal/handler/pathpostrestapiv1verify.go + - tests/mockserver/internal/handler/values/files.go + - tests/mockserver/internal/logging/doc.go + - tests/mockserver/internal/logging/formats.go + - tests/mockserver/internal/logging/http_file.go + - tests/mockserver/internal/logging/http_logger.go + - tests/mockserver/internal/logging/levels.go + - tests/mockserver/internal/logging/logger.go + - tests/mockserver/internal/logging/oas_operation.go + - tests/mockserver/internal/logging/oas_operation_call.go + - tests/mockserver/internal/sdk/models/components/activity.go + - tests/mockserver/internal/sdk/models/components/activityevent.go + - tests/mockserver/internal/sdk/models/components/activityeventparams.go + - tests/mockserver/internal/sdk/models/components/addcollectionitemserror.go + - tests/mockserver/internal/sdk/models/components/addcollectionitemsrequest.go + - tests/mockserver/internal/sdk/models/components/addcollectionitemsresponse.go + - tests/mockserver/internal/sdk/models/components/additionalfielddefinition.go + - tests/mockserver/internal/sdk/models/components/agent.go + - tests/mockserver/internal/sdk/models/components/agentconfig.go + - tests/mockserver/internal/sdk/models/components/agentexecutionstatus.go + - tests/mockserver/internal/sdk/models/components/agentrun.go + - tests/mockserver/internal/sdk/models/components/agentruncreate.go + - tests/mockserver/internal/sdk/models/components/agentrunwaitresponse.go + - tests/mockserver/internal/sdk/models/components/agentschemas.go + - tests/mockserver/internal/sdk/models/components/aiappactioncounts.go + - tests/mockserver/internal/sdk/models/components/aiappsinsightsresponse.go + - tests/mockserver/internal/sdk/models/components/aiinsightsresponse.go + - tests/mockserver/internal/sdk/models/components/allowlistoptions.go + - tests/mockserver/internal/sdk/models/components/announcement.go + - tests/mockserver/internal/sdk/models/components/anonymousevent.go + - tests/mockserver/internal/sdk/models/components/answer.go + - tests/mockserver/internal/sdk/models/components/answerboard.go + - tests/mockserver/internal/sdk/models/components/answercreationdata.go + - tests/mockserver/internal/sdk/models/components/answerlike.go + - tests/mockserver/internal/sdk/models/components/answerlikes.go + - tests/mockserver/internal/sdk/models/components/answerresult.go + - tests/mockserver/internal/sdk/models/components/appresult.go + - tests/mockserver/internal/sdk/models/components/authconfig.go + - tests/mockserver/internal/sdk/models/components/authtoken.go + - tests/mockserver/internal/sdk/models/components/autocompleterequest.go + - tests/mockserver/internal/sdk/models/components/autocompleteresponse.go + - tests/mockserver/internal/sdk/models/components/autocompleteresult.go + - tests/mockserver/internal/sdk/models/components/autocompleteresultgroup.go + - tests/mockserver/internal/sdk/models/components/badge.go + - tests/mockserver/internal/sdk/models/components/bulkindexdocumentsrequest.go + - tests/mockserver/internal/sdk/models/components/bulkindexemployeesrequest.go + - tests/mockserver/internal/sdk/models/components/bulkindexgroupsrequest.go + - tests/mockserver/internal/sdk/models/components/bulkindexmembershipsrequest.go + - tests/mockserver/internal/sdk/models/components/bulkindexshortcutsrequest.go + - tests/mockserver/internal/sdk/models/components/bulkindexteamsrequest.go + - tests/mockserver/internal/sdk/models/components/bulkindexusersrequest.go + - tests/mockserver/internal/sdk/models/components/bulkuploadhistoryevent.go + - tests/mockserver/internal/sdk/models/components/calendarattendee.go + - tests/mockserver/internal/sdk/models/components/calendarattendees.go + - tests/mockserver/internal/sdk/models/components/calendarevent.go + - tests/mockserver/internal/sdk/models/components/canonicalizingregextype.go + - tests/mockserver/internal/sdk/models/components/channelinviteinfo.go + - tests/mockserver/internal/sdk/models/components/chat.go + - tests/mockserver/internal/sdk/models/components/chatfile.go + - tests/mockserver/internal/sdk/models/components/chatfilefailurereason.go + - tests/mockserver/internal/sdk/models/components/chatfilemetadata.go + - tests/mockserver/internal/sdk/models/components/chatfilestatus.go + - tests/mockserver/internal/sdk/models/components/chatmessage.go + - tests/mockserver/internal/sdk/models/components/chatmessagecitation.go + - tests/mockserver/internal/sdk/models/components/chatmessagefragment.go + - tests/mockserver/internal/sdk/models/components/chatmetadata.go + - tests/mockserver/internal/sdk/models/components/chatmetadataresult.go + - tests/mockserver/internal/sdk/models/components/chatrequest.go + - tests/mockserver/internal/sdk/models/components/chatresponse.go + - tests/mockserver/internal/sdk/models/components/chatrestrictionfilters.go + - tests/mockserver/internal/sdk/models/components/chatresult.go + - tests/mockserver/internal/sdk/models/components/chatzerostatesuggestionoptions.go + - tests/mockserver/internal/sdk/models/components/checkdocumentaccessrequest.go + - tests/mockserver/internal/sdk/models/components/checkdocumentaccessresponse.go + - tests/mockserver/internal/sdk/models/components/clustergroup.go + - tests/mockserver/internal/sdk/models/components/clustertypeenum.go + - tests/mockserver/internal/sdk/models/components/code.go + - tests/mockserver/internal/sdk/models/components/codeline.go + - tests/mockserver/internal/sdk/models/components/collection.go + - tests/mockserver/internal/sdk/models/components/collectionerror.go + - tests/mockserver/internal/sdk/models/components/collectionitem.go + - tests/mockserver/internal/sdk/models/components/collectionitemdescriptor.go + - tests/mockserver/internal/sdk/models/components/collectionpinmetadata.go + - tests/mockserver/internal/sdk/models/components/collectionpinnablecategories.go + - tests/mockserver/internal/sdk/models/components/collectionpinnabletargets.go + - tests/mockserver/internal/sdk/models/components/collectionpinnedmetadata.go + - tests/mockserver/internal/sdk/models/components/collectionpintarget.go + - tests/mockserver/internal/sdk/models/components/commentdefinition.go + - tests/mockserver/internal/sdk/models/components/communicationchannel.go + - tests/mockserver/internal/sdk/models/components/company.go + - tests/mockserver/internal/sdk/models/components/conferencedata.go + - tests/mockserver/internal/sdk/models/components/connectortype.go + - tests/mockserver/internal/sdk/models/components/contentdefinition.go + - tests/mockserver/internal/sdk/models/components/contentinsightsresponse.go + - tests/mockserver/internal/sdk/models/components/contenttype.go + - tests/mockserver/internal/sdk/models/components/countinfo.go + - tests/mockserver/internal/sdk/models/components/createannouncementrequest.go + - tests/mockserver/internal/sdk/models/components/createanswerrequest.go + - tests/mockserver/internal/sdk/models/components/createauthtokenresponse.go + - tests/mockserver/internal/sdk/models/components/createcollectionrequest.go + - tests/mockserver/internal/sdk/models/components/createcollectionresponse.go + - tests/mockserver/internal/sdk/models/components/createdlpreportrequest.go + - tests/mockserver/internal/sdk/models/components/createdlpreportresponse.go + - tests/mockserver/internal/sdk/models/components/createshortcutrequest.go + - tests/mockserver/internal/sdk/models/components/createshortcutresponse.go + - tests/mockserver/internal/sdk/models/components/customdatasourceconfig.go + - tests/mockserver/internal/sdk/models/components/customdatavalue.go + - tests/mockserver/internal/sdk/models/components/customentity.go + - tests/mockserver/internal/sdk/models/components/customentitymetadata.go + - tests/mockserver/internal/sdk/models/components/customer.go + - tests/mockserver/internal/sdk/models/components/customermetadata.go + - tests/mockserver/internal/sdk/models/components/customfielddata.go + - tests/mockserver/internal/sdk/models/components/customfieldvalue.go + - tests/mockserver/internal/sdk/models/components/customfieldvaluehyperlink.go + - tests/mockserver/internal/sdk/models/components/customfieldvalueperson.go + - tests/mockserver/internal/sdk/models/components/customfieldvaluestr.go + - tests/mockserver/internal/sdk/models/components/customproperty.go + - tests/mockserver/internal/sdk/models/components/datasourcebulkmembershipdefinition.go + - tests/mockserver/internal/sdk/models/components/datasourcegroupdefinition.go + - tests/mockserver/internal/sdk/models/components/datasourcemembershipdefinition.go + - tests/mockserver/internal/sdk/models/components/datasourceobjecttypedocumentcountentry.go + - tests/mockserver/internal/sdk/models/components/datasourceprofile.go + - tests/mockserver/internal/sdk/models/components/datasourceuserdefinition.go + - tests/mockserver/internal/sdk/models/components/debugdatasourcestatusidentityresponsecomponent.go + - tests/mockserver/internal/sdk/models/components/debugdatasourcestatusresponse.go + - tests/mockserver/internal/sdk/models/components/debugdocumentrequest.go + - tests/mockserver/internal/sdk/models/components/debugdocumentresponse.go + - tests/mockserver/internal/sdk/models/components/debugdocumentsrequest.go + - tests/mockserver/internal/sdk/models/components/debugdocumentsresponse.go + - tests/mockserver/internal/sdk/models/components/debugdocumentsresponseitem.go + - tests/mockserver/internal/sdk/models/components/debuguserrequest.go + - tests/mockserver/internal/sdk/models/components/debuguserresponse.go + - tests/mockserver/internal/sdk/models/components/deleteannouncementrequest.go + - tests/mockserver/internal/sdk/models/components/deleteanswerrequest.go + - tests/mockserver/internal/sdk/models/components/deletechatfilesrequest.go + - tests/mockserver/internal/sdk/models/components/deletechatsrequest.go + - tests/mockserver/internal/sdk/models/components/deletecollectionitemrequest.go + - tests/mockserver/internal/sdk/models/components/deletecollectionitemresponse.go + - tests/mockserver/internal/sdk/models/components/deletecollectionrequest.go + - tests/mockserver/internal/sdk/models/components/deletedocumentrequest.go + - tests/mockserver/internal/sdk/models/components/deleteemployeerequest.go + - tests/mockserver/internal/sdk/models/components/deletegrouprequest.go + - tests/mockserver/internal/sdk/models/components/deletemembershiprequest.go + - tests/mockserver/internal/sdk/models/components/deleteshortcutrequest.go + - tests/mockserver/internal/sdk/models/components/deleteteamrequest.go + - tests/mockserver/internal/sdk/models/components/deleteuserrequest.go + - tests/mockserver/internal/sdk/models/components/disambiguation.go + - tests/mockserver/internal/sdk/models/components/displayablelistitemuiconfig.go + - tests/mockserver/internal/sdk/models/components/dlpconfig.go + - tests/mockserver/internal/sdk/models/components/dlpfrequency.go + - tests/mockserver/internal/sdk/models/components/dlpperson.go + - tests/mockserver/internal/sdk/models/components/dlppersonmetadata.go + - tests/mockserver/internal/sdk/models/components/dlpreport.go + - tests/mockserver/internal/sdk/models/components/dlpreportstatus.go + - tests/mockserver/internal/sdk/models/components/dlpsimpleresult.go + - tests/mockserver/internal/sdk/models/components/document.go + - tests/mockserver/internal/sdk/models/components/documentcontent.go + - tests/mockserver/internal/sdk/models/components/documentdefinition.go + - tests/mockserver/internal/sdk/models/components/documentinsight.go + - tests/mockserver/internal/sdk/models/components/documentinteractions.go + - tests/mockserver/internal/sdk/models/components/documentinteractionsdefinition.go + - tests/mockserver/internal/sdk/models/components/documentmetadata.go + - tests/mockserver/internal/sdk/models/components/documentorerrorunion.go + - tests/mockserver/internal/sdk/models/components/documentpermissionsdefinition.go + - tests/mockserver/internal/sdk/models/components/documentsection.go + - tests/mockserver/internal/sdk/models/components/documentspecunion.go + - tests/mockserver/internal/sdk/models/components/documentstatusresponse.go + - tests/mockserver/internal/sdk/models/components/documentvisibility.go + - tests/mockserver/internal/sdk/models/components/documentvisibilityoverride.go + - tests/mockserver/internal/sdk/models/components/documentvisibilityupdateresult.go + - tests/mockserver/internal/sdk/models/components/editanswerrequest.go + - tests/mockserver/internal/sdk/models/components/editcollectionitemrequest.go + - tests/mockserver/internal/sdk/models/components/editcollectionitemresponse.go + - tests/mockserver/internal/sdk/models/components/editcollectionrequest.go + - tests/mockserver/internal/sdk/models/components/editcollectionresponse.go + - tests/mockserver/internal/sdk/models/components/editpinrequest.go + - tests/mockserver/internal/sdk/models/components/employeeinfodefinition.go + - tests/mockserver/internal/sdk/models/components/employeeteaminfo.go + - tests/mockserver/internal/sdk/models/components/entitiessortorder.go + - tests/mockserver/internal/sdk/models/components/entityrelationship.go + - tests/mockserver/internal/sdk/models/components/entitytype.go + - tests/mockserver/internal/sdk/models/components/errormessage.go + - tests/mockserver/internal/sdk/models/components/eventclassification.go + - tests/mockserver/internal/sdk/models/components/eventclassificationname.go + - tests/mockserver/internal/sdk/models/components/eventstrategyname.go + - tests/mockserver/internal/sdk/models/components/externalsharingoptions.go + - tests/mockserver/internal/sdk/models/components/externalshortcut.go + - tests/mockserver/internal/sdk/models/components/extractedqna.go + - tests/mockserver/internal/sdk/models/components/facetbucket.go + - tests/mockserver/internal/sdk/models/components/facetbucketfilter.go + - tests/mockserver/internal/sdk/models/components/facetfilter.go + - tests/mockserver/internal/sdk/models/components/facetfilterset.go + - tests/mockserver/internal/sdk/models/components/facetfiltervalue.go + - tests/mockserver/internal/sdk/models/components/facetresult.go + - tests/mockserver/internal/sdk/models/components/facetvalue.go + - tests/mockserver/internal/sdk/models/components/favoriteinfo.go + - tests/mockserver/internal/sdk/models/components/feedback.go + - tests/mockserver/internal/sdk/models/components/feedbackchatexchange.go + - tests/mockserver/internal/sdk/models/components/feedentry.go + - tests/mockserver/internal/sdk/models/components/feedrequest.go + - tests/mockserver/internal/sdk/models/components/feedrequestoptions.go + - tests/mockserver/internal/sdk/models/components/feedresponse.go + - tests/mockserver/internal/sdk/models/components/feedresult.go + - tests/mockserver/internal/sdk/models/components/followupaction.go + - tests/mockserver/internal/sdk/models/components/generatedattachment.go + - tests/mockserver/internal/sdk/models/components/generatedattachmentcontent.go + - tests/mockserver/internal/sdk/models/components/generatedqna.go + - tests/mockserver/internal/sdk/models/components/getanswererror.go + - tests/mockserver/internal/sdk/models/components/getanswerrequest.go + - tests/mockserver/internal/sdk/models/components/getanswerresponse.go + - tests/mockserver/internal/sdk/models/components/getchatapplicationrequest.go + - tests/mockserver/internal/sdk/models/components/getchatapplicationresponse.go + - tests/mockserver/internal/sdk/models/components/getchatfilesrequest.go + - tests/mockserver/internal/sdk/models/components/getchatfilesresponse.go + - tests/mockserver/internal/sdk/models/components/getchatrequest.go + - tests/mockserver/internal/sdk/models/components/getchatresponse.go + - tests/mockserver/internal/sdk/models/components/getcollectionrequest.go + - tests/mockserver/internal/sdk/models/components/getcollectionresponse.go + - tests/mockserver/internal/sdk/models/components/getdatasourceconfigrequest.go + - tests/mockserver/internal/sdk/models/components/getdlpreportresponse.go + - tests/mockserver/internal/sdk/models/components/getdocpermissionsrequest.go + - tests/mockserver/internal/sdk/models/components/getdocpermissionsresponse.go + - tests/mockserver/internal/sdk/models/components/getdocumentcountrequest.go + - tests/mockserver/internal/sdk/models/components/getdocumentcountresponse.go + - tests/mockserver/internal/sdk/models/components/getdocumentsbyfacetsrequest.go + - tests/mockserver/internal/sdk/models/components/getdocumentsbyfacetsresponse.go + - tests/mockserver/internal/sdk/models/components/getdocumentsrequest.go + - tests/mockserver/internal/sdk/models/components/getdocumentsresponse.go + - tests/mockserver/internal/sdk/models/components/getdocumentstatusrequest.go + - tests/mockserver/internal/sdk/models/components/getdocumentstatusresponse.go + - tests/mockserver/internal/sdk/models/components/getdocumentvisibilityoverridesresponse.go + - tests/mockserver/internal/sdk/models/components/getpinrequest.go + - tests/mockserver/internal/sdk/models/components/getpinresponse.go + - tests/mockserver/internal/sdk/models/components/getshortcutrequestunion.go + - tests/mockserver/internal/sdk/models/components/getshortcutresponse.go + - tests/mockserver/internal/sdk/models/components/getusercountrequest.go + - tests/mockserver/internal/sdk/models/components/getusercountresponse.go + - tests/mockserver/internal/sdk/models/components/gleanassistinsightsresponse.go + - tests/mockserver/internal/sdk/models/components/gleandataerror.go + - tests/mockserver/internal/sdk/models/components/grantpermission.go + - tests/mockserver/internal/sdk/models/components/greenlistusersrequest.go + - tests/mockserver/internal/sdk/models/components/group.go + - tests/mockserver/internal/sdk/models/components/grouptype.go + - tests/mockserver/internal/sdk/models/components/hotword.go + - tests/mockserver/internal/sdk/models/components/hotwordproximity.go + - tests/mockserver/internal/sdk/models/components/httpmetadata.go + - tests/mockserver/internal/sdk/models/components/iconconfig.go + - tests/mockserver/internal/sdk/models/components/indexdocumentrequest.go + - tests/mockserver/internal/sdk/models/components/indexdocumentsrequest.go + - tests/mockserver/internal/sdk/models/components/indexemployeerequest.go + - tests/mockserver/internal/sdk/models/components/indexgrouprequest.go + - tests/mockserver/internal/sdk/models/components/indexingshortcut.go + - tests/mockserver/internal/sdk/models/components/indexmembershiprequest.go + - tests/mockserver/internal/sdk/models/components/indexstatus.go + - tests/mockserver/internal/sdk/models/components/indexteamrequest.go + - tests/mockserver/internal/sdk/models/components/indexuserrequest.go + - tests/mockserver/internal/sdk/models/components/inputoptions.go + - tests/mockserver/internal/sdk/models/components/insightsagentsrequestoptions.go + - tests/mockserver/internal/sdk/models/components/insightsaiapprequestoptions.go + - tests/mockserver/internal/sdk/models/components/insightsrequest.go + - tests/mockserver/internal/sdk/models/components/insightsresponse.go + - tests/mockserver/internal/sdk/models/components/invalidoperatorvalueerror.go + - tests/mockserver/internal/sdk/models/components/inviteinfo.go + - tests/mockserver/internal/sdk/models/components/labeledcountinfo.go + - tests/mockserver/internal/sdk/models/components/listanswersrequest.go + - tests/mockserver/internal/sdk/models/components/listanswersresponse.go + - tests/mockserver/internal/sdk/models/components/listchatsresponse.go + - tests/mockserver/internal/sdk/models/components/listcollectionsrequest.go + - tests/mockserver/internal/sdk/models/components/listcollectionsresponse.go + - tests/mockserver/internal/sdk/models/components/listdlpreportsresponse.go + - tests/mockserver/internal/sdk/models/components/listentitiesrequest.go + - tests/mockserver/internal/sdk/models/components/listentitiesresponse.go + - tests/mockserver/internal/sdk/models/components/listpinsresponse.go + - tests/mockserver/internal/sdk/models/components/listshortcutspaginatedrequest.go + - tests/mockserver/internal/sdk/models/components/listshortcutspaginatedresponse.go + - tests/mockserver/internal/sdk/models/components/manualfeedbackinfo.go + - tests/mockserver/internal/sdk/models/components/meeting.go + - tests/mockserver/internal/sdk/models/components/message.go + - tests/mockserver/internal/sdk/models/components/messagesrequest.go + - tests/mockserver/internal/sdk/models/components/messagesresponse.go + - tests/mockserver/internal/sdk/models/components/objectdefinition.go + - tests/mockserver/internal/sdk/models/components/objectpermissions.go + - tests/mockserver/internal/sdk/models/components/operatormetadata.go + - tests/mockserver/internal/sdk/models/components/operatorscope.go + - tests/mockserver/internal/sdk/models/components/peoplerequest.go + - tests/mockserver/internal/sdk/models/components/peopleresponse.go + - tests/mockserver/internal/sdk/models/components/period.go + - tests/mockserver/internal/sdk/models/components/permissions.go + - tests/mockserver/internal/sdk/models/components/permissionsgroupintersectiondefinition.go + - tests/mockserver/internal/sdk/models/components/person.go + - tests/mockserver/internal/sdk/models/components/persondistance.go + - tests/mockserver/internal/sdk/models/components/personmetadata.go + - tests/mockserver/internal/sdk/models/components/personobject.go + - tests/mockserver/internal/sdk/models/components/personteam.go + - tests/mockserver/internal/sdk/models/components/persontoteamrelationship.go + - tests/mockserver/internal/sdk/models/components/pindocument.go + - tests/mockserver/internal/sdk/models/components/pinrequest.go + - tests/mockserver/internal/sdk/models/components/possiblevalue.go + - tests/mockserver/internal/sdk/models/components/processalldocumentsrequest.go + - tests/mockserver/internal/sdk/models/components/processallmembershipsrequest.go + - tests/mockserver/internal/sdk/models/components/processinghistoryevent.go + - tests/mockserver/internal/sdk/models/components/prompttemplate.go + - tests/mockserver/internal/sdk/models/components/prompttemplateresult.go + - tests/mockserver/internal/sdk/models/components/propertydefinition.go + - tests/mockserver/internal/sdk/models/components/propertygroup.go + - tests/mockserver/internal/sdk/models/components/queryinsight.go + - tests/mockserver/internal/sdk/models/components/queryinsightsresponse.go + - tests/mockserver/internal/sdk/models/components/querysuggestion.go + - tests/mockserver/internal/sdk/models/components/querysuggestionlist.go + - tests/mockserver/internal/sdk/models/components/quicklink.go + - tests/mockserver/internal/sdk/models/components/reaction.go + - tests/mockserver/internal/sdk/models/components/readpermission.go + - tests/mockserver/internal/sdk/models/components/recommendationsrequest.go + - tests/mockserver/internal/sdk/models/components/recommendationsrequestoptions.go + - tests/mockserver/internal/sdk/models/components/referencerange.go + - tests/mockserver/internal/sdk/models/components/relateddocuments.go + - tests/mockserver/internal/sdk/models/components/relatedobject.go + - tests/mockserver/internal/sdk/models/components/relatedobjectedge.go + - tests/mockserver/internal/sdk/models/components/relatedquestion.go + - tests/mockserver/internal/sdk/models/components/reminder.go + - tests/mockserver/internal/sdk/models/components/reminderrequest.go + - tests/mockserver/internal/sdk/models/components/reportstatusresponse.go + - tests/mockserver/internal/sdk/models/components/restrictionfilters.go + - tests/mockserver/internal/sdk/models/components/resultsdescription.go + - tests/mockserver/internal/sdk/models/components/resultsresponse.go + - tests/mockserver/internal/sdk/models/components/resulttab.go + - tests/mockserver/internal/sdk/models/components/rotatetokenresponse.go + - tests/mockserver/internal/sdk/models/components/scopetype.go + - tests/mockserver/internal/sdk/models/components/searchagentsrequest.go + - tests/mockserver/internal/sdk/models/components/searchagentsresponse.go + - tests/mockserver/internal/sdk/models/components/searchproviderinfo.go + - tests/mockserver/internal/sdk/models/components/searchrequest.go + - tests/mockserver/internal/sdk/models/components/searchrequestinputdetails.go + - tests/mockserver/internal/sdk/models/components/searchrequestoptions.go + - tests/mockserver/internal/sdk/models/components/searchresponse.go + - tests/mockserver/internal/sdk/models/components/searchresponsemetadata.go + - tests/mockserver/internal/sdk/models/components/searchresult.go + - tests/mockserver/internal/sdk/models/components/searchresultprominenceenum.go + - tests/mockserver/internal/sdk/models/components/searchresultsnippet.go + - tests/mockserver/internal/sdk/models/components/searchwarning.go + - tests/mockserver/internal/sdk/models/components/security.go + - tests/mockserver/internal/sdk/models/components/seenfeedbackinfo.go + - tests/mockserver/internal/sdk/models/components/sensitivecontentoptions.go + - tests/mockserver/internal/sdk/models/components/sensitiveexpression.go + - tests/mockserver/internal/sdk/models/components/sensitiveinfotype.go + - tests/mockserver/internal/sdk/models/components/sessioninfo.go + - tests/mockserver/internal/sdk/models/components/share.go + - tests/mockserver/internal/sdk/models/components/sharingoptions.go + - tests/mockserver/internal/sdk/models/components/shortcut.go + - tests/mockserver/internal/sdk/models/components/shortcuterror.go + - tests/mockserver/internal/sdk/models/components/shortcutinsight.go + - tests/mockserver/internal/sdk/models/components/shortcutinsightsresponse.go + - tests/mockserver/internal/sdk/models/components/shortcutmutableproperties.go + - tests/mockserver/internal/sdk/models/components/shortcutspaginationmetadata.go + - tests/mockserver/internal/sdk/models/components/socialnetwork.go + - tests/mockserver/internal/sdk/models/components/socialnetworkdefinition.go + - tests/mockserver/internal/sdk/models/components/sortoptions.go + - tests/mockserver/internal/sdk/models/components/structuredlink.go + - tests/mockserver/internal/sdk/models/components/structuredlocation.go + - tests/mockserver/internal/sdk/models/components/structuredresult.go + - tests/mockserver/internal/sdk/models/components/structuredtext.go + - tests/mockserver/internal/sdk/models/components/structuredtextitem.go + - tests/mockserver/internal/sdk/models/components/structuredtextmutableproperties.go + - tests/mockserver/internal/sdk/models/components/summarizerequest.go + - tests/mockserver/internal/sdk/models/components/summarizeresponse.go + - tests/mockserver/internal/sdk/models/components/summary.go + - tests/mockserver/internal/sdk/models/components/team.go + - tests/mockserver/internal/sdk/models/components/teamemail.go + - tests/mockserver/internal/sdk/models/components/teaminfodefinition.go + - tests/mockserver/internal/sdk/models/components/teammember.go + - tests/mockserver/internal/sdk/models/components/textrange.go + - tests/mockserver/internal/sdk/models/components/thumbnail.go + - tests/mockserver/internal/sdk/models/components/timeinterval.go + - tests/mockserver/internal/sdk/models/components/timepoint.go + - tests/mockserver/internal/sdk/models/components/timerange.go + - tests/mockserver/internal/sdk/models/components/tool.go + - tests/mockserver/internal/sdk/models/components/toolinfo.go + - tests/mockserver/internal/sdk/models/components/toolmetadata.go + - tests/mockserver/internal/sdk/models/components/toolparameter.go + - tests/mockserver/internal/sdk/models/components/toolscallparameter.go + - tests/mockserver/internal/sdk/models/components/toolscallrequest.go + - tests/mockserver/internal/sdk/models/components/toolscallresponse.go + - tests/mockserver/internal/sdk/models/components/toolslistresponse.go + - tests/mockserver/internal/sdk/models/components/ugctype.go + - tests/mockserver/internal/sdk/models/components/unpin.go + - tests/mockserver/internal/sdk/models/components/updateannouncementrequest.go + - tests/mockserver/internal/sdk/models/components/updatedlpconfigrequest.go + - tests/mockserver/internal/sdk/models/components/updatedlpconfigresponse.go + - tests/mockserver/internal/sdk/models/components/updatedlpreportrequest.go + - tests/mockserver/internal/sdk/models/components/updatedlpreportresponse.go + - tests/mockserver/internal/sdk/models/components/updatedocumentvisibilityoverridesrequest.go + - tests/mockserver/internal/sdk/models/components/updatedocumentvisibilityoverridesresponse.go + - tests/mockserver/internal/sdk/models/components/updatepermissionsrequest.go + - tests/mockserver/internal/sdk/models/components/updateshortcutrequest.go + - tests/mockserver/internal/sdk/models/components/updateshortcutresponse.go + - tests/mockserver/internal/sdk/models/components/uploadchatfilesrequest.go + - tests/mockserver/internal/sdk/models/components/uploadchatfilesresponse.go + - tests/mockserver/internal/sdk/models/components/uploadshortcutsrequest.go + - tests/mockserver/internal/sdk/models/components/uploadstatusenum.go + - tests/mockserver/internal/sdk/models/components/user.go + - tests/mockserver/internal/sdk/models/components/useractivity.go + - tests/mockserver/internal/sdk/models/components/useractivityinsight.go + - tests/mockserver/internal/sdk/models/components/usergeneratedcontentid.go + - tests/mockserver/internal/sdk/models/components/userinsightsresponse.go + - tests/mockserver/internal/sdk/models/components/userreferencedefinition.go + - tests/mockserver/internal/sdk/models/components/userrole.go + - tests/mockserver/internal/sdk/models/components/userrolespecification.go + - tests/mockserver/internal/sdk/models/components/userstatusresponse.go + - tests/mockserver/internal/sdk/models/components/userviewinfo.go + - tests/mockserver/internal/sdk/models/components/verification.go + - tests/mockserver/internal/sdk/models/components/verificationfeed.go + - tests/mockserver/internal/sdk/models/components/verificationmetadata.go + - tests/mockserver/internal/sdk/models/components/verifyrequest.go + - tests/mockserver/internal/sdk/models/components/viewerinfo.go + - tests/mockserver/internal/sdk/models/components/workflow.go + - tests/mockserver/internal/sdk/models/components/workflowfeedbackinfo.go + - tests/mockserver/internal/sdk/models/components/workflowresult.go + - tests/mockserver/internal/sdk/models/components/writeactionparameter.go + - tests/mockserver/internal/sdk/models/components/writepermission.go + - tests/mockserver/internal/sdk/models/operations/activity.go + - tests/mockserver/internal/sdk/models/operations/addcollectionitems.go + - tests/mockserver/internal/sdk/models/operations/addverificationreminder.go + - tests/mockserver/internal/sdk/models/operations/adminsearch.go + - tests/mockserver/internal/sdk/models/operations/autocomplete.go + - tests/mockserver/internal/sdk/models/operations/chat.go + - tests/mockserver/internal/sdk/models/operations/chatstream.go + - tests/mockserver/internal/sdk/models/operations/createandstreamrun.go + - tests/mockserver/internal/sdk/models/operations/createandwaitrun.go + - tests/mockserver/internal/sdk/models/operations/createannouncement.go + - tests/mockserver/internal/sdk/models/operations/createanswer.go + - tests/mockserver/internal/sdk/models/operations/createauthtoken.go + - tests/mockserver/internal/sdk/models/operations/createcollection.go + - tests/mockserver/internal/sdk/models/operations/createpolicy.go + - tests/mockserver/internal/sdk/models/operations/createreport.go + - tests/mockserver/internal/sdk/models/operations/createshortcut.go + - tests/mockserver/internal/sdk/models/operations/deleteallchats.go + - tests/mockserver/internal/sdk/models/operations/deleteannouncement.go + - tests/mockserver/internal/sdk/models/operations/deleteanswer.go + - tests/mockserver/internal/sdk/models/operations/deletechatfiles.go + - tests/mockserver/internal/sdk/models/operations/deletechats.go + - tests/mockserver/internal/sdk/models/operations/deletecollection.go + - tests/mockserver/internal/sdk/models/operations/deletecollectionitem.go + - tests/mockserver/internal/sdk/models/operations/deleteshortcut.go + - tests/mockserver/internal/sdk/models/operations/downloadpolicycsv.go + - tests/mockserver/internal/sdk/models/operations/downloadreportcsv.go + - tests/mockserver/internal/sdk/models/operations/editanswer.go + - tests/mockserver/internal/sdk/models/operations/editcollection.go + - tests/mockserver/internal/sdk/models/operations/editcollectionitem.go + - tests/mockserver/internal/sdk/models/operations/editpin.go + - tests/mockserver/internal/sdk/models/operations/feed.go + - tests/mockserver/internal/sdk/models/operations/feedback.go + - tests/mockserver/internal/sdk/models/operations/getagent.go + - tests/mockserver/internal/sdk/models/operations/getagentschemas.go + - tests/mockserver/internal/sdk/models/operations/getanswer.go + - tests/mockserver/internal/sdk/models/operations/getchat.go + - tests/mockserver/internal/sdk/models/operations/getchatapplication.go + - tests/mockserver/internal/sdk/models/operations/getchatfiles.go + - tests/mockserver/internal/sdk/models/operations/getcollection.go + - tests/mockserver/internal/sdk/models/operations/getdocpermissions.go + - tests/mockserver/internal/sdk/models/operations/getdocuments.go + - tests/mockserver/internal/sdk/models/operations/getdocumentsbyfacets.go + - tests/mockserver/internal/sdk/models/operations/getdocvisibility.go + - tests/mockserver/internal/sdk/models/operations/getpin.go + - tests/mockserver/internal/sdk/models/operations/getpolicy.go + - tests/mockserver/internal/sdk/models/operations/getreportstatus.go + - tests/mockserver/internal/sdk/models/operations/getrestapiv1toolslist.go + - tests/mockserver/internal/sdk/models/operations/getshortcut.go + - tests/mockserver/internal/sdk/models/operations/insights.go + - tests/mockserver/internal/sdk/models/operations/listanswers.go + - tests/mockserver/internal/sdk/models/operations/listchats.go + - tests/mockserver/internal/sdk/models/operations/listcollections.go + - tests/mockserver/internal/sdk/models/operations/listentities.go + - tests/mockserver/internal/sdk/models/operations/listpins.go + - tests/mockserver/internal/sdk/models/operations/listpolicies.go + - tests/mockserver/internal/sdk/models/operations/listshortcuts.go + - tests/mockserver/internal/sdk/models/operations/listverifications.go + - tests/mockserver/internal/sdk/models/operations/messages.go + - tests/mockserver/internal/sdk/models/operations/people.go + - tests/mockserver/internal/sdk/models/operations/pin.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1adddatasource.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1betausers.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexdocuments.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexemployees.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexgroups.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexmemberships.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexshortcuts.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexteams.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexusers.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1checkdocumentaccess.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcedocument.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcedocuments.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcestatus.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourceuser.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1deletedocument.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteemployee.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1deletegroup.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1deletemembership.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteteam.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteuser.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1getdatasourceconfig.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1getdocumentcount.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1getdocumentstatus.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1getusercount.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1indexdocument.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1indexdocuments.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1indexemployee.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1indexgroup.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1indexmembership.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1indexteam.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1indexuser.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1processalldocuments.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1processallemployeesandteams.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1processallmemberships.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1rotatetoken.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1updatepermissions.go + - tests/mockserver/internal/sdk/models/operations/postapiindexv1uploadshortcuts.go + - tests/mockserver/internal/sdk/models/operations/postrestapiv1toolscall.go + - tests/mockserver/internal/sdk/models/operations/recommendations.go + - tests/mockserver/internal/sdk/models/operations/search.go + - tests/mockserver/internal/sdk/models/operations/searchagents.go + - tests/mockserver/internal/sdk/models/operations/setdocvisibility.go + - tests/mockserver/internal/sdk/models/operations/summarize.go + - tests/mockserver/internal/sdk/models/operations/unpin.go + - tests/mockserver/internal/sdk/models/operations/updateannouncement.go + - tests/mockserver/internal/sdk/models/operations/updatepolicy.go + - tests/mockserver/internal/sdk/models/operations/updateshortcut.go + - tests/mockserver/internal/sdk/models/operations/uploadchatfiles.go + - tests/mockserver/internal/sdk/models/operations/verify.go + - tests/mockserver/internal/sdk/models/sdkerrors/collectionerror.go + - tests/mockserver/internal/sdk/models/sdkerrors/gleandataerror.go + - tests/mockserver/internal/sdk/types/bigint.go + - tests/mockserver/internal/sdk/types/date.go + - tests/mockserver/internal/sdk/types/datetime.go + - tests/mockserver/internal/sdk/types/decimal.go + - tests/mockserver/internal/sdk/types/jsonl/jsonl.go + - tests/mockserver/internal/sdk/types/pointers.go + - tests/mockserver/internal/sdk/utils/json.go + - tests/mockserver/internal/sdk/utils/reflect.go + - tests/mockserver/internal/sdk/utils/sort.go + - tests/mockserver/internal/server/doc.go + - tests/mockserver/internal/server/generated_handlers.go + - tests/mockserver/internal/server/internal_handlers.go + - tests/mockserver/internal/server/server.go + - tests/mockserver/internal/server/server_option.go + - tests/mockserver/internal/server/templates/log/index.html.tmpl + - tests/mockserver/internal/server/templates/log/operation.html.tmpl + - tests/mockserver/internal/server/templates/log/style.css.tmpl + - tests/mockserver/internal/tracking/requesttracker.go + - tests/mockserver/main.go examples: activity: speakeasy-default-activity: @@ -2309,4 +2989,145 @@ examples: "200": application/json: {} examplesVersion: 1.0.2 -generatedTests: {} +generatedTests: + activity: "2025-06-09T12:51:32-04:00" + feedback: "2025-06-09T12:51:32-04:00" + createannouncement: "2025-06-09T12:51:32-04:00" + createdraftannouncement: "2025-06-09T12:51:32-04:00" + deleteannouncement: "2025-06-09T12:51:32-04:00" + deletedraftannouncement: "2025-06-09T12:51:32-04:00" + getannouncement: "2025-06-09T12:51:32-04:00" + getdraftannouncement: "2025-06-09T12:51:32-04:00" + listannouncements: "2025-06-09T12:51:32-04:00" + previewannouncement: "2025-06-09T12:51:32-04:00" + previewannouncementdraft: "2025-06-09T12:51:32-04:00" + publishdraftannouncement: "2025-06-09T12:51:32-04:00" + unpublishannouncement: "2025-06-09T12:51:32-04:00" + updateannouncement: "2025-06-09T12:51:32-04:00" + updatedraftannouncement: "2025-06-09T12:51:32-04:00" + createanswer: "2025-06-09T12:51:32-04:00" + deleteanswer: "2025-06-09T12:51:32-04:00" + editanswer: "2025-06-09T12:51:32-04:00" + getanswer: "2025-06-09T12:51:32-04:00" + listanswers: "2025-06-09T12:51:32-04:00" + previewanswer: "2025-06-09T12:51:32-04:00" + previewanswerdraft: "2025-06-09T12:51:32-04:00" + updateanswerlikes: "2025-06-09T12:51:32-04:00" + createanswerboard: "2025-06-09T12:51:32-04:00" + deleteanswerboards: "2025-06-09T12:51:32-04:00" + editanswerboard: "2025-06-09T12:51:32-04:00" + getanswerboard: "2025-06-09T12:51:32-04:00" + listanswerboards: "2025-06-09T12:51:32-04:00" + createanonymoustoken: "2025-06-09T12:51:32-04:00" + createauthtoken: "2025-06-09T12:51:32-04:00" + getevents: "2025-06-09T12:51:32-04:00" + ask: "2025-06-09T12:51:32-04:00" + chat: "2025-06-09T12:51:32-04:00" + deleteallchats: "2025-06-09T12:51:32-04:00" + deletechats: "2025-06-09T12:51:32-04:00" + getchat: "2025-06-09T12:51:32-04:00" + listchats: "2025-06-09T12:51:32-04:00" + getchatapplication: "2025-06-09T12:51:32-04:00" + getchatfiles: "2025-06-09T12:51:32-04:00" + deletechatfiles: "2025-06-09T12:51:32-04:00" + addcollectionitems: "2025-06-09T12:51:32-04:00" + createcollection: "2025-06-09T12:51:32-04:00" + deletecollection: "2025-06-09T12:51:32-04:00" + deletecollectionitem: "2025-06-09T12:51:32-04:00" + editcollection: "2025-06-09T12:51:32-04:00" + editcollectionitem: "2025-06-09T12:51:32-04:00" + editdocumentcollections: "2025-06-09T12:51:32-04:00" + getcollection: "2025-06-09T12:51:32-04:00" + listcollections: "2025-06-09T12:51:32-04:00" + movecollectionitem: "2025-06-09T12:51:32-04:00" + pincollection: "2025-06-09T12:51:32-04:00" + createdisplayablelists: "2025-06-09T12:51:32-04:00" + deletedisplayablelists: "2025-06-09T12:51:32-04:00" + getdisplayablelists: "2025-06-09T12:51:32-04:00" + updatedisplayablelists: "2025-06-09T12:51:32-04:00" + getdocpermissions: "2025-06-09T12:51:32-04:00" + getdocuments: "2025-06-09T12:51:32-04:00" + getdocumentsbyfacets: "2025-06-09T12:51:32-04:00" + getdocumentanalytics: "2025-06-09T12:51:32-04:00" + insights: "2025-06-09T12:51:32-04:00" + messages: "2025-06-09T12:51:32-04:00" + editpin: "2025-06-09T12:51:32-04:00" + getpin: "2025-06-09T12:51:32-04:00" + listpins: "2025-06-09T12:51:32-04:00" + pin: "2025-06-09T12:51:32-04:00" + unpin: "2025-06-09T12:51:32-04:00" + adminsearch: "2025-06-09T12:51:32-04:00" + autocomplete: "2025-06-09T12:51:32-04:00" + feed: "2025-06-09T12:51:32-04:00" + peoplesuggest: "2025-06-09T12:51:32-04:00" + peoplesuggestadmin: "2025-06-09T12:51:32-04:00" + recommendations: "2025-06-09T12:51:32-04:00" + search: "2025-06-09T12:51:32-04:00" + listentities: "2025-06-09T12:51:32-04:00" + people: "2025-06-09T12:51:32-04:00" + teams: "2025-06-09T12:51:32-04:00" + createshortcut: "2025-06-09T12:51:32-04:00" + deleteshortcut: "2025-06-09T12:51:32-04:00" + getshortcut: "2025-06-09T12:51:32-04:00" + getsimilarshortcuts: "2025-06-09T12:51:32-04:00" + listshortcuts: "2025-06-09T12:51:32-04:00" + previewshortcut: "2025-06-09T12:51:32-04:00" + updateshortcut: "2025-06-09T12:51:32-04:00" + summarize: "2025-06-09T12:51:32-04:00" + addcredential: "2025-06-09T12:51:32-04:00" + deletequeryhistory: "2025-06-09T12:51:32-04:00" + invite: "2025-06-09T12:51:32-04:00" + publicconfig: "2025-06-09T12:51:32-04:00" + removecredential: "2025-06-09T12:51:32-04:00" + support_email: "2025-06-09T12:51:32-04:00" + addverificationreminder: "2025-06-09T12:51:32-04:00" + listverifications: "2025-06-09T12:51:32-04:00" + verify: "2025-06-09T12:51:32-04:00" + runagent: "2025-06-09T12:51:32-04:00" + listagents: "2025-06-09T12:51:32-04:00" + getagentinputs: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/indexdocument: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/indexdocuments: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/bulkindexdocuments: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/processalldocuments: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/deletedocument: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/updatepermissions: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/indexuser: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/bulkindexusers: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/indexgroup: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/bulkindexgroups: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/indexmembership: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/bulkindexmemberships: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/processallmemberships: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/deleteuser: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/deletegroup: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/deletemembership: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/betausers: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/debug/{datasource}/status: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/checkdocumentaccess: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/getdocumentstatus: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/getdocumentcount: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/getusercount: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/adddatasource: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/getdatasourceconfig: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/rotatetoken: "2025-06-09T12:51:32-04:00" + post_/api/index/v1/processallemployeesandteams: "2025-06-09T12:51:32-04:00" + chatStream: "2025-06-09T12:51:32-04:00" + getAgent: "2025-06-09T12:51:32-04:00" + getAgentSchemas: "2025-06-09T12:51:32-04:00" + searchAgents: "2025-06-09T12:51:32-04:00" + createAndStreamRun: "2025-06-09T12:51:32-04:00" + createAndWaitRun: "2025-06-09T12:51:32-04:00" + getpolicy: "2025-06-09T12:51:32-04:00" + getpolicies: "2025-06-09T12:51:32-04:00" + createpolicy: "2025-06-09T12:51:32-04:00" + downloadpolicycsv: "2025-06-09T12:51:32-04:00" + createreport: "2025-06-09T12:51:32-04:00" + downloadreportcsv: "2025-06-09T12:51:32-04:00" + getreportstatus: "2025-06-09T12:51:32-04:00" + getdocvisibility: "2025-06-09T12:51:32-04:00" + setdocvisibility: "2025-06-09T12:51:32-04:00" + get_/rest/api/v1/tools/list: "2025-06-09T12:51:32-04:00" + post_/rest/api/v1/tools/call: "2025-06-09T12:51:32-04:00" + listpolicies: "2025-06-09T12:51:32-04:00" + uploadchatfiles: "2025-06-09T12:51:32-04:00" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 31cf1898..fdca1408 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -16,6 +16,9 @@ generation: auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true + tests: + generateNewTests: true + skipResponseBodyAssertions: false java: version: 0.5.4 additionalDependencies: [] diff --git a/.speakeasy/testfiles/example.file b/.speakeasy/testfiles/example.file new file mode 100644 index 00000000..3b18e512 --- /dev/null +++ b/.speakeasy/testfiles/example.file @@ -0,0 +1 @@ +hello world diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index 5e44b110..84191be0 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -164257,3 +164257,38 @@ workflows: {} type: simple x-speakeasy-test-group: policies + - workflowId: uploadchatfiles + steps: + - stepId: test + operationId: uploadchatfiles + requestBody: + contentType: multipart/form-data + payload: + files: + - 'x-file: example.file' + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + { + "files": [ + { + "id": "FILE_1234", + "url": "www.google.com", + "name": "sample.pdf" + }, + { + "id": "FILE_1234", + "url": "www.google.com", + "name": "sample.pdf" + }, + { + "id": "FILE_1234", + "url": "www.google.com", + "name": "sample.pdf" + } + ] + } + type: simple + x-speakeasy-test-group: chat diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 6c47434a..49e16aa8 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -6,7 +6,6 @@ sources: sourceBlobDigest: sha256:f2a59d8beefedbda0e59b25d09a930e1b907145f784bf8961fc31b862163d964 tags: - latest - - speakeasy-sdk-regen-1749454026 Glean-OAS: sourceNamespace: glean-oas sourceRevisionDigest: sha256:8841834dd58ddd4e2dcf98fc90fbd06fbf3626a29df941503cce55b9548a5317 @@ -21,7 +20,7 @@ targets: sourceRevisionDigest: sha256:254ed74184de2e725a0dc2cf521b132b29ece9d3ba6b12fd7e7b1ceaa2e6d043 sourceBlobDigest: sha256:f2a59d8beefedbda0e59b25d09a930e1b907145f784bf8961fc31b862163d964 codeSamplesNamespace: glean-api-specs-java-code-samples - codeSamplesRevisionDigest: sha256:e6b8f88064c039aa8020b1618efbbbcd8ffb72cbc6122b8a74e3879b4545606e + codeSamplesRevisionDigest: sha256:e5b2ea5208c1dc6e24e3a32186332fee5e6235cc612e785611add744c44901fa workflow: workflowVersion: 1.0.0 speakeasyVersion: latest @@ -46,3 +45,5 @@ workflow: labelOverride: fixedValue: Java (API Client) blocking: false + testing: + enabled: true diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 0236e9ab..fe9f0994 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -21,3 +21,5 @@ targets: labelOverride: fixedValue: Java (API Client) blocking: false + testing: + enabled: true diff --git a/build.gradle b/build.gradle index 7ef53342..dcb48b7a 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,7 @@ plugins { id 'maven-publish' id 'signing' id 'cl.franciscosolis.sonatype-central-upload' version '1.0.3' + id "com.adarshr.test-logger" version "3.2.0" } compileJava.options.encoding = "UTF-8" @@ -147,6 +148,45 @@ if (!project.hasProperty('skip.signing')) { } +tasks.named('test') { + // Use JUnit Platform for unit tests. + useJUnitPlatform() +} + +testlogger { + showStandardStreams true +} + +test { + maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1 + finalizedBy 'mergeJUnitReports' +} + +configurations { + antJUnit +} + +task mergeJUnitReports { + ext { + resultsDir = file("$buildDir/test-results/test") + targetDir = file(".speakeasy/reports") + } + + doLast { + ant.taskdef( + name: 'junitreport', + classname: 'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator', + classpath: configurations.antJUnit.asPath + ) + + mkdir targetDir + + ant.junitreport(todir: targetDir, tofile: 'tests.xml') { + fileset(dir: resultsDir, includes: 'TEST-*.xml') + } + } +} + dependencies { api 'com.fasterxml.jackson.core:jackson-annotations:2.18.2' @@ -155,6 +195,10 @@ dependencies { implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2' api('org.openapitools:jackson-databind-nullable:0.2.6') {exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'} implementation 'commons-io:commons-io:2.18.0' + testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4' + testImplementation 'org.mockito:mockito-core:5.14.2' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.4' + antJUnit 'org.apache.ant:ant-junit:1.9.7' } apply from: 'build-extras.gradle' diff --git a/src/test/java/com/glean/api_client/glean_api_client/ActivitiesTests.java b/src/test/java/com/glean/api_client/glean_api_client/ActivitiesTests.java new file mode 100644 index 00000000..3093b40f --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/ActivitiesTests.java @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.Event; +import com.glean.api_client.glean_api_client.models.components.Feedback; +import com.glean.api_client.glean_api_client.models.operations.FeedbackResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.util.List; +import org.junit.jupiter.api.Test; + +public class ActivitiesTests { + + @Test + public void testActivities_Feedback() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("feedback"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + FeedbackResponse res = sdk.client().activity().feedback() + .feedback1(Feedback.builder() + .trackingTokens(List.of( + "trackingTokens")) + .event(Event.VIEW) + .build()) + .call(); + assertEquals(200, res.statusCode()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/AgentsTests.java b/src/test/java/com/glean/api_client/glean_api_client/AgentsTests.java new file mode 100644 index 00000000..3dd93a1f --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/AgentsTests.java @@ -0,0 +1,100 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.Agent; +import com.glean.api_client.glean_api_client.models.components.AgentCapabilities; +import com.glean.api_client.glean_api_client.models.components.AgentSchemas; +import com.glean.api_client.glean_api_client.models.components.InputSchema; +import com.glean.api_client.glean_api_client.models.components.OutputSchema; +import com.glean.api_client.glean_api_client.models.operations.GetAgentResponse; +import com.glean.api_client.glean_api_client.models.operations.GetAgentSchemasResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class AgentsTests { + + @Test + public void testAgents_Runagent() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step runagent.test referencing operation runagent not found in document`]"); + } + + @Test + public void testAgents_Listagents() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step listagents.test referencing operation listagents not found in document`]"); + } + + @Test + public void testAgents_Getagentinputs() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step getagentinputs.test referencing operation getagentinputs not found in document`]"); + } + + @Test + public void testAgents_GetAgent() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getAgent"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetAgentResponse res = sdk.client().agents().retrieve() + .agentId("") + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + Agent.builder() + .agentId("") + .name("") + .capabilities(AgentCapabilities.builder() + .build()) + .build(), + res.agent().get()); + } + + @Test + public void testAgents_GetAgentSchemas() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getAgentSchemas"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetAgentSchemasResponse res = sdk.client().agents().retrieveSchemas() + .agentId("") + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + AgentSchemas.builder() + .agentId("") + .inputSchema(InputSchema.builder() + .build()) + .outputSchema(OutputSchema.builder() + .build()) + .build(), + res.agentSchemas().get()); + } + + @Test + public void testAgents_SearchAgents() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step searchAgents.test referencing operation searchAgents is missing required request body`]"); + } + + @Test + public void testAgents_CreateAndStreamRun() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step createAndStreamRun.test referencing operation createAndStreamRun is not currently supported`]"); + } + + @Test + public void testAgents_CreateAndWaitRun() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step createAndWaitRun.test referencing operation createAndWaitRun is missing required request body`]"); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/AnnouncementsTests.java b/src/test/java/com/glean/api_client/glean_api_client/AnnouncementsTests.java new file mode 100644 index 00000000..017210a7 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/AnnouncementsTests.java @@ -0,0 +1,8127 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.Announcement; +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.CreateAnnouncementRequest; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.DeleteAnnouncementRequest; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.StructuredText; +import com.glean.api_client.glean_api_client.models.components.StructuredTextItem; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.UpdateAnnouncementRequest; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.operations.CreateannouncementResponse; +import com.glean.api_client.glean_api_client.models.operations.DeleteannouncementResponse; +import com.glean.api_client.glean_api_client.models.operations.UpdateannouncementResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class AnnouncementsTests { + + @Test + public void testAnnouncements_Createannouncement() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("createannouncement"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + CreateAnnouncementRequest req = CreateAnnouncementRequest.builder() + .startTime(OffsetDateTime.parse("2024-06-17T07:14:55.338Z")) + .endTime(OffsetDateTime.parse("2024-11-30T17:06:07.804Z")) + .title("") + .body(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(796474L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(86L) + .build(), + TextRange.builder() + .startIndex(169727L) + .build(), + TextRange.builder() + .startIndex(89964L) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .mentionedPeople(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("yuck mortally round") + .id(924484L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(583353L) + .itemType(CollectionItemItemType.TEXT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .reactors(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(911742L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(428745L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(860420L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(284120L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(); + + CreateannouncementResponse res = sdk.client().announcements().create() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + Announcement.builder() + .body(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(520049L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(800759L) + .build(), + TextRange.builder() + .startIndex(117747L) + .build(), + TextRange.builder() + .startIndex(589813L) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(277321L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .mentionedPeople(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("sleet where schedule") + .id(108833L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(572012L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(616892L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build(), + Collection.builder() + .name("") + .description("zowie nasalise punctually yippee") + .id(703146L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .reactors(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(312813L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Share.builder() + .numDaysAgo(903800L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(620608L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(188605L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(252418L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(874230L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .draftId(342L) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(605172L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + res.announcement().get()); + } + + @Test + public void testAnnouncements_Createdraftannouncement() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step createdraftannouncement.test referencing operation createdraftannouncement not found in document`]"); + } + + @Test + public void testAnnouncements_Deleteannouncement() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("deleteannouncement"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeleteAnnouncementRequest req = DeleteAnnouncementRequest.builder() + .id(545907L) + .build(); + + DeleteannouncementResponse res = sdk.client().announcements().delete() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testAnnouncements_Deletedraftannouncement() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step deletedraftannouncement.test referencing operation deletedraftannouncement not found in document`]"); + } + + @Test + public void testAnnouncements_Getannouncement() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step getannouncement.test referencing operation getannouncement not found in document`]"); + } + + @Test + public void testAnnouncements_Getdraftannouncement() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step getdraftannouncement.test referencing operation getdraftannouncement not found in document`]"); + } + + @Test + public void testAnnouncements_Listannouncements() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step listannouncements.test referencing operation listannouncements not found in document`]"); + } + + @Test + public void testAnnouncements_Previewannouncement() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step previewannouncement.test referencing operation previewannouncement not found in document`]"); + } + + @Test + public void testAnnouncements_Previewannouncementdraft() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step previewannouncementdraft.test referencing operation previewannouncementdraft not found in document`]"); + } + + @Test + public void testAnnouncements_Publishdraftannouncement() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step publishdraftannouncement.test referencing operation publishdraftannouncement not found in document`]"); + } + + @Test + public void testAnnouncements_Unpublishannouncement() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step unpublishannouncement.test referencing operation unpublishannouncement not found in document`]"); + } + + @Test + public void testAnnouncements_Updateannouncement() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("updateannouncement"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + UpdateAnnouncementRequest req = UpdateAnnouncementRequest.builder() + .startTime(OffsetDateTime.parse("2025-07-28T19:04:48.565Z")) + .endTime(OffsetDateTime.parse("2024-10-16T10:52:42.015Z")) + .title("") + .id(761625L) + .body(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(488852L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(54062L) + .build(), + TextRange.builder() + .startIndex(896501L) + .build(), + TextRange.builder() + .startIndex(446863L) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(249440L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(789275L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .mentionedPeople(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("daintily certainly yak surprised beyond blah intensely") + .id(249026L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(784089L) + .itemType(CollectionItemItemType.TEXT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(416023L) + .itemType(CollectionItemItemType.COLLECTION) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build(), + Collection.builder() + .name("") + .description("misjudge scare cinema ouch weary euphonium") + .id(553539L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Collection.builder() + .name("") + .description("exotic fussy shadowy") + .id(890948L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .reactors(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(178177L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(691669L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(219050L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(358043L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(); + + UpdateannouncementResponse res = sdk.client().announcements().update() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + Announcement.builder() + .body(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(517232L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(676467L) + .build(), + TextRange.builder() + .startIndex(749867L) + .build(), + TextRange.builder() + .startIndex(595467L) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(454586L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .mentionedPeople(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("queasily down worthy generously than narrate pish off") + .id(162698L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(553022L) + .itemType(CollectionItemItemType.URL) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(322125L) + .itemType(CollectionItemItemType.TEXT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .reactors(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(132693L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Share.builder() + .numDaysAgo(241217L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Share.builder() + .numDaysAgo(355708L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(46236L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(25092L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(109020L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(390161L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(349429L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .draftId(342L) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(726281L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + res.announcement().get()); + } + + @Test + public void testAnnouncements_Updatedraftannouncement() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step updatedraftannouncement.test referencing operation updatedraftannouncement not found in document`]"); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/AnswersTests.java b/src/test/java/com/glean/api_client/glean_api_client/AnswersTests.java new file mode 100644 index 00000000..610e41d9 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/AnswersTests.java @@ -0,0 +1,11477 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.Answer; +import com.glean.api_client.glean_api_client.models.components.AnswerBoard; +import com.glean.api_client.glean_api_client.models.components.AnswerCreationData; +import com.glean.api_client.glean_api_client.models.components.AnswerLike; +import com.glean.api_client.glean_api_client.models.components.AnswerLikes; +import com.glean.api_client.glean_api_client.models.components.AnswerResult; +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.CreateAnswerRequest; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.DeleteAnswerRequest; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.EditAnswerRequest; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.GetAnswerError; +import com.glean.api_client.glean_api_client.models.components.GetAnswerRequest; +import com.glean.api_client.glean_api_client.models.components.GetAnswerResponse; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.ListAnswersRequest; +import com.glean.api_client.glean_api_client.models.components.ListAnswersResponse; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.StructuredText; +import com.glean.api_client.glean_api_client.models.components.StructuredTextItem; +import com.glean.api_client.glean_api_client.models.components.StructuredTextMutableProperties; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.operations.CreateanswerResponse; +import com.glean.api_client.glean_api_client.models.operations.DeleteanswerResponse; +import com.glean.api_client.glean_api_client.models.operations.EditanswerResponse; +import com.glean.api_client.glean_api_client.models.operations.GetanswerResponse; +import com.glean.api_client.glean_api_client.models.operations.ListanswersResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class AnswersTests { + + @Test + public void testAnswers_Createanswer() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("createanswer"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + CreateAnswerRequest req = CreateAnswerRequest.builder() + .data(AnswerCreationData.builder() + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(134365L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(796474L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("fumigate convection though zowie") + .id(496323L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(782367L) + .itemType(CollectionItemItemType.DOCUMENT) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(219974L) + .build(), + Share.builder() + .numDaysAgo(449221L) + .build(), + Share.builder() + .numDaysAgo(427887L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(491427L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(490420L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(45416L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .combinedAnswerText(StructuredTextMutableProperties.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .build()) + .build(); + + CreateanswerResponse res = sdk.client().answers().create() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(433224L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(995852L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("shadowy foodstuffs welcome via deeply writ amid") + .id(629063L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(338524L) + .itemType(CollectionItemItemType.COLLECTION) + .build(), + CollectionItem.builder() + .collectionId(154150L) + .itemType(CollectionItemItemType.URL) + .build(), + CollectionItem.builder() + .collectionId(739949L) + .itemType(CollectionItemItemType.COLLECTION) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(982866L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(749299L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(150565L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(572012L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(185076L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(616892L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(190973L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(665035L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(261757L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of( + AnswerLike.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .likedByUser(true) + .numLikes(453975L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(557925L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("massive under meh severe ditch bungalow when sauerkraut") + .id(404062L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(639388L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + res.answer().get()); + } + + @Test + public void testAnswers_Deleteanswer() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("deleteanswer"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeleteAnswerRequest req = DeleteAnswerRequest.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .build(); + + DeleteanswerResponse res = sdk.client().answers().delete() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testAnswers_Editanswer() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("editanswer"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + EditAnswerRequest req = EditAnswerRequest.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(149825L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(700217L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("about huzzah institute violin aw pillow abnegate memorable") + .id(384736L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(670716L) + .itemType(CollectionItemItemType.URL) + .build(), + CollectionItem.builder() + .collectionId(793957L) + .itemType(CollectionItemItemType.URL) + .build())) + .build(), + Collection.builder() + .name("") + .description("trouser twine because unnaturally card gallery among") + .id(818393L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + Collection.builder() + .name("") + .description("zebra ugh exactly pfft once") + .id(29269L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(177137L) + .build(), + Share.builder() + .numDaysAgo(127401L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(843043L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(630893L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(862908L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .combinedAnswerText(StructuredTextMutableProperties.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .build(); + + EditanswerResponse res = sdk.client().answers().update() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(490266L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(949852L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("overwork scent er alert consequently brochure awful chilly scary") + .id(859594L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(359827L) + .itemType(CollectionItemItemType.TEXT) + .build())) + .build(), + Collection.builder() + .name("") + .description("below considering correctly poor instead") + .id(973585L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + Collection.builder() + .name("") + .description("brr pillbox exactly through scented drive etch") + .id(353341L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(119170L) + .build(), + Share.builder() + .numDaysAgo(28922L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(103434L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(57214L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(72991L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(900561L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(751237L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(488606L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of( + AnswerLike.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + AnswerLike.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + AnswerLike.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .likedByUser(false) + .numLikes(526808L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(945691L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("transparency lest while up yahoo towards fabricate motionless") + .id(882159L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(12186L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + res.answer().get()); + } + + @Test + public void testAnswers_Getanswer() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getanswer"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetAnswerRequest req = GetAnswerRequest.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .build(); + + GetanswerResponse res = sdk.client().answers().retrieve() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetAnswerResponse.builder() + .answerResult(AnswerResult.builder() + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(521235L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(458049L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("carefully glorious scrabble ignite") + .id(159685L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(108980L) + .itemType(CollectionItemItemType.COLLECTION) + .build(), + CollectionItem.builder() + .collectionId(644971L) + .itemType(CollectionItemItemType.URL) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(384844L) + .build(), + Share.builder() + .numDaysAgo(91052L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(656841L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(570980L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(607679L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(397483L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(455424L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(103111L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(392574L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(754054L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(710636L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(395188L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(547184L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of( + AnswerLike.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + AnswerLike.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + AnswerLike.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .likedByUser(false) + .numLikes(576892L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(258862L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("whether deflate book knotty er beneath nervously than") + .id(194354L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(831606L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .build()) + .error(GetAnswerError.builder() + .answerAuthor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build(), + res.getAnswerResponse().get()); + } + + @Test + public void testAnswers_Listanswers() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("listanswers"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ListAnswersRequest req = ListAnswersRequest.builder() + .build(); + + ListanswersResponse res = sdk.client().answers().list() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + ListAnswersResponse.builder() + .answerResults(List.of( + AnswerResult.builder() + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(229716L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(635532L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("avalanche jungle unto meanwhile beside tromp worth reluctantly") + .id(781409L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(66993L) + .itemType(CollectionItemItemType.DOCUMENT) + .build(), + CollectionItem.builder() + .collectionId(294083L) + .itemType(CollectionItemItemType.COLLECTION) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(678179L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(810770L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(956959L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(948614L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(20615L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(370293L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(50388L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(487446L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("boo massive sorrowful aw strict behind along energetic oddball") + .id(472871L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(367314L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .build(), + AnswerResult.builder() + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(233358L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(536405L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("likely up questionably forgery glow warmhearted") + .id(674469L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(359708L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .build(), + AnswerResult.builder() + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(80289L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(327973L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("freely overcook till boo ack") + .id(477827L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(238432L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .build())) + .build(), + res.listAnswersResponse().get()); + } + + @Test + public void testAnswers_Previewanswer() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step previewanswer.test referencing operation previewanswer not found in document`]"); + } + + @Test + public void testAnswers_Previewanswerdraft() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step previewanswerdraft.test referencing operation previewanswerdraft not found in document`]"); + } + + @Test + public void testAnswers_Updateanswerlikes() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step updateanswerlikes.test referencing operation updateanswerlikes not found in document`]"); + } + + @Test + public void testAnswers_Createanswerboard() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step createanswerboard.test referencing operation createanswerboard not found in document`]"); + } + + @Test + public void testAnswers_Deleteanswerboards() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step deleteanswerboards.test referencing operation deleteanswerboards not found in document`]"); + } + + @Test + public void testAnswers_Editanswerboard() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step editanswerboard.test referencing operation editanswerboard not found in document`]"); + } + + @Test + public void testAnswers_Getanswerboard() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step getanswerboard.test referencing operation getanswerboard not found in document`]"); + } + + @Test + public void testAnswers_Listanswerboards() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step listanswerboards.test referencing operation listanswerboards not found in document`]"); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/CalendarTests.java b/src/test/java/com/glean/api_client/glean_api_client/CalendarTests.java new file mode 100644 index 00000000..980c7176 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/CalendarTests.java @@ -0,0 +1,16 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import java.lang.Exception; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class CalendarTests { + + @Test + public void testCalendar_Getevents() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step getevents.test referencing operation getevents not found in document`]"); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/ChatTests.java b/src/test/java/com/glean/api_client/glean_api_client/ChatTests.java new file mode 100644 index 00000000..072b6e23 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/ChatTests.java @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.ChatFile; +import com.glean.api_client.glean_api_client.models.components.File; +import com.glean.api_client.glean_api_client.models.components.UploadChatFilesRequest; +import com.glean.api_client.glean_api_client.models.components.UploadChatFilesResponse; +import com.glean.api_client.glean_api_client.models.operations.UploadchatfilesResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.util.List; +import org.junit.jupiter.api.Test; + +public class ChatTests { + + @Test + public void testChat_Uploadchatfiles() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("uploadchatfiles"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + UploadchatfilesResponse res = sdk.client().chat().uploadFiles() + .uploadChatFilesRequest(UploadChatFilesRequest.builder() + .files(List.of( + File.builder() + .fileName("example.file") + .content(Utils.readBytes(".speakeasy/testfiles/example.file")) + .build())) + .build()) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + UploadChatFilesResponse.builder() + .files(List.of( + ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build(), + ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build(), + ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build())) + .build(), + res.uploadChatFilesResponse().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/ClientActivityTests.java b/src/test/java/com/glean/api_client/glean_api_client/ClientActivityTests.java new file mode 100644 index 00000000..d1dc61e8 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/ClientActivityTests.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.Activity; +import com.glean.api_client.glean_api_client.models.components.ActivityEvent; +import com.glean.api_client.glean_api_client.models.components.ActivityEventAction; +import com.glean.api_client.glean_api_client.models.components.ActivityEventParams; +import com.glean.api_client.glean_api_client.models.operations.ActivityResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.OffsetDateTime; +import java.util.List; +import org.junit.jupiter.api.Test; + +public class ClientActivityTests { + + @Test + public void testClientActivity_Activity() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("activity"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + Activity req = Activity.builder() + .events(List.of( + ActivityEvent.builder() + .action(ActivityEventAction.HISTORICAL_VIEW) + .timestamp(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .url("https://example.com/") + .build(), + ActivityEvent.builder() + .action(ActivityEventAction.SEARCH) + .timestamp(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .url("https://example.com/search?q=query") + .params(ActivityEventParams.builder() + .query("query") + .build()) + .build(), + ActivityEvent.builder() + .action(ActivityEventAction.VIEW) + .timestamp(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .url("https://example.com/") + .params(ActivityEventParams.builder() + .duration(20L) + .referrer("https://example.com/document") + .build()) + .build())) + .build(); + + ActivityResponse res = sdk.client().activity().report() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/ClientAuthenticationTests.java b/src/test/java/com/glean/api_client/glean_api_client/ClientAuthenticationTests.java new file mode 100644 index 00000000..679de8be --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/ClientAuthenticationTests.java @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.CreateAuthTokenResponse; +import com.glean.api_client.glean_api_client.models.operations.CreateauthtokenResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class ClientAuthenticationTests { + + @Test + public void testClientAuthentication_Createanonymoustoken() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step createanonymoustoken.test referencing operation createanonymoustoken not found in document`]"); + } + + @Test + public void testClientAuthentication_Createauthtoken() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("createauthtoken"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + CreateauthtokenResponse res = sdk.client().authentication().createToken() + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + CreateAuthTokenResponse.builder() + .token("") + .expirationTime(207213L) + .build(), + res.createAuthTokenResponse().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/ClientChatTests.java b/src/test/java/com/glean/api_client/glean_api_client/ClientChatTests.java new file mode 100644 index 00000000..7c218e47 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/ClientChatTests.java @@ -0,0 +1,11251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.AgentConfig; +import com.glean.api_client.glean_api_client.models.components.AgentEnum; +import com.glean.api_client.glean_api_client.models.components.Answer; +import com.glean.api_client.glean_api_client.models.components.AnswerBoard; +import com.glean.api_client.glean_api_client.models.components.AnswerLike; +import com.glean.api_client.glean_api_client.models.components.AnswerLikes; +import com.glean.api_client.glean_api_client.models.components.AnswerSourceType; +import com.glean.api_client.glean_api_client.models.components.AppResult; +import com.glean.api_client.glean_api_client.models.components.AuthConfig; +import com.glean.api_client.glean_api_client.models.components.AuthConfigStatus; +import com.glean.api_client.glean_api_client.models.components.AuthConfigType; +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.AuthType; +import com.glean.api_client.glean_api_client.models.components.Author; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.CalendarAttendee; +import com.glean.api_client.glean_api_client.models.components.CalendarAttendees; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.Chat; +import com.glean.api_client.glean_api_client.models.components.ChatFile; +import com.glean.api_client.glean_api_client.models.components.ChatFileFailureReason; +import com.glean.api_client.glean_api_client.models.components.ChatFileMetadata; +import com.glean.api_client.glean_api_client.models.components.ChatFileStatus; +import com.glean.api_client.glean_api_client.models.components.ChatMessage; +import com.glean.api_client.glean_api_client.models.components.ChatMessageCitation; +import com.glean.api_client.glean_api_client.models.components.ChatMessageFragment; +import com.glean.api_client.glean_api_client.models.components.ChatMetadata; +import com.glean.api_client.glean_api_client.models.components.ChatMetadataResult; +import com.glean.api_client.glean_api_client.models.components.ChatRequest; +import com.glean.api_client.glean_api_client.models.components.ChatResult; +import com.glean.api_client.glean_api_client.models.components.ClusterGroup; +import com.glean.api_client.glean_api_client.models.components.Code; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.Company; +import com.glean.api_client.glean_api_client.models.components.ConnectorType; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomEntity; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValuePerson; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.Customer; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.DeleteChatFilesRequest; +import com.glean.api_client.glean_api_client.models.components.DeleteChatsRequest; +import com.glean.api_client.glean_api_client.models.components.Disambiguation; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentContent; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.DocumentSection; +import com.glean.api_client.glean_api_client.models.components.DocumentSpec1; +import com.glean.api_client.glean_api_client.models.components.DocumentSpecUnion; +import com.glean.api_client.glean_api_client.models.components.EntityType; +import com.glean.api_client.glean_api_client.models.components.ExtractedQnA; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.GetChatApplicationRequest; +import com.glean.api_client.glean_api_client.models.components.GetChatApplicationResponse; +import com.glean.api_client.glean_api_client.models.components.GetChatFilesRequest; +import com.glean.api_client.glean_api_client.models.components.GetChatFilesResponse; +import com.glean.api_client.glean_api_client.models.components.GetChatRequest; +import com.glean.api_client.glean_api_client.models.components.GetChatResponse; +import com.glean.api_client.glean_api_client.models.components.GrantType; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.KnowledgeType; +import com.glean.api_client.glean_api_client.models.components.ListChatsResponse; +import com.glean.api_client.glean_api_client.models.components.Meeting; +import com.glean.api_client.glean_api_client.models.components.MessageType; +import com.glean.api_client.glean_api_client.models.components.Mode; +import com.glean.api_client.glean_api_client.models.components.ObjectPermissions; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PersonObject; +import com.glean.api_client.glean_api_client.models.components.PersonToTeamRelationship; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.Prominence; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.ReferenceRange; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelatedQuestion; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.Shortcut; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.StructuredResult; +import com.glean.api_client.glean_api_client.models.components.StructuredResultSource; +import com.glean.api_client.glean_api_client.models.components.StructuredText; +import com.glean.api_client.glean_api_client.models.components.StructuredTextItem; +import com.glean.api_client.glean_api_client.models.components.Team; +import com.glean.api_client.glean_api_client.models.components.TeamStatus; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.TextRangeType; +import com.glean.api_client.glean_api_client.models.components.ToolInfo; +import com.glean.api_client.glean_api_client.models.components.ToolMetadata; +import com.glean.api_client.glean_api_client.models.components.ToolMetadataType; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.components.WriteActionParameter; +import com.glean.api_client.glean_api_client.models.components.WriteActionParameterType; +import com.glean.api_client.glean_api_client.models.components.WriteActionType; +import com.glean.api_client.glean_api_client.models.operations.ChatStreamResponse; +import com.glean.api_client.glean_api_client.models.operations.DeleteallchatsResponse; +import com.glean.api_client.glean_api_client.models.operations.DeletechatfilesResponse; +import com.glean.api_client.glean_api_client.models.operations.DeletechatsResponse; +import com.glean.api_client.glean_api_client.models.operations.GetchatResponse; +import com.glean.api_client.glean_api_client.models.operations.GetchatapplicationResponse; +import com.glean.api_client.glean_api_client.models.operations.GetchatfilesResponse; +import com.glean.api_client.glean_api_client.models.operations.ListchatsResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class ClientChatTests { + + @Test + public void testClientChat_Ask() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step ask.test referencing operation ask not found in document`]"); + } + + @Test + public void testClientChat_ChatDefaultExample() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step chat-defaultExample.test referencing operation chat does not contain response body with content type text/plain`]"); + } + + @Test + public void testClientChat_ChatGptAgentExample() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step chat-gptAgentExample.test referencing operation chat does not contain response body with content type text/plain`]"); + } + + @Test + public void testClientChat_ChatStreamingExample() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step chat-streamingExample.test referencing operation chat does not contain response body with content type text/plain`]"); + } + + @Test + public void testClientChat_ChatUpdateResponse() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step chat-updateResponse.test referencing operation chat does not contain response body with content type text/plain`]"); + } + + @Test + public void testClientChat_ChatCitationResponse() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step chat-citationResponse.test referencing operation chat does not contain response body with content type text/plain`]"); + } + + @Test + public void testClientChat_Deleteallchats() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("deleteallchats"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeleteallchatsResponse res = sdk.client().chat().deleteAll() + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testClientChat_Deletechats() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("deletechats"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeletechatsResponse res = sdk.client().chat().delete() + .deleteChatsRequest(DeleteChatsRequest.builder() + .ids(List.of( + "", + "")) + .build()) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testClientChat_Getchat() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getchat"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetchatResponse res = sdk.client().chat().retrieve() + .getChatRequest(GetChatRequest.builder() + .id("") + .build()) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetChatResponse.builder() + .chatResult(ChatResult.builder() + .chat(Chat.builder() + .id("string") + .createTime(0L) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updateTime(0L) + .name("string") + .applicationId("string") + .applicationName("string") + .icon(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .messages(List.of( + ChatMessage.builder() + .agentConfig(AgentConfig.builder() + .agent(AgentEnum.DEFAULT) + .mode(Mode.DEFAULT) + .build()) + .author(Author.USER) + .citations(List.of( + ChatMessageCitation.builder() + .trackingToken("string") + .sourceDocument(Document.builder() + .id("string") + .datasource("string") + .connectorType(ConnectorType.API_CRAWL) + .docType("string") + .content(DocumentContent.builder() + .fullTextList(List.of( + "")) + .build()) + .title("string") + .url("string") + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .sections(List.of( + DocumentSection.builder() + .title("") + .url("https://normal-making.name") + .build())) + .build()) + .sourceFile(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .metadata(ChatFileMetadata.builder() + .status(ChatFileStatus.PROCESSING) + .uploadTime(0L) + .processedSize(0L) + .failureReason(ChatFileFailureReason.PARSE_FAILED) + .mimeType("string") + .build()) + .build()) + .sourcePerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .referenceRanges(List.of( + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(969961L) + .endIndex(458049L) + .type(TextRangeType.CITATION) + .url("https://earnest-tuber.info/") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("") + .ranges(List.of( + TextRange.builder() + .startIndex(78888L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(219956L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(313464L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .build())) + .build())) + .build())) + .uploadedFileIds(List.of( + "string")) + .fragments(List.of( + ChatMessageFragment.builder() + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .id("") + .datasource("") + .connectorType(ConnectorType.API_CRAWL) + .docType("") + .title("") + .url("https://strange-gloom.net") + .metadata(DocumentMetadata.builder() + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .mentionedPeople(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("scrabble ignite aw showboat shakily") + .id(843618L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(149108L) + .itemType(CollectionItemItemType.URL) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + CollectionItem.builder() + .collectionId(503671L) + .itemType(CollectionItemItemType.COLLECTION) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build(), + Collection.builder() + .name("") + .description("ah ack aha bah") + .id(72193L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .reactors(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(786783L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + Share.builder() + .numDaysAgo(972276L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(844917L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(531548L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(576892L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .documentCounts(Map.ofEntries( + Map.entry("key", 534384L), + Map.entry("key1", 901064L))) + .startDate(LocalDate.parse("2025-09-27")) + .contractAnnualRevenue(2187.45) + .notes("") + .build()) + .team(Team.builder() + .id("") + .name("") + .description("aw fibre hassle freezing but conversation under") + .businessUnit("") + .department("") + .photoUrl("https://sizzling-accountability.net/") + .bannerUrl("https://miserable-hydrant.biz/") + .externalLink("https://hasty-cappelletti.name/") + .memberCount(626356L) + .datasource("") + .createdFrom("") + .lastUpdatedAt(OffsetDateTime.parse("2023-08-02T00:17:06.651Z")) + .status(TeamStatus.QUEUED_FOR_CREATION) + .canBeDeleted(false) + .loggingId("") + .build()) + .customEntity(CustomEntity.builder() + .id("") + .title("") + .datasource("") + .objectType("") + .build()) + .answer(Answer.builder() + .id(313992L) + .docId("") + .question("") + .bodyText("") + .boardId(933583L) + .sourceDocumentSpec(DocumentSpecUnion.of(DocumentSpec1.builder() + .build())) + .sourceType(AnswerSourceType.ASSISTANT) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(30856L) + .build()) + .author(Person.builder() + .name("") + .obfuscatedId("") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .build())) + .metadata(PersonMetadata.builder() + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .build()) + .build()) + .createTime(OffsetDateTime.parse("2024-01-11T09:24:54.882Z")) + .updateTime(OffsetDateTime.parse("2024-10-30T08:25:44.878Z")) + .updatedBy(Person.builder() + .name("") + .obfuscatedId("") + .metadata(PersonMetadata.builder() + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .build()) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(306618L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("indolent vainly closely") + .id(601522L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .documentCategory("") + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .heading("") + .question("") + .questionResult(SearchResult.builder() + .url("https://gorgeous-custom.org/") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .relatedResults(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .build())) + .allClusteredResults(List.of( + ClusterGroup.builder() + .visibleCountHint(564329L) + .build())) + .mustIncludeSuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .build()) + .build()) + .meeting(Meeting.builder() + .id("") + .title("") + .description("inside dulcimer however sonnet um eek until geez phew") + .startTime(OffsetDateTime.parse("2025-10-27T12:29:37.632Z")) + .endTime(OffsetDateTime.parse("2024-03-28T07:14:42.093Z")) + .attendees(CalendarAttendees.builder() + .people(List.of( + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .build()) + .app(AppResult.builder() + .datasource("") + .docType("") + .mimeType("") + .iconUrl("https://bustling-birdbath.org") + .build()) + .collection(Collection.builder() + .name("") + .description("unless yuck serenade cuddly rundown neighboring considering upliftingly why") + .id(67110L) + .icon("") + .adminLocked(false) + .parentId(896826L) + .allowedDatasource("") + .createTime(OffsetDateTime.parse("2024-07-30T13:34:32.569Z")) + .updateTime(OffsetDateTime.parse("2023-04-24T03:06:17.109Z")) + .creator(Person.builder() + .name("") + .obfuscatedId("") + .metadata(PersonMetadata.builder() + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .build()) + .build()) + .updatedBy(Person.builder() + .name("") + .obfuscatedId("") + .metadata(PersonMetadata.builder() + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .build()) + .build()) + .itemCount(534236L) + .childCount(215291L) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("innocent downchange ick rudely what youthfully lightly yum") + .id(569914L) + .createTime(OffsetDateTime.parse("2023-02-12T07:51:20.736Z")) + .updateTime(OffsetDateTime.parse("2024-03-18T02:09:52.587Z")) + .creator(Person.builder() + .name("") + .obfuscatedId("") + .metadata(PersonMetadata.builder() + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .build()) + .build()) + .updatedBy(Person.builder() + .name("") + .obfuscatedId("") + .metadata(PersonMetadata.builder() + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .build()) + .build()) + .itemCount(771154L) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .destinationUrl("https://tight-version.org/") + .description("however generally ew ha sonar usually slow guacamole") + .unlisted(false) + .urlTemplate("") + .createdBy(Person.builder() + .name("") + .obfuscatedId("") + .build()) + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updatedBy(Person.builder() + .name("") + .obfuscatedId("") + .build()) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("") + .obfuscatedId("") + .metadata(PersonMetadata.builder() + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .build()) + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .question("") + .answer("") + .build()) + .disambiguation(Disambiguation.builder() + .name("") + .id("") + .type(EntityType.PERSON) + .build()) + .trackingToken("string") + .prominence(Prominence.HERO) + .source(StructuredResultSource.EXPERT_DETECTION) + .build())) + .trackingToken("string") + .text("string") + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .file(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .metadata(ChatFileMetadata.builder() + .status(ChatFileStatus.PROCESSING) + .uploadTime(0L) + .processedSize(0L) + .failureReason(ChatFileFailureReason.PARSE_FAILED) + .mimeType("string") + .build()) + .build()) + .action(ToolInfo.builder() + .metadata(ToolMetadata.builder() + .type(ToolMetadataType.RETRIEVAL) + .name("string") + .displayName("string") + .displayDescription("string") + .toolId("string") + .logoUrl("string") + .objectName("[\"HR ticket\",\"Email\",\"Chat message\"]") + .knowledgeType(KnowledgeType.NEUTRAL_KNOWLEDGE) + .createdBy(PersonObject.builder() + .name("") + .obfuscatedId("") + .build()) + .lastUpdatedBy(PersonObject.builder() + .name("") + .obfuscatedId("") + .build()) + .createdAt(OffsetDateTime.parse("2019-08-24T14:15:22Z")) + .lastUpdatedAt(OffsetDateTime.parse("2019-08-24T14:15:22Z")) + .writeActionType(WriteActionType.REDIRECT) + .authType(AuthType.NONE) + .auth(AuthConfig.builder() + .isOnPrem(true) + .usesCentralAuth(false) + .type(AuthConfigType.DWD) + .grantType(GrantType.AUTH_CODE) + .status(AuthConfigStatus.AUTHORIZED) + .clientUrl("https://woeful-trench.com/") + .authorizationUrl("https://imaginative-premium.com/") + .lastAuthorizedAt(OffsetDateTime.parse("2023-12-19T20:03:14.149Z")) + .build()) + .permissions(ObjectPermissions.builder() + .build()) + .usageInstructions("string") + .isSetupFinished(true) + .build()) + .parameters(Map.ofEntries( + Map.entry("property1", WriteActionParameter.builder() + .type(WriteActionParameterType.UNKNOWN) + .displayName("Shemar63") + .value("") + .isRequired(true) + .description("handle unlike unlike fen gently or exotic mortally nor") + .build()), + Map.entry("property2", WriteActionParameter.builder() + .type(WriteActionParameterType.STRING) + .displayName("Ahmad_Reichel95") + .value("") + .isRequired(false) + .description("mmm premise pro instead bleakly starch including per ill-fated") + .build()))) + .build()) + .build())) + .ts("string") + .messageId("string") + .messageTrackingToken("string") + .messageType(MessageType.UPDATE) + .hasMoreFragments(true) + .build())) + .build()) + .trackingToken("string") + .build()) + .build(), + res.getChatResponse().get()); + } + + @Test + public void testClientChat_Listchats() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("listchats"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ListchatsResponse res = sdk.client().chat().list() + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + ListChatsResponse.builder() + .chatResults(List.of( + ChatMetadataResult.builder() + .chat(ChatMetadata.builder() + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(177706L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(152837L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("accountability pish likewise") + .id(425334L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(480616L) + .itemType(CollectionItemItemType.DOCUMENT) + .build(), + CollectionItem.builder() + .collectionId(523875L) + .itemType(CollectionItemItemType.COLLECTION) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build())) + .build(), + Collection.builder() + .name("") + .description("safely briefly ugh fen") + .id(96709L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(5229L) + .build(), + Share.builder() + .numDaysAgo(810770L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(505778L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(948614L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(900109L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(20615L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(726700L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .icon(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build(), + ChatMetadataResult.builder() + .chat(ChatMetadata.builder() + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .icon(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build(), + ChatMetadataResult.builder() + .chat(ChatMetadata.builder() + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .icon(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build())) + .build(), + res.listChatsResponse().get()); + } + + @Test + public void testClientChat_Getchatapplication() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getchatapplication"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetchatapplicationResponse res = sdk.client().chat().retrieveApplication() + .getChatApplicationRequest(GetChatApplicationRequest.builder() + .id("") + .build()) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetChatApplicationResponse.builder() + .build(), + res.getChatApplicationResponse().get()); + } + + @Test + public void testClientChat_Getchatfiles() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getchatfiles"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetchatfilesResponse res = sdk.client().chat().retrieveFiles() + .getChatFilesRequest(GetChatFilesRequest.builder() + .fileIds(List.of( + "", + "")) + .build()) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetChatFilesResponse.builder() + .files(Map.ofEntries( + Map.entry("key", ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()), + Map.entry("key1", ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()), + Map.entry("key2", ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()))) + .build(), + res.getChatFilesResponse().get()); + } + + @Test + public void testClientChat_Deletechatfiles() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("deletechatfiles"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeletechatfilesResponse res = sdk.client().chat().deleteFiles() + .deleteChatFilesRequest(DeleteChatFilesRequest.builder() + .fileIds(List.of( + "")) + .build()) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testClientChat_ChatStreamDefaultExample() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("chatStream-defaultExample"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ChatStreamResponse res = sdk.client().chat().createStream() + .chatRequest(ChatRequest.builder() + .messages(List.of( + ChatMessage.builder() + .fragments(List.of( + ChatMessageFragment.builder() + .text("What are the company holidays this year?") + .build())) + .build())) + .build()) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + "{\"messages\":[{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"hasMoreFragments\":false,\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\"},\"fragments\":[{\"text\":\"There are no holidays!\"}]}]}", + res.chatRequestStream().get()); + } + + @Test + public void testClientChat_ChatStreamGptAgentExample() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("chatStream-gptAgentExample"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ChatStreamResponse res = sdk.client().chat().createStream() + .chatRequest(ChatRequest.builder() + .messages(List.of( + ChatMessage.builder() + .fragments(List.of( + ChatMessageFragment.builder() + .text("Who was the first person to land on the moon?") + .build())) + .build())) + .agentConfig(AgentConfig.builder() + .agent(AgentEnum.GPT) + .build()) + .build()) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + "", + res.chatRequestStream().get()); + } + + @Test + public void testClientChat_ChatStreamStreamingExample() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("chatStream-streamingExample"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ChatStreamResponse res = sdk.client().chat().createStream() + .chatRequest(ChatRequest.builder() + .messages(List.of()) + .timeoutMillis(30000L) + .build()) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + "{\"messages\":[{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\",\"hasMoreFragments\":true},\"fragments\":null},{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\",\"hasMoreFragments\":true},\"fragments\":null},{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\",\"hasMoreFragments\":true},\"fragments\":[{\"text\":\"e are\"}]},{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\",\"hasMoreFragments\":true},\"fragments\":[{\"text\":\"no hol\"}]},{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\",\"hasMoreFragments\":false},\"fragments\":[{\"text\":\"idays!\"}]}]}", + res.chatRequestStream().get()); + } + + @Test + public void testClientChat_ChatStreamUpdateResponse() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("chatStream-updateResponse"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ChatStreamResponse res = sdk.client().chat().createStream() + .chatRequest(ChatRequest.builder() + .messages(List.of( + ChatMessage.builder() + .citations(List.of( + ChatMessageCitation.builder() + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .sourceFile(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .sourcePerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .referenceRanges(List.of( + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(485333L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(159062L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(369746L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .fragments(List.of( + ChatMessageFragment.builder() + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .poc(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .members(List.of( + PersonToTeamRelationship.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + PersonToTeamRelationship.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + PersonToTeamRelationship.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValuePerson.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .build())) + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of( + AnswerLike.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .likedByUser(false) + .numLikes(490380L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(646506L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(14111L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(911718L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(997948L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("stage atop minion which best sturdy enormously afore circumference duh") + .id(647529L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("wring blank who sate woot") + .id(370683L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(836170L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(743315L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .build())) + .build(), + Collection.builder() + .name("") + .description("keenly until phew veto calculus") + .id(140813L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .people(List.of( + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("veg welcome boss manage freely") + .id(79387L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("after er grouchy stained plus buck") + .id(668238L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .build())) + .relatedQuestion(RelatedQuestion.builder() + .ranges(List.of( + TextRange.builder() + .startIndex(1054L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .build()) + .build())) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .file(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .action(ToolInfo.builder() + .metadata(ToolMetadata.builder() + .type(ToolMetadataType.RETRIEVAL) + .name("") + .displayName("Brianne.OReilly19") + .displayDescription("") + .objectName("[\"HR ticket\",\"Email\",\"Chat message\"]") + .build()) + .build()) + .build(), + ChatMessageFragment.builder() + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(370922L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(605L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("finally waist inasmuch woot ignorance") + .id(291881L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("even metal boo blindly for steak gadzooks ick monthly heating") + .id(833343L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("geez huzzah oof webbed certainly degenerate along inure cow zowie") + .id(656491L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build())) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .file(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .action(ToolInfo.builder() + .metadata(ToolMetadata.builder() + .type(ToolMetadataType.ACTION) + .name("") + .displayName("Elinor_Champlin") + .displayDescription("") + .objectName("[\"HR ticket\",\"Email\",\"Chat message\"]") + .build()) + .build()) + .build(), + ChatMessageFragment.builder() + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(86395L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(612122L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("the across instead into aching where descent shark lest times") + .id(760885L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("woefully optimal beside tame") + .id(750557L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("impanel hydrant spectacles justly hence absolve after sleet drat") + .id(603732L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(226392L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(130628L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("amongst uh-huh reassemble upset concrete") + .id(911324L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("behind boyfriend slime nor") + .id(146903L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("psst um devil gazebo save") + .id(45693L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(654201L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(804029L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("except gadzooks geez") + .id(567840L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("aha hence nectarine within airbus so stylish while") + .id(376424L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("surprise outside whether ack") + .id(621220L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build())) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .file(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .action(ToolInfo.builder() + .metadata(ToolMetadata.builder() + .type(ToolMetadataType.RETRIEVAL) + .name("") + .displayName("Chanel.Kshlerin") + .displayDescription("") + .objectName("[\"HR ticket\",\"Email\",\"Chat message\"]") + .build()) + .build()) + .build())) + .build(), + ChatMessage.builder() + .citations(List.of( + ChatMessageCitation.builder() + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .sourceFile(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .sourcePerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .referenceRanges(List.of( + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(537317L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(302109L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + ChatMessageCitation.builder() + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .sourceFile(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .sourcePerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .referenceRanges(List.of( + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(494612L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + ChatMessageCitation.builder() + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .sourceFile(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .sourcePerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .referenceRanges(List.of( + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(767229L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(437321L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(949459L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .fragments(List.of( + ChatMessageFragment.builder() + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(280784L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(764407L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("short-term suffice why rightfully") + .id(974132L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("times loudly upon dramatize") + .id(186567L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("er reconsideration triumphantly meaty yearly fragrant delightfully though painfully robust") + .id(804940L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(175872L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(922297L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("planula presume mismatch of commandeer ready mortally although") + .id(711093L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("phooey aw than proceed perky") + .id(365383L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("rundown recklessly favorite supposing dull politely soon ignorant") + .id(171217L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(447757L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(452627L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("striking confound wilderness but rapid an convection scoop litter than") + .id(569913L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("extra-large innocent impassioned stealthily yet gum onset blah second-hand") + .id(123250L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("meaty impure round") + .id(31007L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build())) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .file(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .action(ToolInfo.builder() + .metadata(ToolMetadata.builder() + .type(ToolMetadataType.ACTION) + .name("") + .displayName("Lauren53") + .displayDescription("") + .objectName("[\"HR ticket\",\"Email\",\"Chat message\"]") + .build()) + .build()) + .build(), + ChatMessageFragment.builder() + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(141476L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(146280L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("intrigue psst furthermore personalise actually showboat eek punctuation ownership ah") + .id(785749L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("irresponsible meanwhile supposing classic than loyalty before who") + .id(362665L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("colorfully aha where") + .id(673010L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(932912L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(10437L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("hence inquisitively proud meh yahoo") + .id(165945L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("indeed enthusiastically airman facilitate") + .id(52239L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("excluding severe amongst bump farm zowie prickly why") + .id(617911L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(126508L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(504638L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("approach hm gadzooks yahoo shameless underneath negative") + .id(111255L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("jogging however inwardly yahoo although bah monthly lively colorfully justly") + .id(656993L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("guidance zen cross-contamination ick pry mundane thoroughly oof ha") + .id(474526L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build())) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .file(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .action(ToolInfo.builder() + .metadata(ToolMetadata.builder() + .type(ToolMetadataType.ACTION) + .name("") + .displayName("Brooklyn64") + .displayDescription("") + .objectName("[\"HR ticket\",\"Email\",\"Chat message\"]") + .build()) + .build()) + .build())) + .build())) + .timeoutMillis(30000L) + .build()) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + "{\"messages\":[{\"author\":\"GLEAN_AI\",\"messageType\":\"UPDATE\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\"},\"fragments\":[{\"text\":\"**Reading:**\"},{\"structuredResults\":[{\"document\":{\"id\":\"123\",\"title\":\"Company Handbook\"}}]}]}]}", + res.chatRequestStream().get()); + } + + @Test + public void testClientChat_ChatStreamCitationResponse() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("chatStream-citationResponse"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ChatStreamResponse res = sdk.client().chat().createStream() + .chatRequest(ChatRequest.builder() + .messages(List.of( + ChatMessage.builder() + .citations(List.of( + ChatMessageCitation.builder() + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .sourceFile(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .sourcePerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .referenceRanges(List.of( + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(436071L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(735937L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + ChatMessageCitation.builder() + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .sourceFile(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .sourcePerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .referenceRanges(List.of( + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(418969L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(510246L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(760612L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .fragments(List.of( + ChatMessageFragment.builder() + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .poc(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .members(List.of( + PersonToTeamRelationship.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + PersonToTeamRelationship.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValuePerson.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()), + CustomFieldValue.of(CustomFieldValuePerson.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()), + CustomFieldValue.of(CustomFieldValuePerson.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()))) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .build())) + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(181994L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(670162L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(690554L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(424843L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("extent emotional white oil buck") + .id(392138L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("an french sans astride duh dreamily weary disloyal woot eke") + .id(928199L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(574875L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(447663L) + .itemType(CollectionItemItemType.URL) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(60642L) + .itemType(CollectionItemItemType.TEXT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .build())) + .build())) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .people(List.of( + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("matter lest spark oof unfurl jubilantly across") + .id(194535L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("communicate prudent powerful considering quietly with tromp spring brr") + .id(595008L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build())) + .build())) + .relatedQuestion(RelatedQuestion.builder() + .ranges(List.of( + TextRange.builder() + .startIndex(516098L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(358039L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .build()) + .build())) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .file(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .action(ToolInfo.builder() + .metadata(ToolMetadata.builder() + .type(ToolMetadataType.RETRIEVAL) + .name("") + .displayName("Blaise87") + .displayDescription("") + .objectName("[\"HR ticket\",\"Email\",\"Chat message\"]") + .build()) + .build()) + .build(), + ChatMessageFragment.builder() + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(982657L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(668662L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("materialise likewise ew bah scarper instead") + .id(291792L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("whup bah scarcely on although royal") + .id(535445L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("heavenly status yippee whose blushing") + .id(983667L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(118326L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(427120L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("manipulate explode out") + .id(605176L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("bus outrun boldly opposite") + .id(512474L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("complete help um live beyond for huzzah rowdy foot cross") + .id(402862L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(62815L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(934490L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("lobotomise below psst duh interchange poetry") + .id(521402L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("fooey handle supposing greedily contrail whenever geez yahoo broadcast") + .id(175510L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("fashion bleakly thankfully indeed fully") + .id(723852L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build())) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .file(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .action(ToolInfo.builder() + .metadata(ToolMetadata.builder() + .type(ToolMetadataType.RETRIEVAL) + .name("") + .displayName("Alfred_Wilderman") + .displayDescription("") + .objectName("[\"HR ticket\",\"Email\",\"Chat message\"]") + .build()) + .build()) + .build())) + .build(), + ChatMessage.builder() + .citations(List.of( + ChatMessageCitation.builder() + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .sourceFile(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .sourcePerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .referenceRanges(List.of( + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(222131L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(453578L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(137281L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .fragments(List.of( + ChatMessageFragment.builder() + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(569501L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(873746L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("minus oof dazzling ew for forearm utterly hm onto unexpectedly") + .id(808814L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("through garrote nor") + .id(999094L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("elderly since boohoo appropriate righteously vice following complete impartial sans") + .id(315292L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(610289L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(46078L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("netsuke stump terrorise ugh zowie") + .id(942095L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("cheetah amid lest nor instead consequently upbeat fuel incidentally") + .id(65448L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("abaft tightly blah redound qua") + .id(843154L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(25770L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(103920L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("gratefully failing square consequently discourse since") + .id(139991L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("futon geez oof coolly selfishly proselytise lest fooey and") + .id(455101L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("able mockingly boo entice softly furthermore woeful") + .id(33669L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build())) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .file(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .action(ToolInfo.builder() + .metadata(ToolMetadata.builder() + .type(ToolMetadataType.ACTION) + .name("") + .displayName("Dylan_Schowalter48") + .displayDescription("") + .objectName("[\"HR ticket\",\"Email\",\"Chat message\"]") + .build()) + .build()) + .build())) + .build(), + ChatMessage.builder() + .citations(List.of( + ChatMessageCitation.builder() + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .sourceFile(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .sourcePerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .referenceRanges(List.of( + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(171021L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(383744L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + ChatMessageCitation.builder() + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .sourceFile(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .sourcePerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .referenceRanges(List.of( + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(343186L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(227225L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(55034L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + ChatMessageCitation.builder() + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .sourceFile(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .sourcePerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .referenceRanges(List.of( + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(935065L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + ReferenceRange.builder() + .textRange(TextRange.builder() + .startIndex(816251L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .fragments(List.of( + ChatMessageFragment.builder() + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(251149L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(23422L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("affiliate who lamp blushing plait after violent") + .id(55380L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("thankfully bliss merge inside without regarding how endow") + .id(420468L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("gee edge scholarship") + .id(632878L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(18033L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(807925L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("rust forenenst phew immediately") + .id(277574L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("till likewise boiling yesterday gah upward brr") + .id(377350L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("blah lowball who moor following folklore as or") + .id(115719L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(591310L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(265693L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("among under although ack gee atop horn") + .id(170010L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("owlishly genuine woot ocelot nor next") + .id(754074L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("finally jaggedly nightlife surface") + .id(435267L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build())) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .file(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .action(ToolInfo.builder() + .metadata(ToolMetadata.builder() + .type(ToolMetadataType.ACTION) + .name("") + .displayName("Solon.Schmitt10") + .displayDescription("") + .objectName("[\"HR ticket\",\"Email\",\"Chat message\"]") + .build()) + .build()) + .build(), + ChatMessageFragment.builder() + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(464085L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(197253L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("ah once gee") + .id(785222L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("toe yowza yum soon hypothesize") + .id(655575L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("godparent before colorize") + .id(624868L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(439860L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(257885L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("uh-huh ha notwithstanding so near troubled onto volunteer hm") + .id(38370L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("for now role baseboard woot entrench") + .id(816883L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("meanwhile instead colorfully overheard") + .id(209097L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(true) + .numLikes(788886L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(820471L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("indelible aha yuck loyally") + .id(278807L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("throughout though reluctantly healthily furlough minister unique simple over sidetrack") + .id(316354L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("frequent aw above ultimate into till pish husky wetly agitated") + .id(744434L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .shortcut(Shortcut.builder() + .inputAlias("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .destinationDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build())) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build()) + .file(ChatFile.builder() + .id("FILE_1234") + .url("www.google.com") + .name("sample.pdf") + .build()) + .action(ToolInfo.builder() + .metadata(ToolMetadata.builder() + .type(ToolMetadataType.ACTION) + .name("") + .displayName("Nannie.McDermott") + .displayDescription("") + .objectName("[\"HR ticket\",\"Email\",\"Chat message\"]") + .build()) + .build()) + .build())) + .build())) + .timeoutMillis(30000L) + .build()) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + "{\"messages\":[{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\"},\"citations\":[{\"sourceDocument\":{\"id\":\"123\",\"title\":\"Company Handbook\",\"referenceRanges\":[{\"textRange\":{\"startIndex\":0,\"endIndex\":12,\"type\":\"CITATION\"}}]}}]}]}", + res.chatRequestStream().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/ClientDocumentsTests.java b/src/test/java/com/glean/api_client/glean_api_client/ClientDocumentsTests.java new file mode 100644 index 00000000..118ba0a8 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/ClientDocumentsTests.java @@ -0,0 +1,1403 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.DocumentOrErrorUnion; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.GetDocPermissionsRequest; +import com.glean.api_client.glean_api_client.models.components.GetDocPermissionsResponse; +import com.glean.api_client.glean_api_client.models.components.GetDocumentsByFacetsRequest; +import com.glean.api_client.glean_api_client.models.components.GetDocumentsByFacetsResponse; +import com.glean.api_client.glean_api_client.models.components.GetDocumentsResponse; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.operations.GetdocpermissionsResponse; +import com.glean.api_client.glean_api_client.models.operations.GetdocumentsResponse; +import com.glean.api_client.glean_api_client.models.operations.GetdocumentsbyfacetsResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class ClientDocumentsTests { + + @Test + public void testClientDocuments_Getdocpermissions() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getdocpermissions"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetDocPermissionsRequest req = GetDocPermissionsRequest.builder() + .build(); + + GetdocpermissionsResponse res = sdk.client().documents().retrievePermissions() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetDocPermissionsResponse.builder() + .build(), + res.getDocPermissionsResponse().get()); + } + + @Test + public void testClientDocuments_Getdocuments() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getdocuments"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetdocumentsResponse res = sdk.client().documents().retrieve() + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetDocumentsResponse.builder() + .documents(Map.ofEntries( + Map.entry("key", DocumentOrErrorUnion.of(Document.builder() + .build())), + Map.entry("key1", DocumentOrErrorUnion.of(Document.builder() + .build())), + Map.entry("key2", DocumentOrErrorUnion.of(Document.builder() + .build())))) + .build(), + res.getDocumentsResponse().get()); + } + + @Test + public void testClientDocuments_Getdocumentsbyfacets() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getdocumentsbyfacets"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetDocumentsByFacetsRequest req = GetDocumentsByFacetsRequest.builder() + .filterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .build(); + + GetdocumentsbyfacetsResponse res = sdk.client().documents().retrieveByFacets() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetDocumentsByFacetsResponse.builder() + .documents(List.of( + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(847689L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(244762L) + .build(), + TextRange.builder() + .startIndex(577503L) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(946448L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .mentionedPeople(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("since unlike huzzah chunder ignite loftily bar circa flame") + .id(327937L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(69838L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(996681L) + .itemType(CollectionItemItemType.TEXT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(480101L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .reactors(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(414155L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(818513L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(511688L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build())) + .build(), + res.getDocumentsByFacetsResponse().get()); + } + + @Test + public void testClientDocuments_Getdocumentanalytics() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step getdocumentanalytics.test referencing operation getdocumentanalytics not found in document`]"); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/ClientShortcutsTests.java b/src/test/java/com/glean/api_client/glean_api_client/ClientShortcutsTests.java new file mode 100644 index 00000000..601a3558 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/ClientShortcutsTests.java @@ -0,0 +1,1379 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.CreateShortcutRequest; +import com.glean.api_client.glean_api_client.models.components.CreateShortcutResponse; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.DeleteShortcutRequest; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.FacetBucket; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.FacetResult; +import com.glean.api_client.glean_api_client.models.components.FacetValue; +import com.glean.api_client.glean_api_client.models.components.GetShortcutRequest; +import com.glean.api_client.glean_api_client.models.components.GetShortcutRequestUnion; +import com.glean.api_client.glean_api_client.models.components.GetShortcutResponse; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.ListShortcutsPaginatedRequest; +import com.glean.api_client.glean_api_client.models.components.ListShortcutsPaginatedResponse; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.Shortcut; +import com.glean.api_client.glean_api_client.models.components.ShortcutMutableProperties; +import com.glean.api_client.glean_api_client.models.components.ShortcutsPaginationMetadata; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.UpdateShortcutRequest; +import com.glean.api_client.glean_api_client.models.components.UpdateShortcutResponse; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.operations.CreateshortcutResponse; +import com.glean.api_client.glean_api_client.models.operations.DeleteshortcutResponse; +import com.glean.api_client.glean_api_client.models.operations.GetshortcutResponse; +import com.glean.api_client.glean_api_client.models.operations.ListshortcutsResponse; +import com.glean.api_client.glean_api_client.models.operations.UpdateshortcutResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class ClientShortcutsTests { + + @Test + public void testClientShortcuts_Createshortcut() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("createshortcut"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + CreateShortcutRequest req = CreateShortcutRequest.builder() + .data(ShortcutMutableProperties.builder() + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(134365L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(796474L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("fumigate convection though zowie") + .id(496323L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(782367L) + .itemType(CollectionItemItemType.DOCUMENT) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(219974L) + .build(), + Share.builder() + .numDaysAgo(449221L) + .build(), + Share.builder() + .numDaysAgo(427887L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(491427L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(490420L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(45416L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .build(); + + CreateshortcutResponse res = sdk.client().shortcuts().create() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + CreateShortcutResponse.builder() + .build(), + res.createShortcutResponse().get()); + } + + @Test + public void testClientShortcuts_Deleteshortcut() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("deleteshortcut"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeleteShortcutRequest req = DeleteShortcutRequest.builder() + .id(545907L) + .build(); + + DeleteshortcutResponse res = sdk.client().shortcuts().delete() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testClientShortcuts_Getshortcut() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getshortcut"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetShortcutRequestUnion req = GetShortcutRequestUnion.of(GetShortcutRequest.builder() + .alias("") + .build()); + + GetshortcutResponse res = sdk.client().shortcuts().retrieve() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetShortcutResponse.builder() + .build(), + res.getShortcutResponse().get()); + } + + @Test + public void testClientShortcuts_Getsimilarshortcuts() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step getsimilarshortcuts.test referencing operation getsimilarshortcuts not found in document`]"); + } + + @Test + public void testClientShortcuts_Listshortcuts() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("listshortcuts"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ListShortcutsPaginatedRequest req = ListShortcutsPaginatedRequest.builder() + .pageSize(10L) + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(); + + ListshortcutsResponse res = sdk.client().shortcuts().list() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + ListShortcutsPaginatedResponse.builder() + .shortcuts(List.of( + Shortcut.builder() + .inputAlias("") + .destinationUrl("https://remorseful-concentration.biz") + .createdBy(Person.builder() + .name("") + .obfuscatedId("") + .build()) + .build(), + Shortcut.builder() + .inputAlias("") + .destinationUrl("https://primary-paintwork.com/") + .createdBy(Person.builder() + .name("") + .obfuscatedId("") + .build()) + .build(), + Shortcut.builder() + .inputAlias("") + .destinationUrl("https://breakable-bathrobe.net") + .createdBy(Person.builder() + .name("") + .obfuscatedId("") + .build()) + .build())) + .meta(ShortcutsPaginationMetadata.builder() + .build()) + .facetResults(List.of( + FacetResult.builder() + .sourceName("container_name") + .operatorName("SelectMultiple") + .buckets(List.of( + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build(), + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build())) + .hasMoreBuckets(false) + .groupName("Service Cloud") + .build(), + FacetResult.builder() + .sourceName("container_name") + .operatorName("SelectMultiple") + .buckets(List.of( + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build())) + .hasMoreBuckets(false) + .groupName("Service Cloud") + .build())) + .build(), + res.listShortcutsPaginatedResponse().get()); + } + + @Test + public void testClientShortcuts_Previewshortcut() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step previewshortcut.test referencing operation previewshortcut not found in document`]"); + } + + @Test + public void testClientShortcuts_Updateshortcut() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("updateshortcut"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + UpdateShortcutRequest req = UpdateShortcutRequest.builder() + .id(857478L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(627690L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(984008L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("for drat underneath sticky yuck even") + .id(996168L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(392671L) + .itemType(CollectionItemItemType.TEXT) + .build(), + CollectionItem.builder() + .collectionId(434386L) + .itemType(CollectionItemItemType.COLLECTION) + .build())) + .build(), + Collection.builder() + .name("") + .description("duh now mechanically during since anxiously lightly ultimately") + .id(958595L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + Collection.builder() + .name("") + .description("whereas anenst habit onto worriedly revoke hm eminent sham") + .id(115263L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(691669L) + .build(), + Share.builder() + .numDaysAgo(202116L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(246216L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(778241L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(475618L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(234790L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(253591L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build(); + + UpdateshortcutResponse res = sdk.client().shortcuts().update() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + UpdateShortcutResponse.builder() + .build(), + res.updateShortcutResponse().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/ClientUserTests.java b/src/test/java/com/glean/api_client/glean_api_client/ClientUserTests.java new file mode 100644 index 00000000..a4e26630 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/ClientUserTests.java @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import java.lang.Exception; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class ClientUserTests { + + @Test + public void testClientUser_Addcredential() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step addcredential.test referencing operation addcredential not found in document`]"); + } + + @Test + public void testClientUser_Deletequeryhistory() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step deletequeryhistory.test referencing operation deletequeryhistory not found in document`]"); + } + + @Test + public void testClientUser_Invite() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step invite.test referencing operation invite not found in document`]"); + } + + @Test + public void testClientUser_Publicconfig() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step publicconfig.test referencing operation publicconfig not found in document`]"); + } + + @Test + public void testClientUser_Removecredential() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step removecredential.test referencing operation removecredential not found in document`]"); + } + + @Test + public void testClientUser_SupportEmail() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step support_email.test referencing operation support_email not found in document`]"); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/ClientVerificationTests.java b/src/test/java/com/glean/api_client/glean_api_client/ClientVerificationTests.java new file mode 100644 index 00000000..dcdf3d83 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/ClientVerificationTests.java @@ -0,0 +1,3199 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.ReminderRequest; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationFeed; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.components.VerifyRequest; +import com.glean.api_client.glean_api_client.models.operations.AddverificationreminderResponse; +import com.glean.api_client.glean_api_client.models.operations.ListverificationsResponse; +import com.glean.api_client.glean_api_client.models.operations.VerifyResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +public class ClientVerificationTests { + + @Test + public void testClientVerification_Addverificationreminder() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("addverificationreminder"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ReminderRequest req = ReminderRequest.builder() + .documentId("") + .build(); + + AddverificationreminderResponse res = sdk.client().verification().addReminder() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(310007L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(381872L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("ditch cruelly geez bah") + .id(922427L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(744290L) + .itemType(CollectionItemItemType.COLLECTION) + .build(), + CollectionItem.builder() + .collectionId(857658L) + .itemType(CollectionItemItemType.COLLECTION) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build())) + .build(), + Collection.builder() + .name("") + .description("unfortunately brr brr whereas object if frantically randomize contrail silently") + .id(571806L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(991839L) + .build())) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(431849L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(121811L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build(), + res.verification().get()); + } + + @Test + public void testClientVerification_Listverifications() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("listverifications"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ListverificationsResponse res = sdk.client().verification().list() + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + VerificationFeed.builder() + .documents(List.of( + Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(229716L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(635532L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("avalanche jungle unto meanwhile beside tromp worth reluctantly") + .id(294083L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(747562L) + .itemType(CollectionItemItemType.TEXT) + .build(), + CollectionItem.builder() + .collectionId(324206L) + .itemType(CollectionItemItemType.DOCUMENT) + .build(), + CollectionItem.builder() + .collectionId(678179L) + .itemType(CollectionItemItemType.TEXT) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(20615L) + .build(), + Share.builder() + .numDaysAgo(467775L) + .build(), + Share.builder() + .numDaysAgo(993677L) + .build())) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(406555L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(652326L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(370293L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(900911L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(424586L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(221489L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build(), + Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(277523L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(749833L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .build(), + res.verificationFeed().get()); + } + + @Test + public void testClientVerification_Verify() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("verify"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + VerifyRequest req = VerifyRequest.builder() + .documentId("") + .build(); + + VerifyResponse res = sdk.client().verification().verify() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(227138L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(394054L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("fiddle gee lightly these unique") + .id(248707L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(159863L) + .itemType(CollectionItemItemType.DOCUMENT) + .build(), + CollectionItem.builder() + .collectionId(725143L) + .itemType(CollectionItemItemType.DOCUMENT) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(638745L) + .build(), + Share.builder() + .numDaysAgo(331260L) + .build(), + Share.builder() + .numDaysAgo(759941L) + .build())) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(344155L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(851433L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(732097L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(510781L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(875373L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(740498L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build(), + res.verification().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/CollectionsTests.java b/src/test/java/com/glean/api_client/glean_api_client/CollectionsTests.java new file mode 100644 index 00000000..804746de --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/CollectionsTests.java @@ -0,0 +1,11831 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.AddCollectionItemsRequest; +import com.glean.api_client.glean_api_client.models.components.AddCollectionItemsResponse; +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.CreateCollectionRequest; +import com.glean.api_client.glean_api_client.models.components.CreateCollectionResponse; +import com.glean.api_client.glean_api_client.models.components.CreateCollectionResponseErrorCode; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.DeleteCollectionItemRequest; +import com.glean.api_client.glean_api_client.models.components.DeleteCollectionItemResponse; +import com.glean.api_client.glean_api_client.models.components.DeleteCollectionRequest; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.EditCollectionItemRequest; +import com.glean.api_client.glean_api_client.models.components.EditCollectionItemResponse; +import com.glean.api_client.glean_api_client.models.components.EditCollectionRequest; +import com.glean.api_client.glean_api_client.models.components.EditCollectionResponse; +import com.glean.api_client.glean_api_client.models.components.EditCollectionResponseErrorCode; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.GetCollectionRequest; +import com.glean.api_client.glean_api_client.models.components.GetCollectionResponse; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.ListCollectionsRequest; +import com.glean.api_client.glean_api_client.models.components.ListCollectionsResponse; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.operations.AddcollectionitemsResponse; +import com.glean.api_client.glean_api_client.models.operations.CreatecollectionResponse; +import com.glean.api_client.glean_api_client.models.operations.DeletecollectionResponse; +import com.glean.api_client.glean_api_client.models.operations.DeletecollectionitemResponse; +import com.glean.api_client.glean_api_client.models.operations.EditcollectionResponse; +import com.glean.api_client.glean_api_client.models.operations.EditcollectionitemResponse; +import com.glean.api_client.glean_api_client.models.operations.GetcollectionResponse; +import com.glean.api_client.glean_api_client.models.operations.ListcollectionsResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class CollectionsTests { + + @Test + public void testCollections_Addcollectionitems() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("addcollectionitems"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + AddCollectionItemsRequest req = AddCollectionItemsRequest.builder() + .collectionId(6460.15) + .build(); + + AddcollectionitemsResponse res = sdk.client().collections().addItems() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + AddCollectionItemsResponse.builder() + .collection(Collection.builder() + .name("") + .description("greedily indeed marten whereas rebel expansion") + .id(978832L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(759858L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(976421L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(649696L) + .build(), + Share.builder() + .numDaysAgo(970396L) + .build(), + Share.builder() + .numDaysAgo(288210L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(489899L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(168446L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(390252L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(283321L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(869836L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(102608L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(289582L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(569138L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(573370L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(542921L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(357599L) + .itemType(CollectionItemItemType.COLLECTION) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(477688L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .build(), + res.addCollectionItemsResponse().get()); + } + + @Test + public void testCollections_Createcollection() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("createcollection"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + CreateCollectionRequest req = CreateCollectionRequest.builder() + .name("") + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(134365L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(796474L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("fumigate convection though zowie") + .id(496323L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(782367L) + .itemType(CollectionItemItemType.DOCUMENT) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(219974L) + .build(), + Share.builder() + .numDaysAgo(449221L) + .build(), + Share.builder() + .numDaysAgo(427887L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(491427L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(490420L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(45416L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(); + + CreatecollectionResponse res = sdk.client().collections().create() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + CreateCollectionResponse.builder() + .name("") + .description("mentor early miserly stealthily without trick yahoo until planula") + .id(48554L) + .errorCode(CreateCollectionResponseErrorCode.CONCURRENT_HIERARCHY_EDIT) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(784768L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(913221L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("lobotomise apud overwork snuggle midst er how allocation") + .id(884414L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(312813L) + .itemType(CollectionItemItemType.COLLECTION) + .build(), + CollectionItem.builder() + .collectionId(903800L) + .itemType(CollectionItemItemType.URL) + .build())) + .build(), + Collection.builder() + .name("") + .description("given satisfy majority pace however crocodile yowza knowingly abaft") + .id(426375L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + Collection.builder() + .name("") + .description("failing white accompany whoever treasure") + .id(310702L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(446521L) + .build(), + Share.builder() + .numDaysAgo(909366L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(493315L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(778851L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(468734L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(307079L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(300662L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(488177L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(678847L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(913385L) + .itemType(CollectionItemItemType.COLLECTION) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(816391L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("grade underachieve secret") + .id(772467L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(611865L) + .itemType(CollectionItemItemType.URL) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(488022L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("except solace fat whoa braid factorise apud generally out") + .id(560003L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build())) + .children(List.of( + Collection.builder() + .name("") + .description("sweetly however whoever zowie wherever vivaciously") + .id(118148L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Collection.builder() + .name("") + .description("shinny ugh sheepishly mmm queasily factorize arrogantly") + .id(754554L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .collection(Collection.builder() + .name("") + .description("adventurously given mean alienated geez than ack bah") + .id(958816L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build(), + res.createCollectionResponse().get()); + } + + @Test + public void testCollections_Deletecollection() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("deletecollection"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeleteCollectionRequest req = DeleteCollectionRequest.builder() + .ids(List.of( + 698486L, + 386564L)) + .build(); + + DeletecollectionResponse res = sdk.client().collections().delete() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testCollections_Deletecollectionitem() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("deletecollectionitem"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeleteCollectionItemRequest req = DeleteCollectionItemRequest.builder() + .collectionId(1357.59) + .itemId("") + .build(); + + DeletecollectionitemResponse res = sdk.client().collections().deleteItem() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + DeleteCollectionItemResponse.builder() + .collection(Collection.builder() + .name("") + .description("up nice seafood") + .id(260387L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(735937L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(663050L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(934663L) + .build(), + Share.builder() + .numDaysAgo(307207L) + .build(), + Share.builder() + .numDaysAgo(246264L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(835281L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(239964L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(784251L) + .itemType(CollectionItemItemType.COLLECTION) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(501323L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(220432L) + .itemType(CollectionItemItemType.URL) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(187266L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(16069L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(696999L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .build(), + res.deleteCollectionItemResponse().get()); + } + + @Test + public void testCollections_Editcollection() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("editcollection"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + EditCollectionRequest req = EditCollectionRequest.builder() + .name("") + .id(720396L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(991464L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(488852L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("eulogise whereas till mild than during meanwhile disapprove finer ha") + .id(2984L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(477967L) + .itemType(CollectionItemItemType.URL) + .build(), + CollectionItem.builder() + .collectionId(813577L) + .itemType(CollectionItemItemType.TEXT) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(301848L) + .build(), + Share.builder() + .numDaysAgo(657278L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(335191L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(532806L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(556706L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(416023L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(967252L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of()) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(); + + EditcollectionResponse res = sdk.client().collections().update() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + EditCollectionResponse.builder() + .name("") + .description("urgently voluntarily scale gut") + .id(595467L) + .errorCode(EditCollectionResponseErrorCode.NAME_EXISTS) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(643119L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(553539L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("exotic fussy shadowy") + .id(224552L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(774530L) + .itemType(CollectionItemItemType.DOCUMENT) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(115263L) + .build(), + Share.builder() + .numDaysAgo(925954L) + .build(), + Share.builder() + .numDaysAgo(538720L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(318637L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(219050L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(762098L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(619716L) + .itemType(CollectionItemItemType.TEXT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(22113L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("queasily down worthy generously than narrate pish off") + .id(567572L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build())) + .children(List.of( + Collection.builder() + .name("") + .description("since straight gadzooks pulp") + .id(89970L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .collection(Collection.builder() + .name("") + .description("ameliorate well political") + .id(151869L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build(), + res.editCollectionResponse().get()); + } + + @Test + public void testCollections_Editcollectionitem() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("editcollectionitem"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + EditCollectionItemRequest req = EditCollectionItemRequest.builder() + .collectionId(795203L) + .itemId("") + .build(); + + EditcollectionitemResponse res = sdk.client().collections().updateItem() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + EditCollectionItemResponse.builder() + .collection(Collection.builder() + .name("") + .description("where nasalise emphasize jealously appliance") + .id(559534L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(927066L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(702646L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(600927L) + .build(), + Share.builder() + .numDaysAgo(753737L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(841463L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(402252L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(286790L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(519565L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(90490L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(304041L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(299381L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(992935L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(788309L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(487486L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .build(), + res.editCollectionItemResponse().get()); + } + + @Test + public void testCollections_Editdocumentcollections() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step editdocumentcollections.test referencing operation editdocumentcollections not found in document`]"); + } + + @Test + public void testCollections_Getcollection() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getcollection"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetCollectionRequest req = GetCollectionRequest.builder() + .id(700347L) + .build(); + + GetcollectionResponse res = sdk.client().collections().retrieve() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetCollectionResponse.builder() + .collection(Collection.builder() + .name("") + .description("for carefully glorious scrabble ignite aw showboat") + .id(168726L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(607679L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(397483L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(392574L) + .build(), + Share.builder() + .numDaysAgo(908293L) + .build(), + Share.builder() + .numDaysAgo(754054L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(149108L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(741131L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(503671L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(486669L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(81373L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(165215L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(666980L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(25042L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(491026L) + .itemType(CollectionItemItemType.URL) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(844917L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .rootCollection(Collection.builder() + .name("") + .description("aw fibre hassle freezing but conversation under") + .id(22258L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build(), + res.getCollectionResponse().get()); + } + + @Test + public void testCollections_Listcollections() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("listcollections"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ListCollectionsRequest req = ListCollectionsRequest.builder() + .build(); + + ListcollectionsResponse res = sdk.client().collections().list() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + ListCollectionsResponse.builder() + .collections(List.of( + Collection.builder() + .name("") + .description("yuck accountability pish likewise excepting unimpressively quickly") + .id(29267L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(692918L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(838930L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(164965L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(777245L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(141764L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(664080L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(284580L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(544651L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(60868L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(993305L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(258945L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(408066L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(370293L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(900911L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(462343L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build(), + Collection.builder() + .name("") + .description("massive sorrowful aw") + .id(314888L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Collection.builder() + .name("") + .description("merrily wherever failing orchestrate lest") + .id(895039L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build(), + res.listCollectionsResponse().get()); + } + + @Test + public void testCollections_Movecollectionitem() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step movecollectionitem.test referencing operation movecollectionitem not found in document`]"); + } + + @Test + public void testCollections_Pincollection() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step pincollection.test referencing operation pincollection not found in document`]"); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/DatasourcesTests.java b/src/test/java/com/glean/api_client/glean_api_client/DatasourcesTests.java new file mode 100644 index 00000000..1d8c21da --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/DatasourcesTests.java @@ -0,0 +1,100 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.CustomDatasourceConfig; +import com.glean.api_client.glean_api_client.models.components.DatasourceCategory; +import com.glean.api_client.glean_api_client.models.components.GetDatasourceConfigRequest; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.Quicklink; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1AdddatasourceResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1GetdatasourceconfigResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.util.List; +import org.junit.jupiter.api.Test; + +public class DatasourcesTests { + + @Test + public void testDatasources_PostApiIndexV1Adddatasource() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/adddatasource"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + CustomDatasourceConfig req = CustomDatasourceConfig.builder() + .name("") + .urlRegex("https://example-company.datasource.com/.*") + .quicklinks(List.of( + Quicklink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build(), + Quicklink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build(); + + PostApiIndexV1AdddatasourceResponse res = sdk.indexing().datasources().add() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testDatasources_PostApiIndexV1Getdatasourceconfig() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/getdatasourceconfig"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetDatasourceConfigRequest req = GetDatasourceConfigRequest.builder() + .datasource("") + .build(); + + PostApiIndexV1GetdatasourceconfigResponse res = sdk.indexing().datasources().retrieveConfig() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + CustomDatasourceConfig.builder() + .name("") + .datasourceCategory(DatasourceCategory.UNCATEGORIZED) + .urlRegex("https://example-company.datasource.com/.*") + .quicklinks(List.of( + Quicklink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .trustUrlRegexForViewActivity(true) + .stripFragmentInCanonicalUrl(true) + .isEntityDatasource(false) + .isTestDatasource(false) + .build(), + res.customDatasourceConfig().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/DisplayablelistsTests.java b/src/test/java/com/glean/api_client/glean_api_client/DisplayablelistsTests.java new file mode 100644 index 00000000..6a80d5e1 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/DisplayablelistsTests.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import java.lang.Exception; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class DisplayablelistsTests { + + @Test + public void testDisplayablelists_Createdisplayablelists() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step createdisplayablelists.test referencing operation createdisplayablelists not found in document`]"); + } + + @Test + public void testDisplayablelists_Deletedisplayablelists() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step deletedisplayablelists.test referencing operation deletedisplayablelists not found in document`]"); + } + + @Test + public void testDisplayablelists_Getdisplayablelists() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step getdisplayablelists.test referencing operation getdisplayablelists not found in document`]"); + } + + @Test + public void testDisplayablelists_Updatedisplayablelists() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step updatedisplayablelists.test referencing operation updatedisplayablelists not found in document`]"); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/EntitiesTests.java b/src/test/java/com/glean/api_client/glean_api_client/EntitiesTests.java new file mode 100644 index 00000000..994ac22e --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/EntitiesTests.java @@ -0,0 +1,2264 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomEntity; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.FacetBucket; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.FacetResult; +import com.glean.api_client.glean_api_client.models.components.FacetValue; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.ListEntitiesRequest; +import com.glean.api_client.glean_api_client.models.components.ListEntitiesResponse; +import com.glean.api_client.glean_api_client.models.components.PeopleRequest; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PersonToTeamRelationship; +import com.glean.api_client.glean_api_client.models.components.PersonToTeamRelationshipRelationship; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.Team; +import com.glean.api_client.glean_api_client.models.components.TeamStatus; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.operations.ListentitiesResponse; +import com.glean.api_client.glean_api_client.models.operations.PeopleResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class EntitiesTests { + + @Test + public void testEntities_Listentities() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("listentities"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ListEntitiesRequest req = ListEntitiesRequest.builder() + .filter(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .pageSize(100L) + .build(); + + ListentitiesResponse res = sdk.client().entities().list() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + ListEntitiesResponse.builder() + .results(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .teamResults(List.of( + Team.builder() + .id("") + .name("") + .members(List.of( + PersonToTeamRelationship.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(229716L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(635532L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("avalanche jungle unto meanwhile beside tromp worth reluctantly") + .id(294083L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(747562L) + .itemType(CollectionItemItemType.TEXT) + .build(), + CollectionItem.builder() + .collectionId(324206L) + .itemType(CollectionItemItemType.DOCUMENT) + .build(), + CollectionItem.builder() + .collectionId(678179L) + .itemType(CollectionItemItemType.TEXT) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(20615L) + .build(), + Share.builder() + .numDaysAgo(467775L) + .build(), + Share.builder() + .numDaysAgo(993677L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(406555L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(29267L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(652326L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(688784L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(41398L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(329360L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .relationship(PersonToTeamRelationshipRelationship.MEMBER) + .build(), + PersonToTeamRelationship.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .relationship(PersonToTeamRelationshipRelationship.MEMBER) + .build())) + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .status(TeamStatus.PROCESSED) + .canBeDeleted(true) + .build(), + Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .status(TeamStatus.PROCESSED) + .canBeDeleted(true) + .build(), + Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .status(TeamStatus.PROCESSED) + .canBeDeleted(true) + .build())) + .customEntityResults(List.of( + CustomEntity.builder() + .build(), + CustomEntity.builder() + .build())) + .facetResults(List.of( + FacetResult.builder() + .sourceName("container_name") + .operatorName("SelectMultiple") + .buckets(List.of( + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build())) + .hasMoreBuckets(false) + .groupName("Service Cloud") + .build(), + FacetResult.builder() + .sourceName("container_name") + .operatorName("SelectMultiple") + .buckets(List.of( + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build())) + .hasMoreBuckets(false) + .groupName("Service Cloud") + .build())) + .build(), + res.listEntitiesResponse().get()); + } + + @Test + public void testEntities_People() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("people"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + PeopleRequest req = PeopleRequest.builder() + .obfuscatedIds(List.of( + "abc123", + "abc456")) + .build(); + + PeopleResponse res = sdk.client().entities().readPeople() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + com.glean.api_client.glean_api_client.models.components.PeopleResponse.builder() + .results(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(325985L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(5324L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .mentionedPeople(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("underneath whoa electronics tributary") + .id(544551L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(450370L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(574783L) + .itemType(CollectionItemItemType.TEXT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build(), + Collection.builder() + .name("") + .description("playfully heavy finally altruistic whenever er utter notwithstanding") + .id(372647L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Collection.builder() + .name("") + .description("boohoo analogy hm and rise weight") + .id(705939L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .reactors(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(406671L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(870639L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(945399L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(970028L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .build(), + res.peopleResponse().get()); + } + + @Test + public void testEntities_Teams() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step teams.test referencing operation teams not found in document`]"); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/IndexingAuthenticationTests.java b/src/test/java/com/glean/api_client/glean_api_client/IndexingAuthenticationTests.java new file mode 100644 index 00000000..4e3d3d89 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/IndexingAuthenticationTests.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.RotateTokenResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1RotatetokenResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import org.junit.jupiter.api.Test; + +public class IndexingAuthenticationTests { + + @Test + public void testIndexingAuthentication_PostApiIndexV1Rotatetoken() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/rotatetoken"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + PostApiIndexV1RotatetokenResponse res = sdk.indexing().authentication().rotateToken() + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + RotateTokenResponse.builder() + .build(), + res.rotateTokenResponse().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/IndexingDocumentsTests.java b/src/test/java/com/glean/api_client/glean_api_client/IndexingDocumentsTests.java new file mode 100644 index 00000000..e95cead5 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/IndexingDocumentsTests.java @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.BulkIndexDocumentsRequest; +import com.glean.api_client.glean_api_client.models.components.DeleteDocumentRequest; +import com.glean.api_client.glean_api_client.models.components.DocumentDefinition; +import com.glean.api_client.glean_api_client.models.components.IndexDocumentRequest; +import com.glean.api_client.glean_api_client.models.components.IndexDocumentsRequest; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1BulkindexdocumentsResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1DeletedocumentResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1IndexdocumentResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1IndexdocumentsResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1ProcessalldocumentsResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.util.List; +import org.junit.jupiter.api.Test; + +public class IndexingDocumentsTests { + + @Test + public void testIndexingDocuments_PostApiIndexV1Indexdocument() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/indexdocument"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + IndexDocumentRequest req = IndexDocumentRequest.builder() + .document(DocumentDefinition.builder() + .datasource("") + .build()) + .build(); + + PostApiIndexV1IndexdocumentResponse res = sdk.indexing().documents().addOrUpdate() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingDocuments_PostApiIndexV1Indexdocuments() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/indexdocuments"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + IndexDocumentsRequest req = IndexDocumentsRequest.builder() + .datasource("") + .documents(List.of( + DocumentDefinition.builder() + .datasource("") + .build())) + .build(); + + PostApiIndexV1IndexdocumentsResponse res = sdk.indexing().documents().index() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingDocuments_PostApiIndexV1Bulkindexdocuments() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/bulkindexdocuments"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + BulkIndexDocumentsRequest req = BulkIndexDocumentsRequest.builder() + .uploadId("") + .datasource("") + .documents(List.of( + DocumentDefinition.builder() + .datasource("") + .build())) + .build(); + + PostApiIndexV1BulkindexdocumentsResponse res = sdk.indexing().documents().bulkIndex() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingDocuments_PostApiIndexV1Processalldocuments() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/processalldocuments"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + PostApiIndexV1ProcessalldocumentsResponse res = sdk.indexing().documents().processAll() + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingDocuments_PostApiIndexV1Deletedocument() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/deletedocument"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeleteDocumentRequest req = DeleteDocumentRequest.builder() + .datasource("") + .objectType("") + .id("") + .build(); + + PostApiIndexV1DeletedocumentResponse res = sdk.indexing().documents().delete() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/IndexingPermissionsTests.java b/src/test/java/com/glean/api_client/glean_api_client/IndexingPermissionsTests.java new file mode 100644 index 00000000..2150e102 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/IndexingPermissionsTests.java @@ -0,0 +1,327 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.BulkIndexGroupsRequest; +import com.glean.api_client.glean_api_client.models.components.BulkIndexMembershipsRequest; +import com.glean.api_client.glean_api_client.models.components.BulkIndexUsersRequest; +import com.glean.api_client.glean_api_client.models.components.DatasourceBulkMembershipDefinition; +import com.glean.api_client.glean_api_client.models.components.DatasourceGroupDefinition; +import com.glean.api_client.glean_api_client.models.components.DatasourceMembershipDefinition; +import com.glean.api_client.glean_api_client.models.components.DatasourceUserDefinition; +import com.glean.api_client.glean_api_client.models.components.DeleteGroupRequest; +import com.glean.api_client.glean_api_client.models.components.DeleteMembershipRequest; +import com.glean.api_client.glean_api_client.models.components.DeleteUserRequest; +import com.glean.api_client.glean_api_client.models.components.DocumentPermissionsDefinition; +import com.glean.api_client.glean_api_client.models.components.GreenlistUsersRequest; +import com.glean.api_client.glean_api_client.models.components.IndexGroupRequest; +import com.glean.api_client.glean_api_client.models.components.IndexMembershipRequest; +import com.glean.api_client.glean_api_client.models.components.IndexUserRequest; +import com.glean.api_client.glean_api_client.models.components.UpdatePermissionsRequest; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1BetausersResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1BulkindexgroupsResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1BulkindexmembershipsResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1BulkindexusersResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1DeletegroupResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1DeletemembershipResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1DeleteuserResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1IndexgroupResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1IndexmembershipResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1IndexuserResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1ProcessallmembershipsResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1UpdatepermissionsResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.util.List; +import org.junit.jupiter.api.Test; + +public class IndexingPermissionsTests { + + @Test + public void testIndexingPermissions_PostApiIndexV1Updatepermissions() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/updatepermissions"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + UpdatePermissionsRequest req = UpdatePermissionsRequest.builder() + .datasource("") + .permissions(DocumentPermissionsDefinition.builder() + .build()) + .build(); + + PostApiIndexV1UpdatepermissionsResponse res = sdk.indexing().permissions().updatePermissions() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingPermissions_PostApiIndexV1Indexuser() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/indexuser"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + IndexUserRequest req = IndexUserRequest.builder() + .datasource("") + .user(DatasourceUserDefinition.builder() + .email("Elroy38@gmail.com") + .name("") + .build()) + .build(); + + PostApiIndexV1IndexuserResponse res = sdk.indexing().permissions().indexUser() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingPermissions_PostApiIndexV1Bulkindexusers() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/bulkindexusers"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + BulkIndexUsersRequest req = BulkIndexUsersRequest.builder() + .uploadId("") + .datasource("") + .users(List.of( + DatasourceUserDefinition.builder() + .email("Nola85@hotmail.com") + .name("") + .build(), + DatasourceUserDefinition.builder() + .email("Francisca44@hotmail.com") + .name("") + .build(), + DatasourceUserDefinition.builder() + .email("Georgiana_Fadel-Boyle@yahoo.com") + .name("") + .build())) + .build(); + + PostApiIndexV1BulkindexusersResponse res = sdk.indexing().permissions().bulkIndexUsers() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingPermissions_PostApiIndexV1Indexgroup() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/indexgroup"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + IndexGroupRequest req = IndexGroupRequest.builder() + .datasource("") + .group(DatasourceGroupDefinition.builder() + .name("") + .build()) + .build(); + + PostApiIndexV1IndexgroupResponse res = sdk.indexing().permissions().indexGroup() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingPermissions_PostApiIndexV1Bulkindexgroups() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/bulkindexgroups"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + BulkIndexGroupsRequest req = BulkIndexGroupsRequest.builder() + .uploadId("") + .datasource("") + .groups(List.of( + DatasourceGroupDefinition.builder() + .name("") + .build(), + DatasourceGroupDefinition.builder() + .name("") + .build())) + .build(); + + PostApiIndexV1BulkindexgroupsResponse res = sdk.indexing().permissions().bulkIndexGroups() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingPermissions_PostApiIndexV1Indexmembership() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/indexmembership"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + IndexMembershipRequest req = IndexMembershipRequest.builder() + .datasource("") + .membership(DatasourceMembershipDefinition.builder() + .groupName("") + .build()) + .build(); + + PostApiIndexV1IndexmembershipResponse res = sdk.indexing().permissions().indexMembership() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingPermissions_PostApiIndexV1Bulkindexmemberships() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/bulkindexmemberships"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + BulkIndexMembershipsRequest req = BulkIndexMembershipsRequest.builder() + .uploadId("") + .datasource("") + .memberships(List.of( + DatasourceBulkMembershipDefinition.builder() + .build(), + DatasourceBulkMembershipDefinition.builder() + .build(), + DatasourceBulkMembershipDefinition.builder() + .build())) + .build(); + + PostApiIndexV1BulkindexmembershipsResponse res = sdk.indexing().permissions().bulkIndexMemberships() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingPermissions_PostApiIndexV1Processallmemberships() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/processallmemberships"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + PostApiIndexV1ProcessallmembershipsResponse res = sdk.indexing().permissions().processMemberships() + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingPermissions_PostApiIndexV1Deleteuser() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/deleteuser"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeleteUserRequest req = DeleteUserRequest.builder() + .datasource("") + .email("Estrella.Robel56@gmail.com") + .build(); + + PostApiIndexV1DeleteuserResponse res = sdk.indexing().permissions().deleteUser() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingPermissions_PostApiIndexV1Deletegroup() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/deletegroup"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeleteGroupRequest req = DeleteGroupRequest.builder() + .datasource("") + .groupName("") + .build(); + + PostApiIndexV1DeletegroupResponse res = sdk.indexing().permissions().deleteGroup() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingPermissions_PostApiIndexV1Deletemembership() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/deletemembership"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + DeleteMembershipRequest req = DeleteMembershipRequest.builder() + .datasource("") + .membership(DatasourceMembershipDefinition.builder() + .groupName("") + .build()) + .build(); + + PostApiIndexV1DeletemembershipResponse res = sdk.indexing().permissions().deleteMembership() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } + + @Test + public void testIndexingPermissions_PostApiIndexV1Betausers() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/betausers"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GreenlistUsersRequest req = GreenlistUsersRequest.builder() + .datasource("") + .emails(List.of( + "Margaret94@gmail.com", + "Jerel_Wilkinson39@yahoo.com")) + .build(); + + PostApiIndexV1BetausersResponse res = sdk.indexing().permissions().authorizeBetaUsers() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/InsightsTests.java b/src/test/java/com/glean/api_client/glean_api_client/InsightsTests.java new file mode 100644 index 00000000..c479213b --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/InsightsTests.java @@ -0,0 +1,5235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.ActivityEnum; +import com.glean.api_client.glean_api_client.models.components.AiAppsInsightsResponse; +import com.glean.api_client.glean_api_client.models.components.AiInsightsResponse; +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.ContentInsightsResponse; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentInsight; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.GleanAssistInsightsResponse; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.InsightsRequest; +import com.glean.api_client.glean_api_client.models.components.InsightsRequestCategory; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.UserActivityInsight; +import com.glean.api_client.glean_api_client.models.components.UserInsightsResponse; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.operations.InsightsResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +public class InsightsTests { + + @Test + public void testInsights_Insights() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("insights"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + InsightsRequest req = InsightsRequest.builder() + .categories(List.of( + InsightsRequestCategory.CONTENT, + InsightsRequestCategory.CONTENT)) + .build(); + + InsightsResponse res = sdk.client().insights().retrieve() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + com.glean.api_client.glean_api_client.models.components.InsightsResponse.builder() + .users(UserInsightsResponse.builder() + .activityInsights(List.of( + UserActivityInsight.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(450824L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(213457L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .collections(List.of( + Collection.builder() + .name("") + .description("yahoo disapprove glum ugh roundabout middle ha rise readily") + .id(237994L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(256758L) + .itemType(CollectionItemItemType.COLLECTION) + .build(), + CollectionItem.builder() + .collectionId(783459L) + .itemType(CollectionItemItemType.URL) + .build(), + CollectionItem.builder() + .collectionId(188420L) + .itemType(CollectionItemItemType.TEXT) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build())) + .build(), + Collection.builder() + .name("") + .description("bell unabashedly unwilling disk") + .id(698722L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(365275L) + .build(), + Share.builder() + .numDaysAgo(790898L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(856562L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(328633L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(287673L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(140875L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(210313L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .activity(ActivityEnum.SEARCH) + .build(), + UserActivityInsight.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .activity(ActivityEnum.ALL) + .build())) + .inactiveInsights(List.of( + UserActivityInsight.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .activity(ActivityEnum.SEARCH) + .build(), + UserActivityInsight.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .activity(ActivityEnum.SEARCH) + .build(), + UserActivityInsight.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .activity(ActivityEnum.ALL) + .build())) + .build()) + .content(ContentInsightsResponse.builder() + .documentInsights(List.of( + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(783566L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(519998L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(500839L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .build()) + .collections(ContentInsightsResponse.builder() + .documentInsights(List.of( + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(609810L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(413854L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(150399L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .build()) + .collectionsV2(ContentInsightsResponse.builder() + .documentInsights(List.of( + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(148964L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(541220L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(222075L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .build()) + .announcements(ContentInsightsResponse.builder() + .documentInsights(List.of( + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(15843L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .build()) + .answers(ContentInsightsResponse.builder() + .documentInsights(List.of( + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(39567L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(892341L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + DocumentInsight.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(486092L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .build()) + .ai(AiInsightsResponse.builder() + .assistantInsights(List.of( + UserActivityInsight.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .activity(ActivityEnum.SEARCH) + .build())) + .build()) + .aiApps(AiAppsInsightsResponse.builder() + .aiAppInsights(List.of( + UserActivityInsight.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .activity(ActivityEnum.SEARCH) + .build(), + UserActivityInsight.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .activity(ActivityEnum.ALL) + .build())) + .build()) + .gleanAssist(GleanAssistInsightsResponse.builder() + .activityInsights(List.of( + UserActivityInsight.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .activity(ActivityEnum.SEARCH) + .build())) + .build()) + .build(), + res.insightsResponse().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/MessagesTests.java b/src/test/java/com/glean/api_client/glean_api_client/MessagesTests.java new file mode 100644 index 00000000..fecc708c --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/MessagesTests.java @@ -0,0 +1,8608 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.Answer; +import com.glean.api_client.glean_api_client.models.components.AnswerBoard; +import com.glean.api_client.glean_api_client.models.components.AnswerLike; +import com.glean.api_client.glean_api_client.models.components.AnswerLikes; +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.CalendarAttendee; +import com.glean.api_client.glean_api_client.models.components.CalendarAttendees; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.ClusterGroup; +import com.glean.api_client.glean_api_client.models.components.Code; +import com.glean.api_client.glean_api_client.models.components.CodeLine; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.Company; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomEntity; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.Customer; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.ErrorMessage; +import com.glean.api_client.glean_api_client.models.components.ExtractedQnA; +import com.glean.api_client.glean_api_client.models.components.FacetBucket; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.FacetResult; +import com.glean.api_client.glean_api_client.models.components.FacetValue; +import com.glean.api_client.glean_api_client.models.components.GeneratedQna; +import com.glean.api_client.glean_api_client.models.components.GleanDataError; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.IdType; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.Meeting; +import com.glean.api_client.glean_api_client.models.components.MessagesRequest; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PersonToTeamRelationship; +import com.glean.api_client.glean_api_client.models.components.PersonToTeamRelationshipRelationship; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelatedQuestion; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.ResultsDescription; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResponse; +import com.glean.api_client.glean_api_client.models.components.SearchResponseMetadata; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.StructuredResult; +import com.glean.api_client.glean_api_client.models.components.StructuredText; +import com.glean.api_client.glean_api_client.models.components.StructuredTextItem; +import com.glean.api_client.glean_api_client.models.components.Team; +import com.glean.api_client.glean_api_client.models.components.TeamStatus; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.operations.MessagesResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +public class MessagesTests { + + @Test + public void testMessages_Messages() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("messages"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + MessagesRequest req = MessagesRequest.builder() + .idType(IdType.CONVERSATION_ID) + .id("") + .timestampMillis(558834L) + .build(); + + MessagesResponse res = sdk.client().messages().retrieve() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + com.glean.api_client.glean_api_client.models.components.MessagesResponse.builder() + .hasMore(false) + .searchResponse(SearchResponse.builder() + .trackingToken("trackingToken") + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(450824L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(213457L) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(438142L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(78888L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .mentionedPeople(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("meanwhile bah because impassioned responsibility jogging airman per") + .id(168726L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(491026L) + .itemType(CollectionItemItemType.URL) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .reactors(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(845806L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Share.builder() + .numDaysAgo(534384L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(387819L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(698722L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(365275L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .poc(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .members(List.of( + PersonToTeamRelationship.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .relationship(PersonToTeamRelationshipRelationship.MEMBER) + .build())) + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .status(TeamStatus.PROCESSED) + .canBeDeleted(true) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(637897L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(960234L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(163922L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of( + AnswerLike.builder() + .user(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .likedByUser(true) + .numLikes(750176L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(194354L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("absolve beside makeover amidst diver if behind drat") + .id(435401L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(382213L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(990860L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .title("title") + .nativeAppUrl("slack://foo/bar") + .relatedResults(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(820095L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(346523L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(193124L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .allClusteredResults(List.of( + ClusterGroup.builder() + .visibleCountHint(197787L) + .build(), + ClusterGroup.builder() + .visibleCountHint(60189L) + .build())) + .mustIncludeSuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(478496L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .people(List.of( + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("baptise kick ick gosh stall phew") + .id(999561L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("unnecessarily medium following pfft bashfully before") + .id(534236L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .lines(List.of( + CodeLine.builder() + .build())) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build(), + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(972200L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .status(TeamStatus.PROCESSED) + .canBeDeleted(true) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(738008L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(688038L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("parade since delightfully") + .id(207365L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(961784L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(61187L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .title("title") + .nativeAppUrl("slack://foo/bar") + .mustIncludeSuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(950775L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("whereas chubby bah er taut toward footrest victorious custody huzzah") + .id(863294L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("er until seal er") + .id(591321L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build())) + .generatedQnaResult(GeneratedQna.builder() + .ranges(List.of( + TextRange.builder() + .startIndex(73819L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(743152L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .build()) + .gleanDataError(GleanDataError.builder() + .errorMessages(List.of( + ErrorMessage.builder() + .source("gmail") + .errorMessage("invalid token") + .build(), + ErrorMessage.builder() + .source("slack") + .errorMessage("expired token") + .build())) + .build()) + .requestID("5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100") + .backendTimeMillis(1100L) + .metadata(SearchResponseMetadata.builder() + .searchedQueryRanges(List.of( + TextRange.builder() + .startIndex(245129L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(298813L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(147593L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(954659L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(600259L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(195022L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(801589L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .additionalQuerySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .facetResults(List.of( + FacetResult.builder() + .sourceName("container_name") + .operatorName("SelectMultiple") + .buckets(List.of( + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build(), + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build())) + .hasMoreBuckets(false) + .groupName("Service Cloud") + .build(), + FacetResult.builder() + .sourceName("container_name") + .operatorName("SelectMultiple") + .buckets(List.of( + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build(), + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build())) + .hasMoreBuckets(false) + .groupName("Service Cloud") + .build())) + .resultsDescription(ResultsDescription.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .rewrittenFacetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .hasMoreResults(true) + .build()) + .rootMessage(SearchResult.builder() + .url("https://example.com/foo/bar") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(733319L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .title("title") + .nativeAppUrl("slack://foo/bar") + .mustIncludeSuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(359740L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build()) + .build(), + res.messagesResponse().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/PeopleTests.java b/src/test/java/com/glean/api_client/glean_api_client/PeopleTests.java new file mode 100644 index 00000000..2c013d50 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/PeopleTests.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1ProcessallemployeesandteamsResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import org.junit.jupiter.api.Test; + +public class PeopleTests { + + @Test + public void testPeople_PostApiIndexV1Processallemployeesandteams() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/processallemployeesandteams"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + PostApiIndexV1ProcessallemployeesandteamsResponse res = sdk.indexing().people().processAllEmployeesAndTeams() + .call(); + assertEquals(200, res.statusCode()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/PinsTests.java b/src/test/java/com/glean/api_client/glean_api_client/PinsTests.java new file mode 100644 index 00000000..a4de2477 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/PinsTests.java @@ -0,0 +1,2067 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.EditPinRequest; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.GetPinRequest; +import com.glean.api_client.glean_api_client.models.components.GetPinResponse; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.ListPinsResponse; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.PinRequest; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.Unpin; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.operations.EditpinResponse; +import com.glean.api_client.glean_api_client.models.operations.GetpinResponse; +import com.glean.api_client.glean_api_client.models.operations.ListpinsRequest; +import com.glean.api_client.glean_api_client.models.operations.ListpinsResponse; +import com.glean.api_client.glean_api_client.models.operations.PinResponse; +import com.glean.api_client.glean_api_client.models.operations.UnpinResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +public class PinsTests { + + @Test + public void testPins_Editpin() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("editpin"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + EditPinRequest req = EditPinRequest.builder() + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(); + + EditpinResponse res = sdk.client().pins().update() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(922296L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(47491L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .collections(List.of( + Collection.builder() + .name("") + .description("informal wrongly lest slime since pace into row") + .id(793957L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(841760L) + .itemType(CollectionItemItemType.COLLECTION) + .build(), + CollectionItem.builder() + .collectionId(546659L) + .itemType(CollectionItemItemType.COLLECTION) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build())) + .build(), + Collection.builder() + .name("") + .description("twine because unnaturally card gallery among agile duh pro athwart") + .id(201064L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(544237L) + .build(), + Share.builder() + .numDaysAgo(241956L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(448916L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(494003L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(29269L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + res.pinDocument().get()); + } + + @Test + public void testPins_Getpin() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getpin"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetPinRequest req = GetPinRequest.builder() + .build(); + + GetpinResponse res = sdk.client().pins().retrieve() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetPinResponse.builder() + .pin(PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(544221L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(969961L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .collections(List.of( + Collection.builder() + .name("") + .description("extract neaten qua meanwhile bah") + .id(808481L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(656841L) + .itemType(CollectionItemItemType.URL) + .build(), + CollectionItem.builder() + .collectionId(607679L) + .itemType(CollectionItemItemType.COLLECTION) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build())) + .build(), + Collection.builder() + .name("") + .description("once out effector determined backburn weary") + .id(547184L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(31446L) + .build(), + Share.builder() + .numDaysAgo(339847L) + .build(), + Share.builder() + .numDaysAgo(844917L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(845806L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(350813L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(534384L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(913207L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(533795L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(949290L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(716267L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build(), + res.getPinResponse().get()); + } + + @Test + public void testPins_Listpins() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("listpins"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ListpinsRequest req = ListpinsRequest.builder() + .build(); + + ListpinsResponse res = sdk.client().pins().list() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + ListPinsResponse.builder() + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(177706L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(152837L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .collections(List.of( + Collection.builder() + .name("") + .description("bah since zowie loudly aha although gosh whenever") + .id(544651L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(60868L) + .itemType(CollectionItemItemType.TEXT) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build())) + .build(), + Collection.builder() + .name("") + .description("via during someplace woot excepting gah only despite") + .id(933854L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(500063L) + .build(), + Share.builder() + .numDaysAgo(206163L) + .build(), + Share.builder() + .numDaysAgo(310383L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(838038L) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(517221L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(774578L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(213989L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build(), + res.listPinsResponse().get()); + } + + @Test + public void testPins_Pin() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("pin"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + PinRequest req = PinRequest.builder() + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(); + + PinResponse res = sdk.client().pins().create() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(417458L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(69025L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .collections(List.of( + Collection.builder() + .name("") + .description("vice between gee") + .id(550483L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .items(List.of( + CollectionItem.builder() + .collectionId(452224L) + .itemType(CollectionItemItemType.TEXT) + .build(), + CollectionItem.builder() + .collectionId(259772L) + .itemType(CollectionItemItemType.COLLECTION) + .build(), + CollectionItem.builder() + .collectionId(137324L) + .itemType(CollectionItemItemType.URL) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .build())) + .build(), + Collection.builder() + .name("") + .description("attend alongside aw blend ha ew") + .id(497070L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + Collection.builder() + .name("") + .description("embalm simple ouch when pfft ah vainly") + .id(154150L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(842284L) + .build(), + Share.builder() + .numDaysAgo(466260L) + .build(), + Share.builder() + .numDaysAgo(931588L) + .build())) + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(982866L) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .remindAt(482357L) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(150565L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + res.pinDocument().get()); + } + + @Test + public void testPins_Unpin() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("unpin"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + Unpin req = Unpin.builder() + .build(); + + UnpinResponse res = sdk.client().pins().remove() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/PoliciesTests.java b/src/test/java/com/glean/api_client/glean_api_client/PoliciesTests.java new file mode 100644 index 00000000..ad6d60c4 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/PoliciesTests.java @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.GetDlpReportResponse; +import com.glean.api_client.glean_api_client.models.components.ListDlpReportsResponse; +import com.glean.api_client.glean_api_client.models.operations.GetpolicyResponse; +import com.glean.api_client.glean_api_client.models.operations.ListpoliciesResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class PoliciesTests { + + @Test + public void testPolicies_Getpolicy() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("getpolicy"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetpolicyResponse res = sdk.client().governance().data().policies().retrieve() + .id("") + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetDlpReportResponse.builder() + .build(), + res.getDlpReportResponse().get()); + } + + @Test + public void testPolicies_Getpolicies() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step getpolicies.test referencing operation getpolicies not found in document`]"); + } + + @Test + public void testPolicies_Createpolicy() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step createpolicy.test referencing operation createpolicy is missing required request body`, `workflow step createpolicy.test contains criterion simple with invalid condition`, `workflow step createpolicy.test does not contain $contentType successCriteria and required for response body assertion`]"); + } + + @Test + public void testPolicies_Downloadpolicycsv() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step downloadpolicycsv.test contains criterion simple with invalid condition`, `workflow step downloadpolicycsv.test does not contain $contentType successCriteria and required for response body assertion`]"); + } + + @Test + public void testPolicies_Listpolicies() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("listpolicies"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ListpoliciesResponse res = sdk.client().governance().data().policies().list() + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + ListDlpReportsResponse.builder() + .build(), + res.listDlpReportsResponse().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/ReportsTests.java b/src/test/java/com/glean/api_client/glean_api_client/ReportsTests.java new file mode 100644 index 00000000..30f6e5e2 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/ReportsTests.java @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import java.lang.Exception; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class ReportsTests { + + @Test + public void testReports_Createreport() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step createreport.test referencing operation createreport is missing required request body`, `workflow step createreport.test contains criterion simple with invalid condition`, `workflow step createreport.test does not contain $contentType successCriteria and required for response body assertion`]"); + } + + @Test + public void testReports_Downloadreportcsv() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step downloadreportcsv.test contains criterion simple with invalid condition`, `workflow step downloadreportcsv.test does not contain $contentType successCriteria and required for response body assertion`]"); + } + + @Test + public void testReports_Getreportstatus() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step getreportstatus.test contains criterion simple with invalid condition`, `workflow step getreportstatus.test does not contain $contentType successCriteria and required for response body assertion`]"); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/SearchTests.java b/src/test/java/com/glean/api_client/glean_api_client/SearchTests.java new file mode 100644 index 00000000..70328d79 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/SearchTests.java @@ -0,0 +1,9659 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.Announcement; +import com.glean.api_client.glean_api_client.models.components.Answer; +import com.glean.api_client.glean_api_client.models.components.AnswerBoard; +import com.glean.api_client.glean_api_client.models.components.AnswerLikes; +import com.glean.api_client.glean_api_client.models.components.AuthToken; +import com.glean.api_client.glean_api_client.models.components.AutocompleteRequest; +import com.glean.api_client.glean_api_client.models.components.AutocompleteResult; +import com.glean.api_client.glean_api_client.models.components.AutocompleteResultResultType; +import com.glean.api_client.glean_api_client.models.components.Badge; +import com.glean.api_client.glean_api_client.models.components.CalendarAttendee; +import com.glean.api_client.glean_api_client.models.components.CalendarAttendees; +import com.glean.api_client.glean_api_client.models.components.CalendarEvent; +import com.glean.api_client.glean_api_client.models.components.ChannelInviteInfo; +import com.glean.api_client.glean_api_client.models.components.ClusterGroup; +import com.glean.api_client.glean_api_client.models.components.Code; +import com.glean.api_client.glean_api_client.models.components.CodeLine; +import com.glean.api_client.glean_api_client.models.components.Collection; +import com.glean.api_client.glean_api_client.models.components.CollectionItem; +import com.glean.api_client.glean_api_client.models.components.CollectionItemItemType; +import com.glean.api_client.glean_api_client.models.components.Company; +import com.glean.api_client.glean_api_client.models.components.CustomDataValue; +import com.glean.api_client.glean_api_client.models.components.CustomEntity; +import com.glean.api_client.glean_api_client.models.components.CustomFieldData; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValue; +import com.glean.api_client.glean_api_client.models.components.CustomFieldValueStr; +import com.glean.api_client.glean_api_client.models.components.Customer; +import com.glean.api_client.glean_api_client.models.components.DatasourceProfile; +import com.glean.api_client.glean_api_client.models.components.Document; +import com.glean.api_client.glean_api_client.models.components.DocumentInteractions; +import com.glean.api_client.glean_api_client.models.components.DocumentMetadata; +import com.glean.api_client.glean_api_client.models.components.ErrorMessage; +import com.glean.api_client.glean_api_client.models.components.ExtractedQnA; +import com.glean.api_client.glean_api_client.models.components.FacetBucket; +import com.glean.api_client.glean_api_client.models.components.FacetFilter; +import com.glean.api_client.glean_api_client.models.components.FacetFilterSet; +import com.glean.api_client.glean_api_client.models.components.FacetFilterValue; +import com.glean.api_client.glean_api_client.models.components.FacetResult; +import com.glean.api_client.glean_api_client.models.components.FacetValue; +import com.glean.api_client.glean_api_client.models.components.FeedEntry; +import com.glean.api_client.glean_api_client.models.components.FeedRequest; +import com.glean.api_client.glean_api_client.models.components.FeedResult; +import com.glean.api_client.glean_api_client.models.components.FeedResultCategory; +import com.glean.api_client.glean_api_client.models.components.GeneratedAttachment; +import com.glean.api_client.glean_api_client.models.components.GeneratedAttachmentContent; +import com.glean.api_client.glean_api_client.models.components.GeneratedQna; +import com.glean.api_client.glean_api_client.models.components.GleanDataError; +import com.glean.api_client.glean_api_client.models.components.IconConfig; +import com.glean.api_client.glean_api_client.models.components.IconType; +import com.glean.api_client.glean_api_client.models.components.InviteInfo; +import com.glean.api_client.glean_api_client.models.components.Meeting; +import com.glean.api_client.glean_api_client.models.components.Person; +import com.glean.api_client.glean_api_client.models.components.PersonMetadata; +import com.glean.api_client.glean_api_client.models.components.PersonMetadataType; +import com.glean.api_client.glean_api_client.models.components.PersonToTeamRelationship; +import com.glean.api_client.glean_api_client.models.components.PersonToTeamRelationshipRelationship; +import com.glean.api_client.glean_api_client.models.components.PinDocument; +import com.glean.api_client.glean_api_client.models.components.PromptTemplate; +import com.glean.api_client.glean_api_client.models.components.PromptTemplateResult; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestion; +import com.glean.api_client.glean_api_client.models.components.QuerySuggestionList; +import com.glean.api_client.glean_api_client.models.components.Reaction; +import com.glean.api_client.glean_api_client.models.components.RecommendationsRequest; +import com.glean.api_client.glean_api_client.models.components.RecommendationsRequestOptions; +import com.glean.api_client.glean_api_client.models.components.RelatedDocuments; +import com.glean.api_client.glean_api_client.models.components.RelatedQuestion; +import com.glean.api_client.glean_api_client.models.components.RelationType; +import com.glean.api_client.glean_api_client.models.components.Reminder; +import com.glean.api_client.glean_api_client.models.components.ResultsResponse; +import com.glean.api_client.glean_api_client.models.components.SearchProviderInfo; +import com.glean.api_client.glean_api_client.models.components.SearchRequest; +import com.glean.api_client.glean_api_client.models.components.SearchRequestInputDetails; +import com.glean.api_client.glean_api_client.models.components.SearchRequestOptions; +import com.glean.api_client.glean_api_client.models.components.SearchResponse; +import com.glean.api_client.glean_api_client.models.components.SearchResult; +import com.glean.api_client.glean_api_client.models.components.SearchResultSnippet; +import com.glean.api_client.glean_api_client.models.components.Share; +import com.glean.api_client.glean_api_client.models.components.State; +import com.glean.api_client.glean_api_client.models.components.StructuredLink; +import com.glean.api_client.glean_api_client.models.components.StructuredResult; +import com.glean.api_client.glean_api_client.models.components.StructuredText; +import com.glean.api_client.glean_api_client.models.components.StructuredTextItem; +import com.glean.api_client.glean_api_client.models.components.Team; +import com.glean.api_client.glean_api_client.models.components.TeamStatus; +import com.glean.api_client.glean_api_client.models.components.TextRange; +import com.glean.api_client.glean_api_client.models.components.UserActivity; +import com.glean.api_client.glean_api_client.models.components.UserRole; +import com.glean.api_client.glean_api_client.models.components.UserRoleSpecification; +import com.glean.api_client.glean_api_client.models.components.Verification; +import com.glean.api_client.glean_api_client.models.components.VerificationMetadata; +import com.glean.api_client.glean_api_client.models.components.Workflow; +import com.glean.api_client.glean_api_client.models.components.WorkflowResult; +import com.glean.api_client.glean_api_client.models.operations.AdminsearchResponse; +import com.glean.api_client.glean_api_client.models.operations.AutocompleteResponse; +import com.glean.api_client.glean_api_client.models.operations.FeedResponse; +import com.glean.api_client.glean_api_client.models.operations.RecommendationsResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class SearchTests { + + @Test + public void testSearch_Adminsearch() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("adminsearch"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + SearchRequest req = SearchRequest.builder() + .query("vacation policy") + .trackingToken("trackingToken") + .pageSize(10L) + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(254944L) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("article") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("document") + .relationType(RelationType.EQUALS) + .build())) + .build(), + FacetFilter.builder() + .fieldName("department") + .values(List.of( + FacetFilterValue.builder() + .value("engineering") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build()) + .build(); + + AdminsearchResponse res = sdk.client().search().queryAsAdmin() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + SearchResponse.builder() + .trackingToken("trackingToken") + .results(List.of( + SearchResult.builder() + .url("https://www.example.com/") + .title("title") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + SearchResult.builder() + .url("https://www.example.com/") + .title("title") + .build())) + .gleanDataError(GleanDataError.builder() + .errorMessages(List.of( + ErrorMessage.builder() + .source("gmail") + .errorMessage("invalid token") + .build(), + ErrorMessage.builder() + .source("slack") + .errorMessage("expired token") + .build())) + .build()) + .requestID("5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100") + .facetResults(List.of( + FacetResult.builder() + .sourceName("sourceName") + .operatorName("operatorName") + .buckets(List.of( + FacetBucket.builder() + .count(1L) + .percentage(5L) + .value(FacetValue.builder() + .stringValue("stringValue") + .integerValue(5L) + .build()) + .build(), + FacetBucket.builder() + .count(1L) + .percentage(5L) + .value(FacetValue.builder() + .stringValue("stringValue") + .integerValue(5L) + .build()) + .build())) + .build(), + FacetResult.builder() + .sourceName("sourceName") + .operatorName("operatorName") + .buckets(List.of( + FacetBucket.builder() + .count(1L) + .percentage(5L) + .value(FacetValue.builder() + .stringValue("stringValue") + .integerValue(5L) + .build()) + .build(), + FacetBucket.builder() + .count(1L) + .percentage(5L) + .value(FacetValue.builder() + .stringValue("stringValue") + .integerValue(5L) + .build()) + .build())) + .build())) + .rewrittenFacetFilters(List.of( + FacetFilter.builder() + .fieldName("fieldName") + .values(List.of( + FacetFilterValue.builder() + .build(), + FacetFilterValue.builder() + .build())) + .build(), + FacetFilter.builder() + .fieldName("fieldName") + .values(List.of( + FacetFilterValue.builder() + .build(), + FacetFilterValue.builder() + .build())) + .build())) + .hasMoreResults(true) + .build(), + res.searchResponse().get()); + } + + @Test + public void testSearch_Autocomplete() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("autocomplete"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + AutocompleteRequest req = AutocompleteRequest.builder() + .trackingToken("trackingToken") + .query("San Fra") + .datasource("GDRIVE") + .resultSize(10L) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build(); + + AutocompleteResponse res = sdk.client().search().autocomplete() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + com.glean.api_client.glean_api_client.models.components.AutocompleteResponse.builder() + .trackingToken("trackingToken") + .results(List.of( + AutocompleteResult.builder() + .result("sample result") + .resultType(AutocompleteResultResultType.DOCUMENT) + .score(4.56) + .url("https://www.example.com/") + .trackingToken("abcd") + .build())) + .backendTimeMillis(1100L) + .build(), + res.autocompleteResponse().get()); + } + + @Test + public void testSearch_Feed() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("feed"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + FeedRequest req = FeedRequest.builder() + .build(); + + FeedResponse res = sdk.client().search().retrieveFeed() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + com.glean.api_client.glean_api_client.models.components.FeedResponse.builder() + .serverTimestamp(152670L) + .results(List.of( + FeedResult.builder() + .category(FeedResultCategory.ZERO_STATE_WORKFLOW_FAVORITES) + .primaryEntry(FeedEntry.builder() + .title("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .event(CalendarEvent.builder() + .id("") + .url("https://cultivated-longboat.com") + .attendees(CalendarAttendees.builder() + .people(List.of( + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .generatedAttachments(List.of( + GeneratedAttachment.builder() + .documents(List.of( + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build(), + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build())) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .poc(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .notes("CIO is interested in trying out the product.") + .build()) + .externalLinks(List.of( + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build(), + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .content(List.of( + GeneratedAttachmentContent.builder() + .displayHeader("Action Items") + .build())) + .build())) + .build()) + .announcement(Announcement.builder() + .draftId(342L) + .build()) + .collection(Collection.builder() + .name("") + .description("toward potentially zealous") + .id(455039L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(31514L) + .itemType(CollectionItemItemType.TEXT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(698671L) + .itemType(CollectionItemItemType.URL) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .collectionItem(CollectionItem.builder() + .collectionId(250166L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("instead waft bah failing um under out") + .id(230306L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .promptTemplate(PromptTemplateResult.builder() + .promptTemplate(PromptTemplate.builder() + .template("") + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .lastUpdatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .build()) + .workflow(WorkflowResult.builder() + .workflow(Workflow.builder() + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .lastUpdatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .activities(List.of( + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .secondaryEntries(List.of( + FeedEntry.builder() + .title("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .event(CalendarEvent.builder() + .id("") + .url("https://partial-saw.com") + .attendees(CalendarAttendees.builder() + .build()) + .generatedAttachments(List.of( + GeneratedAttachment.builder() + .documents(List.of( + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build(), + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build(), + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build())) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .externalLinks(List.of( + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build(), + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .content(List.of( + GeneratedAttachmentContent.builder() + .displayHeader("Action Items") + .build())) + .build(), + GeneratedAttachment.builder() + .documents(List.of( + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build(), + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build(), + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build())) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .externalLinks(List.of( + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build(), + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build(), + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .content(List.of( + GeneratedAttachmentContent.builder() + .displayHeader("Action Items") + .build())) + .build())) + .build()) + .announcement(Announcement.builder() + .draftId(342L) + .build()) + .collection(Collection.builder() + .name("") + .description("management polyester flustered dimly") + .id(301931L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .collectionItem(CollectionItem.builder() + .collectionId(350031L) + .itemType(CollectionItemItemType.COLLECTION) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("deliquesce so where aw peninsula at standard brr failing owlishly") + .id(259619L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .promptTemplate(PromptTemplateResult.builder() + .promptTemplate(PromptTemplate.builder() + .template("") + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .lastUpdatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .build()) + .workflow(WorkflowResult.builder() + .workflow(Workflow.builder() + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .lastUpdatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .activities(List.of( + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build())) + .build(), + FeedResult.builder() + .category(FeedResultCategory.DISPLAYABLE_LIST) + .primaryEntry(FeedEntry.builder() + .title("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .event(CalendarEvent.builder() + .id("") + .url("https://qualified-plumber.info") + .attendees(CalendarAttendees.builder() + .build()) + .generatedAttachments(List.of( + GeneratedAttachment.builder() + .documents(List.of( + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build())) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .externalLinks(List.of( + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build(), + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .content(List.of( + GeneratedAttachmentContent.builder() + .displayHeader("Action Items") + .build())) + .build())) + .build()) + .announcement(Announcement.builder() + .draftId(342L) + .build()) + .collection(Collection.builder() + .name("") + .description("grandiose yowza stale yet sinful mmm") + .id(659387L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .collectionItem(CollectionItem.builder() + .collectionId(460790L) + .itemType(CollectionItemItemType.TEXT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("since jubilantly meanwhile vestment muddy stiff") + .id(507793L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .promptTemplate(PromptTemplateResult.builder() + .promptTemplate(PromptTemplate.builder() + .template("") + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .lastUpdatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .build()) + .workflow(WorkflowResult.builder() + .workflow(Workflow.builder() + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .lastUpdatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .activities(List.of( + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .secondaryEntries(List.of( + FeedEntry.builder() + .title("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .event(CalendarEvent.builder() + .id("") + .url("https://utter-populist.net") + .attendees(CalendarAttendees.builder() + .build()) + .generatedAttachments(List.of( + GeneratedAttachment.builder() + .documents(List.of( + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build())) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .externalLinks(List.of( + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build(), + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build(), + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .content(List.of( + GeneratedAttachmentContent.builder() + .displayHeader("Action Items") + .build())) + .build())) + .build()) + .announcement(Announcement.builder() + .draftId(342L) + .build()) + .collection(Collection.builder() + .name("") + .description("verve however unhealthy delightfully formamide utter redress for finally") + .id(613860L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .collectionItem(CollectionItem.builder() + .collectionId(938484L) + .itemType(CollectionItemItemType.URL) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("stoop dowse tensely duh atop which any") + .id(761068L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .promptTemplate(PromptTemplateResult.builder() + .promptTemplate(PromptTemplate.builder() + .template("") + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .lastUpdatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .build()) + .workflow(WorkflowResult.builder() + .workflow(Workflow.builder() + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .lastUpdatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .activities(List.of( + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build(), + FeedEntry.builder() + .title("") + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .event(CalendarEvent.builder() + .id("") + .url("https://babyish-quinoa.name/") + .attendees(CalendarAttendees.builder() + .build()) + .generatedAttachments(List.of( + GeneratedAttachment.builder() + .documents(List.of( + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build(), + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build(), + Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build())) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .notes("CIO is interested in trying out the product.") + .build()) + .externalLinks(List.of( + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build(), + StructuredLink.builder() + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .content(List.of( + GeneratedAttachmentContent.builder() + .displayHeader("Action Items") + .build())) + .build())) + .build()) + .announcement(Announcement.builder() + .draftId(342L) + .build()) + .collection(Collection.builder() + .name("") + .description("unearth grubby bathrobe instead brr soupy") + .id(591260L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .collectionItem(CollectionItem.builder() + .collectionId(946419L) + .itemType(CollectionItemItemType.TEXT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("name") + .obfuscatedId("") + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("awkwardly given whoever curiously around jump or") + .id(206282L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .promptTemplate(PromptTemplateResult.builder() + .promptTemplate(PromptTemplate.builder() + .template("") + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .lastUpdatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build()) + .build()) + .workflow(WorkflowResult.builder() + .workflow(Workflow.builder() + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .lastUpdatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build()) + .build()) + .activities(List.of( + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build(), + UserActivity.builder() + .actor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build()) + .build())) + .build())) + .build())) + .facetResults(Map.ofEntries( + Map.entry("key", List.of( + FacetResult.builder() + .sourceName("container_name") + .operatorName("SelectMultiple") + .buckets(List.of( + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build(), + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build(), + FacetBucket.builder() + .count(1L) + .datasource("jira") + .percentage(5L) + .value(FacetValue.builder() + .stringValue("engineering") + .integerValue(5L) + .displayLabel("engineering") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build()) + .build())) + .hasMoreBuckets(false) + .groupName("Service Cloud") + .build())))) + .build(), + res.feedResponse().get()); + } + + @Test + public void testSearch_Peoplesuggest() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step peoplesuggest.test referencing operation peoplesuggest not found in document`]"); + } + + @Test + public void testSearch_Peoplesuggestadmin() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step peoplesuggestadmin.test referencing operation peoplesuggestadmin not found in document`]"); + } + + @Test + public void testSearch_Recommendations() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("recommendations"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + RecommendationsRequest req = RecommendationsRequest.builder() + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(236211L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(818990L) + .build(), + TextRange.builder() + .startIndex(38651L) + .build(), + TextRange.builder() + .startIndex(996660L) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(485964L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(793380L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of( + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()), + CustomFieldValue.of(CustomFieldValueStr.builder() + .build()))) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .mentionedPeople(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("rust whisper oh in seagull") + .id(532535L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.ANSWER_MODERATOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(354858L) + .itemType(CollectionItemItemType.URL) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build(), + Collection.builder() + .name("") + .description("physical queasily provision towards frightfully meh") + .id(452218L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Collection.builder() + .name("") + .description("mmm crushing playfully feminize") + .id(498098L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .reactors(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(578719L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Share.builder() + .numDaysAgo(450275L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(821135L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(986764L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .pageSize(100L) + .maxSnippetSize(400L) + .requestOptions(RecommendationsRequestOptions.builder() + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .context(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(518835L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .build(); + + RecommendationsResponse res = sdk.client().search().recommendations() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + ResultsResponse.builder() + .results(List.of( + SearchResult.builder() + .url("https://example.com/foo/bar") + .title("title") + .nativeAppUrl("slack://foo/bar") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build())) + .structuredResults(List.of( + StructuredResult.builder() + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .relatedDocuments(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(257594L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .ranges(List.of( + TextRange.builder() + .startIndex(538524L) + .build())) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(650257L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .suggestions(List.of( + QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .label("Mortimer's PRs") + .datasource("github") + .build())) + .build()) + .inviteInfo(InviteInfo.builder() + .invites(List.of( + ChannelInviteInfo.builder() + .build(), + ChannelInviteInfo.builder() + .build())) + .build()) + .customFields(List.of( + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build(), + CustomFieldData.builder() + .label("") + .values(List.of()) + .displayable(true) + .build())) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .mentionedPeople(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .pins(List.of( + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + PinDocument.builder() + .documentId("") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .attribution(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .collections(List.of( + Collection.builder() + .name("") + .description("dusk entwine cease than materialise whenever fireplace eek") + .id(71727L) + .addedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .removedRoles(List.of( + UserRoleSpecification.builder() + .role(UserRole.EDITOR) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.VIEWER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .items(List.of( + CollectionItem.builder() + .collectionId(102105L) + .itemType(CollectionItemItemType.COLLECTION) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(515424L) + .itemType(CollectionItemItemType.DOCUMENT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + CollectionItem.builder() + .collectionId(330168L) + .itemType(CollectionItemItemType.TEXT) + .createdBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .roles(List.of( + UserRoleSpecification.builder() + .role(UserRole.VERIFIER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + UserRoleSpecification.builder() + .role(UserRole.OWNER) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build())) + .interactions(DocumentInteractions.builder() + .reacts(List.of( + Reaction.builder() + .reactors(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build(), + Reaction.builder() + .build(), + Reaction.builder() + .build())) + .shares(List.of( + Share.builder() + .numDaysAgo(364853L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Share.builder() + .numDaysAgo(533353L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Share.builder() + .numDaysAgo(82419L) + .sharer(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .reminders(List.of( + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(606221L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(33153L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(624169L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(535774L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .candidateVerifiers(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .customer(Customer.builder() + .id("") + .company(Company.builder() + .name("") + .location("New York City") + .industry("Finances") + .about("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City") + .build()) + .poc(List.of( + Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .build())) + .notes("CIO is interested in trying out the product.") + .build()) + .team(Team.builder() + .id("") + .name("") + .members(List.of( + PersonToTeamRelationship.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .relationship(PersonToTeamRelationshipRelationship.MEMBER) + .build(), + PersonToTeamRelationship.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .relationship(PersonToTeamRelationshipRelationship.MEMBER) + .build())) + .datasourceProfiles(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .status(TeamStatus.PROCESSED) + .canBeDeleted(true) + .build()) + .customEntity(CustomEntity.builder() + .build()) + .answer(Answer.builder() + .id(3L) + .docId("ANSWERS_answer_3") + .question("Why is the sky blue?") + .bodyText("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .combinedAnswerText(StructuredText.builder() + .text("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.") + .structuredList(List.of( + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(962229L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build(), + StructuredTextItem.builder() + .link("https://en.wikipedia.org/wiki/Diffuse_sky_radiation") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(395713L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .text("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.") + .build())) + .build()) + .likes(AnswerLikes.builder() + .likedBy(List.of()) + .likedByUser(false) + .numLikes(297770L) + .build()) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(752324L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .board(AnswerBoard.builder() + .name("") + .description("adventurously notwithstanding canter generously tenderly helpfully front schnitzel") + .id(324124L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .sourceDocument(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(912614L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .extractedQnA(ExtractedQnA.builder() + .questionResult(SearchResult.builder() + .url("https://example.com/foo/bar") + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.DEPRECATED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(565417L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .title("title") + .nativeAppUrl("slack://foo/bar") + .relatedResults(List.of( + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(358317L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(116602L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build(), + RelatedDocuments.builder() + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(975675L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build())) + .allClusteredResults(List.of( + ClusterGroup.builder() + .visibleCountHint(49580L) + .build(), + ClusterGroup.builder() + .visibleCountHint(242509L) + .build(), + ClusterGroup.builder() + .visibleCountHint(812000L) + .build())) + .mustIncludeSuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .querySuggestion(QuerySuggestion.builder() + .query("app:github type:pull author:mortimer") + .searchProviderInfo(SearchProviderInfo.builder() + .name("Google") + .searchLinkUrlTemplate("https://www.google.com/search?q={query}&hl=en") + .build()) + .label("Mortimer's PRs") + .datasource("github") + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(952650L) + .datasourceFilter("JIRA") + .datasourcesFilter(List.of( + "JIRA")) + .queryOverridesFacetFilters(true) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .facetFilterSets(List.of( + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build(), + FacetFilterSet.builder() + .filters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build())) + .authTokens(List.of( + AuthToken.builder() + .accessToken("123abc") + .datasource("gmail") + .scope("email profile https://www.googleapis.com/auth/gmail.readonly") + .tokenType("Bearer") + .authUser("1") + .build())) + .build()) + .inputDetails(SearchRequestInputDetails.builder() + .hasCopyPaste(true) + .build()) + .build()) + .build()) + .build()) + .meeting(Meeting.builder() + .attendees(CalendarAttendees.builder() + .people(List.of( + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build(), + CalendarAttendee.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build())) + .build()) + .build()) + .collection(Collection.builder() + .name("") + .description("furthermore hence formal tune flowery aside the schedule witty") + .id(965L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .answerBoard(AnswerBoard.builder() + .name("") + .description("fess um whoa times boohoo down") + .id(762536L) + .audienceFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("Spreadsheet") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("Presentation") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .creator(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .code(Code.builder() + .repoName("scio") + .fileName("README.md") + .lines(List.of( + CodeLine.builder() + .build(), + CodeLine.builder() + .build(), + CodeLine.builder() + .build())) + .build()) + .querySuggestions(QuerySuggestionList.builder() + .person(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .relatedQuestion(RelatedQuestion.builder() + .build()) + .build())) + .generatedQnaResult(GeneratedQna.builder() + .ranges(List.of( + TextRange.builder() + .startIndex(389859L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(916413L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(63382L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.VERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(928524L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build(), + TextRange.builder() + .startIndex(466270L) + .document(Document.builder() + .metadata(DocumentMetadata.builder() + .datasource("datasource") + .objectType("Feature Request") + .container("container") + .parentId("JIRA_EN-1337") + .mimeType("mimeType") + .documentId("documentId") + .createTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .updateTime(OffsetDateTime.parse("2000-01-23T04:56:07.000Z")) + .author(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .owner(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .components(List.of( + "Backend", + "Networking")) + .status("[\"Done\"]") + .assignedTo(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .updatedBy(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .interactions(DocumentInteractions.builder() + .build()) + .verification(Verification.builder() + .state(State.UNVERIFIED) + .metadata(VerificationMetadata.builder() + .lastVerifier(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build(), + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .lastReminder(Reminder.builder() + .assignee(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .remindAt(569654L) + .requestor(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build()) + .customData(Map.ofEntries( + Map.entry("someCustomField", CustomDataValue.builder() + .build()))) + .contactPerson(Person.builder() + .name("George Clooney") + .obfuscatedId("abc123") + .metadata(PersonMetadata.builder() + .type(PersonMetadataType.FULL_TIME) + .title("Actor") + .department("Movies") + .email("george@example.com") + .location("Hollywood, CA") + .phone("6505551234") + .photoUrl("https://example.com/george.jpg") + .startDate(LocalDate.parse("2000-01-23")) + .datasourceProfile(List.of( + DatasourceProfile.builder() + .datasource("github") + .handle("") + .build())) + .querySuggestions(QuerySuggestionList.builder() + .build()) + .inviteInfo(InviteInfo.builder() + .build()) + .badges(List.of( + Badge.builder() + .key("deployment_name_new_hire") + .displayName("New hire") + .iconConfig(IconConfig.builder() + .color("#343CED") + .key("person_icon") + .iconType(IconType.GLYPH) + .name("user") + .build()) + .build())) + .build()) + .build()) + .build()) + .build()) + .build())) + .build()) + .backendTimeMillis(1100L) + .build(), + res.resultsResponse().get()); + } + + @Test + public void testSearch_Search() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("search"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + SearchRequest req = SearchRequest.builder() + .query("vacation policy") + .trackingToken("trackingToken") + .pageSize(10L) + .requestOptions(SearchRequestOptions.builder() + .facetBucketSize(246815L) + .facetFilters(List.of( + FacetFilter.builder() + .fieldName("type") + .values(List.of( + FacetFilterValue.builder() + .value("article") + .relationType(RelationType.EQUALS) + .build(), + FacetFilterValue.builder() + .value("document") + .relationType(RelationType.EQUALS) + .build())) + .build(), + FacetFilter.builder() + .fieldName("department") + .values(List.of( + FacetFilterValue.builder() + .value("engineering") + .relationType(RelationType.EQUALS) + .build())) + .build())) + .build()) + .build(); + + com.glean.api_client.glean_api_client.models.operations.SearchResponse res = sdk.client().search().query() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + SearchResponse.builder() + .trackingToken("trackingToken") + .results(List.of( + SearchResult.builder() + .url("https://www.example.com/") + .title("title") + .snippets(List.of( + SearchResultSnippet.builder() + .snippet("snippet") + .mimeType("mimeType") + .build())) + .build(), + SearchResult.builder() + .url("https://www.example.com/") + .title("title") + .build())) + .gleanDataError(GleanDataError.builder() + .errorMessages(List.of( + ErrorMessage.builder() + .source("gmail") + .errorMessage("invalid token") + .build(), + ErrorMessage.builder() + .source("slack") + .errorMessage("expired token") + .build())) + .build()) + .requestID("5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100") + .facetResults(List.of( + FacetResult.builder() + .sourceName("sourceName") + .operatorName("operatorName") + .buckets(List.of( + FacetBucket.builder() + .count(1L) + .percentage(5L) + .value(FacetValue.builder() + .stringValue("stringValue") + .integerValue(5L) + .build()) + .build(), + FacetBucket.builder() + .count(1L) + .percentage(5L) + .value(FacetValue.builder() + .stringValue("stringValue") + .integerValue(5L) + .build()) + .build())) + .build(), + FacetResult.builder() + .sourceName("sourceName") + .operatorName("operatorName") + .buckets(List.of( + FacetBucket.builder() + .count(1L) + .percentage(5L) + .value(FacetValue.builder() + .stringValue("stringValue") + .integerValue(5L) + .build()) + .build(), + FacetBucket.builder() + .count(1L) + .percentage(5L) + .value(FacetValue.builder() + .stringValue("stringValue") + .integerValue(5L) + .build()) + .build())) + .build())) + .rewrittenFacetFilters(List.of( + FacetFilter.builder() + .fieldName("fieldName") + .values(List.of( + FacetFilterValue.builder() + .build(), + FacetFilterValue.builder() + .build())) + .build(), + FacetFilter.builder() + .fieldName("fieldName") + .values(List.of( + FacetFilterValue.builder() + .build(), + FacetFilterValue.builder() + .build())) + .build())) + .hasMoreResults(true) + .build(), + res.searchResponse().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/SummarizeTests.java b/src/test/java/com/glean/api_client/glean_api_client/SummarizeTests.java new file mode 100644 index 00000000..a7ee0312 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/SummarizeTests.java @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.DocumentSpec1; +import com.glean.api_client.glean_api_client.models.components.DocumentSpecUnion; +import com.glean.api_client.glean_api_client.models.components.SummarizeRequest; +import com.glean.api_client.glean_api_client.models.operations.SummarizeResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.util.List; +import org.junit.jupiter.api.Test; + +public class SummarizeTests { + + @Test + public void testSummarize_Summarize() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("summarize"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + SummarizeRequest req = SummarizeRequest.builder() + .documentSpecs(List.of( + DocumentSpecUnion.of(DocumentSpec1.builder() + .build()), + DocumentSpecUnion.of(DocumentSpec1.builder() + .build()))) + .build(); + + SummarizeResponse res = sdk.client().documents().summarize() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + com.glean.api_client.glean_api_client.models.components.SummarizeResponse.builder() + .build(), + res.summarizeResponse().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/ToolsTests.java b/src/test/java/com/glean/api_client/glean_api_client/ToolsTests.java new file mode 100644 index 00000000..eb3cdb44 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/ToolsTests.java @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.ToolsCallParameter; +import com.glean.api_client.glean_api_client.models.components.ToolsCallRequest; +import com.glean.api_client.glean_api_client.models.components.ToolsCallResponse; +import com.glean.api_client.glean_api_client.models.components.ToolsListResponse; +import com.glean.api_client.glean_api_client.models.operations.GetRestApiV1ToolsListResponse; +import com.glean.api_client.glean_api_client.models.operations.PostRestApiV1ToolsCallResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import java.util.Map; +import org.junit.jupiter.api.Test; + +public class ToolsTests { + + @Test + public void testTools_GetRestApiV1ToolsList() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("get_/rest/api/v1/tools/list"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetRestApiV1ToolsListResponse res = sdk.client().tools().list() + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + ToolsListResponse.builder() + .build(), + res.toolsListResponse().get()); + } + + @Test + public void testTools_PostRestApiV1ToolsCall() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/rest/api/v1/tools/call"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + ToolsCallRequest req = ToolsCallRequest.builder() + .name("") + .parameters(Map.ofEntries( + Map.entry("key", ToolsCallParameter.builder() + .name("") + .value("") + .build()))) + .build(); + + PostRestApiV1ToolsCallResponse res = sdk.client().tools().run() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + ToolsCallResponse.builder() + .build(), + res.toolsCallResponse().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/TroubleshootingTests.java b/src/test/java/com/glean/api_client/glean_api_client/TroubleshootingTests.java new file mode 100644 index 00000000..4054d8de --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/TroubleshootingTests.java @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.glean.api_client.glean_api_client.models.components.CheckDocumentAccessRequest; +import com.glean.api_client.glean_api_client.models.components.CheckDocumentAccessResponse; +import com.glean.api_client.glean_api_client.models.components.GetDocumentCountRequest; +import com.glean.api_client.glean_api_client.models.components.GetDocumentCountResponse; +import com.glean.api_client.glean_api_client.models.components.GetDocumentStatusRequest; +import com.glean.api_client.glean_api_client.models.components.GetDocumentStatusResponse; +import com.glean.api_client.glean_api_client.models.components.GetUserCountRequest; +import com.glean.api_client.glean_api_client.models.components.GetUserCountResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1CheckdocumentaccessResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1GetdocumentcountResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1GetdocumentstatusResponse; +import com.glean.api_client.glean_api_client.models.operations.PostApiIndexV1GetusercountResponse; +import com.glean.api_client.glean_api_client.utils.Utils; +import java.lang.Exception; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class TroubleshootingTests { + + @Test + public void testTroubleshooting_PostApiIndexV1DebugDatasourceStatus() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step post_/api/index/v1/debug/{datasource}/status.test contains criterion simple with invalid condition`, `workflow step post_/api/index/v1/debug/{datasource}/status.test does not contain $contentType successCriteria and required for response body assertion`]"); + } + + @Test + public void testTroubleshooting_PostApiIndexV1Checkdocumentaccess() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/checkdocumentaccess"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + CheckDocumentAccessRequest req = CheckDocumentAccessRequest.builder() + .datasource("") + .objectType("") + .docId("") + .userEmail("") + .build(); + + PostApiIndexV1CheckdocumentaccessResponse res = sdk.indexing().documents().checkAccess() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + CheckDocumentAccessResponse.builder() + .build(), + res.checkDocumentAccessResponse().get()); + } + + @Test + public void testTroubleshooting_PostApiIndexV1Getdocumentstatus() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/getdocumentstatus"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetDocumentStatusRequest req = GetDocumentStatusRequest.builder() + .datasource("") + .objectType("") + .docId("") + .build(); + + PostApiIndexV1GetdocumentstatusResponse res = sdk.indexing().documents().status() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetDocumentStatusResponse.builder() + .build(), + res.getDocumentStatusResponse().get()); + } + + @Test + public void testTroubleshooting_PostApiIndexV1Getdocumentcount() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/getdocumentcount"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetDocumentCountRequest req = GetDocumentCountRequest.builder() + .datasource("") + .build(); + + PostApiIndexV1GetdocumentcountResponse res = sdk.indexing().documents().count() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetDocumentCountResponse.builder() + .build(), + res.getDocumentCountResponse().get()); + } + + @Test + public void testTroubleshooting_PostApiIndexV1Getusercount() throws Exception { + + var testHttpClient = Utils.createTestHTTPClient("post_/api/index/v1/getusercount"); + Glean sdk = Glean.builder() + .serverURL(Utils.environmentVariable("TEST_SERVER_URL", "http://localhost:18080")) + .client(testHttpClient) + .apiToken("") + .build(); + + GetUserCountRequest req = GetUserCountRequest.builder() + .datasource("") + .build(); + + PostApiIndexV1GetusercountResponse res = sdk.indexing().people().count() + .request(req) + .call(); + assertEquals(200, res.statusCode()); + assertEquals( + GetUserCountResponse.builder() + .build(), + res.getUserCountResponse().get()); + } +} \ No newline at end of file diff --git a/src/test/java/com/glean/api_client/glean_api_client/VisibilityoverridesTests.java b/src/test/java/com/glean/api_client/glean_api_client/VisibilityoverridesTests.java new file mode 100644 index 00000000..ff0d1e29 --- /dev/null +++ b/src/test/java/com/glean/api_client/glean_api_client/VisibilityoverridesTests.java @@ -0,0 +1,21 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.glean.api_client.glean_api_client; + +import java.lang.Exception; +import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; + +public class VisibilityoverridesTests { + + @Test + public void testVisibilityoverrides_Getdocvisibility() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step getdocvisibility.test contains criterion simple with invalid condition`, `workflow step getdocvisibility.test does not contain $contentType successCriteria and required for response body assertion`]"); + } + + @Test + public void testVisibilityoverrides_Setdocvisibility() throws Exception { + Assumptions.assumeTrue(false, "incomplete test found please make sure to address the following errors: [`workflow step setdocvisibility.test referencing operation setdocvisibility is missing required request body`, `workflow step setdocvisibility.test contains criterion simple with invalid condition`, `workflow step setdocvisibility.test does not contain $contentType successCriteria and required for response body assertion`]"); + } +} \ No newline at end of file diff --git a/tests/mockserver/.gitignore b/tests/mockserver/.gitignore new file mode 100644 index 00000000..9544318b --- /dev/null +++ b/tests/mockserver/.gitignore @@ -0,0 +1 @@ +_debug diff --git a/tests/mockserver/Dockerfile b/tests/mockserver/Dockerfile new file mode 100644 index 00000000..efdea18c --- /dev/null +++ b/tests/mockserver/Dockerfile @@ -0,0 +1,11 @@ +FROM golang:1.23 + +WORKDIR /usr/src/app + +COPY go.mod go.sum ./ +RUN go mod download && go mod verify +COPY . . +COPY *testdata /usr/local/bin/testdata +RUN go build -v -o /usr/local/bin/mockserver . +EXPOSE 18080 +ENTRYPOINT ["mockserver"] diff --git a/tests/mockserver/Makefile b/tests/mockserver/Makefile new file mode 100644 index 00000000..2ae6a36c --- /dev/null +++ b/tests/mockserver/Makefile @@ -0,0 +1,18 @@ +.PHONY: start + +start: + @if command -v docker >/dev/null 2>&1; then \ + echo "Starting mock server with Docker..."; \ + docker build -t mockserver . && \ + docker run -i -p 18080:18080 -t --rm mockserver; \ + elif command -v go >/dev/null 2>&1; then \ + echo "Docker not found. Starting mock server with Go..."; \ + go run .; \ + else \ + echo "Neither Docker nor Go found. To run the mock server:"; \ + echo "\nOption 1 - Using Docker:"; \ + echo " docker build -t mockserver ."; \ + echo " docker run -i -p 18080:18080 -t --rm mockserver"; \ + echo "\nOption 2 - Using Go:"; \ + echo " go run ."; \ + fi diff --git a/tests/mockserver/README.md b/tests/mockserver/README.md new file mode 100644 index 00000000..c8424fd3 --- /dev/null +++ b/tests/mockserver/README.md @@ -0,0 +1,52 @@ +# Mock Server + +A generated HTTP mock server based on your OpenAPI Specification (OAS). Use this mock server for integration and contract testing. + +## Usage + +The server can be built and started via the [Go programming language toolchain](https://go.dev/) or [Docker](https://www.docker.com/). + +If you have Go installed, start the server directly via: + +```shell +go run . +``` + +Otherwise, if you have Docker installed, build and run the server via: + +```shell +docker build -t mockserver . +docker run -i -p 18080:18080 -t --rm mockserver +``` + +By default, the server runs on port `18080`. + +### Server Paths + +The server contains generated paths from the OAS and the following additional built-in paths. + +| Path | Description | +|---|---| +| [`/_mockserver/health`](https://localhost:18080/_mockserver/health) | verify server is running | +| [`/_mockserver/log`](https://localhost:18080/_mockserver/log) | view per-OAS-operation logs | + +Any request outside the generated and built-in paths will return a `404 Not Found` response. + +### Server Customization + +The server supports the following flags for customization. + +| Flag | Default | Description | +|---|---|---| +| `-address` | `:18080` | server listen address | +| `-log-format` | `text` | logging format (supported: `JSON`, `text`) | +| `-log-level` | `INFO` | logging level (supported: `DEBUG`, `INFO`, `WARN`, `ERROR`) | + +For example, enabling server debug logging: + +```shell +# via `go run` +go run . -log-level=DEBUG +# via `docker run` +docker run -i -p 18080:18080 -t --rm mockserver -log-level=DEBUG +``` diff --git a/tests/mockserver/go.mod b/tests/mockserver/go.mod new file mode 100644 index 00000000..38b2d5e8 --- /dev/null +++ b/tests/mockserver/go.mod @@ -0,0 +1,15 @@ +module mockserver + +go 1.22 + +require ( + github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 + github.com/go-pkgz/expirable-cache/v3 v3.0.0 + github.com/gorilla/mux v1.8.1 +) + +require ( + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/stretchr/testify v1.9.0 // indirect +) diff --git a/tests/mockserver/go.sum b/tests/mockserver/go.sum new file mode 100644 index 00000000..fa86a5fc --- /dev/null +++ b/tests/mockserver/go.sum @@ -0,0 +1,16 @@ +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 h1:S92OBrGuLLZsyM5ybUzgc/mPjIYk2AZqufieooe98uw= +github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05/go.mod h1:M9R1FoZ3y//hwwnJtO51ypFGwm8ZfpxPT/ZLtO1mcgQ= +github.com/go-pkgz/expirable-cache/v3 v3.0.0 h1:u3/gcu3sabLYiTCevoRKv+WzjIn5oo7P8XtiXBeRDLw= +github.com/go-pkgz/expirable-cache/v3 v3.0.0/go.mod h1:2OQiDyEGQalYecLWmXprm3maPXeVb5/6/X7yRPYTzec= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/tests/mockserver/internal/handler/assert/contenttype.go b/tests/mockserver/internal/handler/assert/contenttype.go new file mode 100644 index 00000000..42afbd06 --- /dev/null +++ b/tests/mockserver/internal/handler/assert/contenttype.go @@ -0,0 +1,99 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package assert + +import ( + "fmt" + "mime" + "net/http" + "strings" +) + +func ContentType(req *http.Request, expected string, isRequired bool) error { + got := req.Header.Get("Content-Type") + + if got == "" { + if isRequired { + return fmt.Errorf("expected Content-Type to be set, got: %s", got) + } + return nil + } + + mimeType, _, err := mime.ParseMediaType(got) + if err != nil { + return fmt.Errorf("got Content-Type %s is invalid: %w", got, err) + } + + expectedMimeType, _, err := mime.ParseMediaType(expected) + if err != nil { + return fmt.Errorf("expected Content-Type %s is invalid: %w", expected, err) + } + + if mimeType != expectedMimeType { + return fmt.Errorf( + "expected Content-Type to be %s, got: %s", + expected, + got, + ) + } + + return nil +} + +func AcceptHeader(req *http.Request, expectedValues []string) error { + if len(expectedValues) == 0 { + return nil + } + + gotAccept := req.Header.Get("Accept") + + gotValues := strings.Split(gotAccept, ",") + + for i, gotValue := range gotValues { + mimeType := strings.Split(strings.TrimSpace(gotValue), ";")[0] + + gotMimeType, _, err := mime.ParseMediaType(mimeType) + if err != nil { + return fmt.Errorf("got Accept value %s is invalid: %w", gotValue, err) + } + + gotValues[i] = gotMimeType + } + + allFound := true + + parsedExpectedValues := make([]string, len(expectedValues)) + + for i, expected := range expectedValues { + mimeType := strings.Split(expected, ";")[0] + + expectedMimeType, _, err := mime.ParseMediaType(mimeType) + if err != nil { + return fmt.Errorf("expected Accept value %s is invalid: %w", expected, err) + } + + parsedExpectedValues[i] = expectedMimeType + } + + for _, gotValue := range gotValues { + found := false + + for _, expected := range parsedExpectedValues { + if expected == gotValue { + found = true + break + } + } + + if !found { + allFound = false + break + } + } + + if !allFound { + return fmt.Errorf("expected Accept value to be one of %s, got: %s", strings.Join(parsedExpectedValues, ", "), gotAccept) + } + + return nil +} diff --git a/tests/mockserver/internal/handler/assert/header.go b/tests/mockserver/internal/handler/assert/header.go new file mode 100644 index 00000000..50f910d9 --- /dev/null +++ b/tests/mockserver/internal/handler/assert/header.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package assert + +import ( + "fmt" + "net/http" +) + +// HeaderExists generically verifies the given request header name exists with +// a single, non-empty value. If an unexpected value is found, it will return an +// error with a diagnostic text body and which should cause the handler to return +// immediately. +func HeaderExists(req *http.Request, name string) error { + values := req.Header.Values(name) + + if len(values) == 0 { + return fmt.Errorf("missing expected header %s", name) + } + + if len(values) > 1 { + return fmt.Errorf("expected single header for %s, got %d values", name, len(values)) + } + + got := values[0] + + if got == "" { + return fmt.Errorf("expected non-empty header %s", name) + } + + return nil +} + +// HeaderValues generically verifies the given request header name has the +// expected values. If an unexpected value is found, it will return an error +// with a diagnostic text body and which should cause the handler to return +// immediately. +func HeaderValues(req *http.Request, name string, expected []string) error { + got := req.Header.Values(name) + + if len(got) == 0 { + return fmt.Errorf( + "missing expected header %s which should be %v", + name, + expected, + ) + } + + if len(got) != len(expected) { + return fmt.Errorf( + "expected header %s to be %v, got: %v", + name, + expected, + got, + ) + } + + for index, expectedValue := range expected { + if got[index] != expectedValue { + return fmt.Errorf( + "expected header %s to be %v, got: %v", + name, + expected, + got, + ) + } + } + + return nil +} diff --git a/tests/mockserver/internal/handler/assert/parameter.go b/tests/mockserver/internal/handler/assert/parameter.go new file mode 100644 index 00000000..f8a5e45a --- /dev/null +++ b/tests/mockserver/internal/handler/assert/parameter.go @@ -0,0 +1,110 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package assert + +import ( + "fmt" + "net/http" + "net/url" +) + +// ParameterHeaderValues verifies the request header parameter key has the +// expected multiple values. If an unexpected value is found, it will return an +// error with a diagnostic text body and which should cause the handler to +// return immediately. +func ParameterHeaderValues(req *http.Request, key string, expected []string) error { + got := req.Header.Values(key) + + if len(got) == 0 { + return fmt.Errorf( + "missing expected header parameter %s which should be %v", + key, + expected, + ) + } + + if len(got) != len(expected) { + return fmt.Errorf( + "expected header parameter %s to be %s, got: %v", + key, + expected, + got, + ) + } + + for index, expectedValue := range expected { + if got[index] != expectedValue { + return fmt.Errorf( + "expected header parameter %s to be %v, got: %v", + key, + expected, + got, + ) + } + } + + return nil +} + +// ParameterPathValue verifies the request path parameter key has the expected +// value. If an unexpected value is found, it will return an error with +// a diagnostic text body and which should cause the handler to +// return immediately. +func ParameterPathValue(req *http.Request, key string, expected string) error { + got := req.PathValue(key) + + if got != expected { + return fmt.Errorf( + "expected path parameter %s to be %s, got: %s", + key, + expected, + got, + ) + } + + return nil +} + +// ParameterQueryValues verifies the request query parameter key has the +// expected multiple values. If an unexpected value is found, it will return an +// error with a diagnostic text body and which should cause the handler to +// return immediately. +func ParameterQueryValues(req *http.Request, key string, expected []string) error { + queryValues, err := url.ParseQuery(req.URL.RawQuery) + + if err != nil { + return fmt.Errorf("error parsing query parameters: %w", err) + } + + got, ok := queryValues[key] + + if !ok || len(got) == 0 { + return fmt.Errorf( + "missing expected query parameter %s which should be %v", + key, + expected, + ) + } + + if len(got) != len(expected) { + return fmt.Errorf( + "expected query parameter %s to be %s, got: %v", + key, + expected, + got, + ) + } + + for index, expectedValue := range expected { + if got[index] != expectedValue { + return fmt.Errorf( + "expected query parameter %s to be %v, got: %v", + key, + expected, + got, + ) + } + } + + return nil +} diff --git a/tests/mockserver/internal/handler/assert/pointer.go b/tests/mockserver/internal/handler/assert/pointer.go new file mode 100644 index 00000000..fa03e4c8 --- /dev/null +++ b/tests/mockserver/internal/handler/assert/pointer.go @@ -0,0 +1,12 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package assert + +// Pointer returns a pointer to the given value. +// +// This is intended to simplify inline builtin value expressions that are not +// implemented in the Go language specification, such as a hypothetical +// &"example". +func Pointer[T any](v T) *T { + return &v +} diff --git a/tests/mockserver/internal/handler/assert/security.go b/tests/mockserver/internal/handler/assert/security.go new file mode 100644 index 00000000..7d0a714a --- /dev/null +++ b/tests/mockserver/internal/handler/assert/security.go @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package assert + +import ( + "errors" + "fmt" + "net/http" + "strings" +) + +// SecurityAuthorizationHeader verifies the request security Authorization +// header is present and has the expected HTTP Authorization scheme with a value +// if required. If a missing value or multiple values are found, it will +// return an error with a diagnostic text body and which should cause the +// handler to return immediately. +func SecurityAuthorizationHeader(req *http.Request, optional bool, httpAuthorizationScheme string) error { + values := req.Header.Values("Authorization") + + if len(values) == 0 { + if optional { + return nil + } + + return errors.New("missing expected Authorization header") + } + + if len(values) > 1 { + return fmt.Errorf("expected single Authorization header, got %d values", len(values)) + } + + got := values[0] + + if got == "" { + // Should return error, even if optional, as that represents an errant + // client implementation. + return errors.New("expected non-empty Authorization header") + } + + if httpAuthorizationScheme != "" && !strings.HasPrefix(got, httpAuthorizationScheme+" ") { + return fmt.Errorf("expected HTTP Authorization scheme %s, got: %s", httpAuthorizationScheme, got) + } + + return nil +} + +// SecurityHeader verifies the request security header name is present and has +// a value if required. If a missing value or multiple values are found, it will +// return an error with a diagnostic text body and which should cause the +// handler to return immediately. +func SecurityHeader(req *http.Request, name string, optional bool) error { + values := req.Header.Values(name) + + if len(values) == 0 { + if optional { + return nil + } + + return fmt.Errorf("missing expected security header %s", name) + } + + if len(values) > 1 { + return fmt.Errorf("expected single security header for %s, got %d values", name, len(values)) + } + + got := values[0] + + if got == "" { + // Should return error, even if optional, as that represents an errant + // client implementation. + return fmt.Errorf("expected non-empty security header %s", name) + } + + return nil +} diff --git a/tests/mockserver/internal/handler/doc.go b/tests/mockserver/internal/handler/doc.go new file mode 100644 index 00000000..a4e60c89 --- /dev/null +++ b/tests/mockserver/internal/handler/doc.go @@ -0,0 +1,5 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +// Package handlers contains all generated HTTP handlers for the server. They +// are listed via the generated GeneratedHandlers() function. +package handler diff --git a/tests/mockserver/internal/handler/generated_handler.go b/tests/mockserver/internal/handler/generated_handler.go new file mode 100644 index 00000000..929558ef --- /dev/null +++ b/tests/mockserver/internal/handler/generated_handler.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "context" + "net/http" +) + +// GeneratedHandler is the type that encapsulates a generated handler. +type GeneratedHandler struct { + // HTTP request handler function. + handlerFunc http.HandlerFunc + + // HTTP method, such as GET. + Method string + + // URL path, such as /path. + Path string +} + +// NewGeneratedHandler creates a generated handler via method, path, and handler +// function. +func NewGeneratedHandler(ctx context.Context, method string, path string, handlerFunc http.HandlerFunc) *GeneratedHandler { + return &GeneratedHandler{ + handlerFunc: handlerFunc, + Method: method, + Path: path, + } +} + +// HandlerFunc returns the underlying HTTP handler function. +func (h GeneratedHandler) HandlerFunc() http.HandlerFunc { + return h.handlerFunc +} diff --git a/tests/mockserver/internal/handler/generated_handlers.go b/tests/mockserver/internal/handler/generated_handlers.go new file mode 100644 index 00000000..855faf0f --- /dev/null +++ b/tests/mockserver/internal/handler/generated_handlers.go @@ -0,0 +1,101 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "context" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +// GeneratedHandlers returns all generated handlers. +func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) []*GeneratedHandler { + return []*GeneratedHandler{ + NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/agents/{agent_id}", pathGetRestAPIV1AgentsAgentID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/agents/{agent_id}/schemas", pathGetRestAPIV1AgentsAgentIDSchemas(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/governance/data/policies", pathGetRestAPIV1GovernanceDataPolicies(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/governance/data/policies/{id}", pathGetRestAPIV1GovernanceDataPoliciesID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/tools/list", pathGetRestAPIV1ToolsList(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/adddatasource", pathPostAPIIndexV1Adddatasource(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/betausers", pathPostAPIIndexV1Betausers(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/bulkindexdocuments", pathPostAPIIndexV1Bulkindexdocuments(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/bulkindexgroups", pathPostAPIIndexV1Bulkindexgroups(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/bulkindexmemberships", pathPostAPIIndexV1Bulkindexmemberships(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/bulkindexusers", pathPostAPIIndexV1Bulkindexusers(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/checkdocumentaccess", pathPostAPIIndexV1Checkdocumentaccess(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/deletedocument", pathPostAPIIndexV1Deletedocument(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/deletegroup", pathPostAPIIndexV1Deletegroup(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/deletemembership", pathPostAPIIndexV1Deletemembership(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/deleteuser", pathPostAPIIndexV1Deleteuser(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/getdatasourceconfig", pathPostAPIIndexV1Getdatasourceconfig(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/getdocumentcount", pathPostAPIIndexV1Getdocumentcount(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/getdocumentstatus", pathPostAPIIndexV1Getdocumentstatus(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/getusercount", pathPostAPIIndexV1Getusercount(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/indexdocument", pathPostAPIIndexV1Indexdocument(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/indexdocuments", pathPostAPIIndexV1Indexdocuments(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/indexgroup", pathPostAPIIndexV1Indexgroup(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/indexmembership", pathPostAPIIndexV1Indexmembership(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/indexuser", pathPostAPIIndexV1Indexuser(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/processalldocuments", pathPostAPIIndexV1Processalldocuments(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/processallemployeesandteams", pathPostAPIIndexV1Processallemployeesandteams(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/processallmemberships", pathPostAPIIndexV1Processallmemberships(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/rotatetoken", pathPostAPIIndexV1Rotatetoken(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/updatepermissions", pathPostAPIIndexV1Updatepermissions(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/activity", pathPostRestAPIV1Activity(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/addcollectionitems", pathPostRestAPIV1Addcollectionitems(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/addverificationreminder", pathPostRestAPIV1Addverificationreminder(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/adminsearch", pathPostRestAPIV1Adminsearch(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/autocomplete", pathPostRestAPIV1Autocomplete(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/chat", pathPostRestAPIV1Chat(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/createannouncement", pathPostRestAPIV1Createannouncement(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/createanswer", pathPostRestAPIV1Createanswer(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/createauthtoken", pathPostRestAPIV1Createauthtoken(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/createcollection", pathPostRestAPIV1Createcollection(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/createshortcut", pathPostRestAPIV1Createshortcut(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/deleteallchats", pathPostRestAPIV1Deleteallchats(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/deleteannouncement", pathPostRestAPIV1Deleteannouncement(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/deleteanswer", pathPostRestAPIV1Deleteanswer(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/deletechatfiles", pathPostRestAPIV1Deletechatfiles(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/deletechats", pathPostRestAPIV1Deletechats(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/deletecollection", pathPostRestAPIV1Deletecollection(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/deletecollectionitem", pathPostRestAPIV1Deletecollectionitem(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/deleteshortcut", pathPostRestAPIV1Deleteshortcut(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/editanswer", pathPostRestAPIV1Editanswer(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/editcollection", pathPostRestAPIV1Editcollection(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/editcollectionitem", pathPostRestAPIV1Editcollectionitem(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/editpin", pathPostRestAPIV1Editpin(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/feed", pathPostRestAPIV1Feed(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/feedback", pathPostRestAPIV1Feedback(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/getanswer", pathPostRestAPIV1Getanswer(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/getchat", pathPostRestAPIV1Getchat(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/getchatapplication", pathPostRestAPIV1Getchatapplication(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/getchatfiles", pathPostRestAPIV1Getchatfiles(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/getcollection", pathPostRestAPIV1Getcollection(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/getdocpermissions", pathPostRestAPIV1Getdocpermissions(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/getdocuments", pathPostRestAPIV1Getdocuments(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/getdocumentsbyfacets", pathPostRestAPIV1Getdocumentsbyfacets(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/getpin", pathPostRestAPIV1Getpin(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/getshortcut", pathPostRestAPIV1Getshortcut(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/insights", pathPostRestAPIV1Insights(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/listanswers", pathPostRestAPIV1Listanswers(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/listchats", pathPostRestAPIV1Listchats(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/listcollections", pathPostRestAPIV1Listcollections(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/listentities", pathPostRestAPIV1Listentities(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/listpins", pathPostRestAPIV1Listpins(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/listshortcuts", pathPostRestAPIV1Listshortcuts(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/listverifications", pathPostRestAPIV1Listverifications(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/messages", pathPostRestAPIV1Messages(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/people", pathPostRestAPIV1People(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/pin", pathPostRestAPIV1Pin(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/recommendations", pathPostRestAPIV1Recommendations(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/search", pathPostRestAPIV1Search(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/summarize", pathPostRestAPIV1Summarize(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/tools/call", pathPostRestAPIV1ToolsCall(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/unpin", pathPostRestAPIV1Unpin(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/updateannouncement", pathPostRestAPIV1Updateannouncement(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/updateshortcut", pathPostRestAPIV1Updateshortcut(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/uploadchatfiles", pathPostRestAPIV1Uploadchatfiles(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/verify", pathPostRestAPIV1Verify(dir, rt)), + } +} diff --git a/tests/mockserver/internal/handler/pathgetrestapiv1agentsagentid.go b/tests/mockserver/internal/handler/pathgetrestapiv1agentsagentid.go new file mode 100644 index 00000000..d91aa327 --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetrestapiv1agentsagentid.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetRestAPIV1AgentsAgentID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getAgent[0]": + dir.HandlerFunc("getAgent", testGetAgentGetAgent0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetAgentGetAgent0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.Agent{ + AgentID: "", + Name: "", + Capabilities: components.AgentCapabilities{}, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathgetrestapiv1agentsagentidschemas.go b/tests/mockserver/internal/handler/pathgetrestapiv1agentsagentidschemas.go new file mode 100644 index 00000000..e0ed13ae --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetrestapiv1agentsagentidschemas.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetRestAPIV1AgentsAgentIDSchemas(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getAgentSchemas[0]": + dir.HandlerFunc("getAgentSchemas", testGetAgentSchemasGetAgentSchemas0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetAgentSchemasGetAgentSchemas0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.AgentSchemas{ + AgentID: "", + InputSchema: components.InputSchema{}, + OutputSchema: components.OutputSchema{}, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathgetrestapiv1governancedatapolicies.go b/tests/mockserver/internal/handler/pathgetrestapiv1governancedatapolicies.go new file mode 100644 index 00000000..b0d10bbd --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetrestapiv1governancedatapolicies.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetRestAPIV1GovernanceDataPolicies(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listpolicies[0]": + dir.HandlerFunc("listpolicies", testListpoliciesListpolicies0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testListpoliciesListpolicies0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.ListDlpReportsResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathgetrestapiv1governancedatapoliciesid.go b/tests/mockserver/internal/handler/pathgetrestapiv1governancedatapoliciesid.go new file mode 100644 index 00000000..07d4fea6 --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetrestapiv1governancedatapoliciesid.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetRestAPIV1GovernanceDataPoliciesID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getpolicy[0]": + dir.HandlerFunc("getpolicy", testGetpolicyGetpolicy0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetpolicyGetpolicy0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetDlpReportResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathgetrestapiv1toolslist.go b/tests/mockserver/internal/handler/pathgetrestapiv1toolslist.go new file mode 100644 index 00000000..a8dc3089 --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetrestapiv1toolslist.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetRestAPIV1ToolsList(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "get_/rest/api/v1/tools/list[0]": + dir.HandlerFunc("get_/rest/api/v1/tools/list", testGetRestAPIV1ToolsListGetRestAPIV1ToolsList0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetRestAPIV1ToolsListGetRestAPIV1ToolsList0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.ToolsListResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1adddatasource.go b/tests/mockserver/internal/handler/pathpostapiindexv1adddatasource.go new file mode 100644 index 00000000..34e56c05 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1adddatasource.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Adddatasource(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/adddatasource[0]": + dir.HandlerFunc("post_/api/index/v1/adddatasource", testPostAPIIndexV1AdddatasourcePostAPIIndexV1Adddatasource0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1AdddatasourcePostAPIIndexV1Adddatasource0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1betausers.go b/tests/mockserver/internal/handler/pathpostapiindexv1betausers.go new file mode 100644 index 00000000..3df89e08 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1betausers.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Betausers(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/betausers[0]": + dir.HandlerFunc("post_/api/index/v1/betausers", testPostAPIIndexV1BetausersPostAPIIndexV1Betausers0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1BetausersPostAPIIndexV1Betausers0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexdocuments.go b/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexdocuments.go new file mode 100644 index 00000000..8801ff3b --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexdocuments.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Bulkindexdocuments(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/bulkindexdocuments[0]": + dir.HandlerFunc("post_/api/index/v1/bulkindexdocuments", testPostAPIIndexV1BulkindexdocumentsPostAPIIndexV1Bulkindexdocuments0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1BulkindexdocumentsPostAPIIndexV1Bulkindexdocuments0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexgroups.go b/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexgroups.go new file mode 100644 index 00000000..8d3011e3 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexgroups.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Bulkindexgroups(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/bulkindexgroups[0]": + dir.HandlerFunc("post_/api/index/v1/bulkindexgroups", testPostAPIIndexV1BulkindexgroupsPostAPIIndexV1Bulkindexgroups0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1BulkindexgroupsPostAPIIndexV1Bulkindexgroups0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexmemberships.go b/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexmemberships.go new file mode 100644 index 00000000..5ba85f74 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexmemberships.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Bulkindexmemberships(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/bulkindexmemberships[0]": + dir.HandlerFunc("post_/api/index/v1/bulkindexmemberships", testPostAPIIndexV1BulkindexmembershipsPostAPIIndexV1Bulkindexmemberships0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1BulkindexmembershipsPostAPIIndexV1Bulkindexmemberships0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexusers.go b/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexusers.go new file mode 100644 index 00000000..7839fcf3 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1bulkindexusers.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Bulkindexusers(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/bulkindexusers[0]": + dir.HandlerFunc("post_/api/index/v1/bulkindexusers", testPostAPIIndexV1BulkindexusersPostAPIIndexV1Bulkindexusers0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1BulkindexusersPostAPIIndexV1Bulkindexusers0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1checkdocumentaccess.go b/tests/mockserver/internal/handler/pathpostapiindexv1checkdocumentaccess.go new file mode 100644 index 00000000..23ebc538 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1checkdocumentaccess.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Checkdocumentaccess(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/checkdocumentaccess[0]": + dir.HandlerFunc("post_/api/index/v1/checkdocumentaccess", testPostAPIIndexV1CheckdocumentaccessPostAPIIndexV1Checkdocumentaccess0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1CheckdocumentaccessPostAPIIndexV1Checkdocumentaccess0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.CheckDocumentAccessResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1deletedocument.go b/tests/mockserver/internal/handler/pathpostapiindexv1deletedocument.go new file mode 100644 index 00000000..34beba46 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1deletedocument.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Deletedocument(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/deletedocument[0]": + dir.HandlerFunc("post_/api/index/v1/deletedocument", testPostAPIIndexV1DeletedocumentPostAPIIndexV1Deletedocument0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1DeletedocumentPostAPIIndexV1Deletedocument0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1deletegroup.go b/tests/mockserver/internal/handler/pathpostapiindexv1deletegroup.go new file mode 100644 index 00000000..b4ae2858 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1deletegroup.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Deletegroup(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/deletegroup[0]": + dir.HandlerFunc("post_/api/index/v1/deletegroup", testPostAPIIndexV1DeletegroupPostAPIIndexV1Deletegroup0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1DeletegroupPostAPIIndexV1Deletegroup0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1deletemembership.go b/tests/mockserver/internal/handler/pathpostapiindexv1deletemembership.go new file mode 100644 index 00000000..99968cf2 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1deletemembership.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Deletemembership(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/deletemembership[0]": + dir.HandlerFunc("post_/api/index/v1/deletemembership", testPostAPIIndexV1DeletemembershipPostAPIIndexV1Deletemembership0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1DeletemembershipPostAPIIndexV1Deletemembership0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1deleteuser.go b/tests/mockserver/internal/handler/pathpostapiindexv1deleteuser.go new file mode 100644 index 00000000..c8372237 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1deleteuser.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Deleteuser(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/deleteuser[0]": + dir.HandlerFunc("post_/api/index/v1/deleteuser", testPostAPIIndexV1DeleteuserPostAPIIndexV1Deleteuser0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1DeleteuserPostAPIIndexV1Deleteuser0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1getdatasourceconfig.go b/tests/mockserver/internal/handler/pathpostapiindexv1getdatasourceconfig.go new file mode 100644 index 00000000..1219671c --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1getdatasourceconfig.go @@ -0,0 +1,86 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Getdatasourceconfig(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/getdatasourceconfig[0]": + dir.HandlerFunc("post_/api/index/v1/getdatasourceconfig", testPostAPIIndexV1GetdatasourceconfigPostAPIIndexV1Getdatasourceconfig0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1GetdatasourceconfigPostAPIIndexV1Getdatasourceconfig0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.CustomDatasourceConfig{ + Name: "", + DatasourceCategory: components.DatasourceCategoryUncategorized.ToPointer(), + URLRegex: types.String("https://example-company.datasource.com/.*"), + Quicklinks: []components.Quicklink{ + components.Quicklink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + TrustURLRegexForViewActivity: types.Bool(true), + StripFragmentInCanonicalURL: types.Bool(true), + IsEntityDatasource: types.Bool(false), + IsTestDatasource: types.Bool(false), + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1getdocumentcount.go b/tests/mockserver/internal/handler/pathpostapiindexv1getdocumentcount.go new file mode 100644 index 00000000..94479655 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1getdocumentcount.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Getdocumentcount(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/getdocumentcount[0]": + dir.HandlerFunc("post_/api/index/v1/getdocumentcount", testPostAPIIndexV1GetdocumentcountPostAPIIndexV1Getdocumentcount0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1GetdocumentcountPostAPIIndexV1Getdocumentcount0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetDocumentCountResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1getdocumentstatus.go b/tests/mockserver/internal/handler/pathpostapiindexv1getdocumentstatus.go new file mode 100644 index 00000000..f86dd6f0 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1getdocumentstatus.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Getdocumentstatus(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/getdocumentstatus[0]": + dir.HandlerFunc("post_/api/index/v1/getdocumentstatus", testPostAPIIndexV1GetdocumentstatusPostAPIIndexV1Getdocumentstatus0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1GetdocumentstatusPostAPIIndexV1Getdocumentstatus0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetDocumentStatusResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1getusercount.go b/tests/mockserver/internal/handler/pathpostapiindexv1getusercount.go new file mode 100644 index 00000000..9a1b178c --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1getusercount.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Getusercount(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/getusercount[0]": + dir.HandlerFunc("post_/api/index/v1/getusercount", testPostAPIIndexV1GetusercountPostAPIIndexV1Getusercount0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1GetusercountPostAPIIndexV1Getusercount0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetUserCountResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1indexdocument.go b/tests/mockserver/internal/handler/pathpostapiindexv1indexdocument.go new file mode 100644 index 00000000..e6d4878c --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1indexdocument.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Indexdocument(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/indexdocument[0]": + dir.HandlerFunc("post_/api/index/v1/indexdocument", testPostAPIIndexV1IndexdocumentPostAPIIndexV1Indexdocument0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1IndexdocumentPostAPIIndexV1Indexdocument0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1indexdocuments.go b/tests/mockserver/internal/handler/pathpostapiindexv1indexdocuments.go new file mode 100644 index 00000000..d51b3b79 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1indexdocuments.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Indexdocuments(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/indexdocuments[0]": + dir.HandlerFunc("post_/api/index/v1/indexdocuments", testPostAPIIndexV1IndexdocumentsPostAPIIndexV1Indexdocuments0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1IndexdocumentsPostAPIIndexV1Indexdocuments0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1indexgroup.go b/tests/mockserver/internal/handler/pathpostapiindexv1indexgroup.go new file mode 100644 index 00000000..f95be6a8 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1indexgroup.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Indexgroup(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/indexgroup[0]": + dir.HandlerFunc("post_/api/index/v1/indexgroup", testPostAPIIndexV1IndexgroupPostAPIIndexV1Indexgroup0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1IndexgroupPostAPIIndexV1Indexgroup0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1indexmembership.go b/tests/mockserver/internal/handler/pathpostapiindexv1indexmembership.go new file mode 100644 index 00000000..237c6ab1 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1indexmembership.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Indexmembership(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/indexmembership[0]": + dir.HandlerFunc("post_/api/index/v1/indexmembership", testPostAPIIndexV1IndexmembershipPostAPIIndexV1Indexmembership0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1IndexmembershipPostAPIIndexV1Indexmembership0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1indexuser.go b/tests/mockserver/internal/handler/pathpostapiindexv1indexuser.go new file mode 100644 index 00000000..995587c3 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1indexuser.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Indexuser(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/indexuser[0]": + dir.HandlerFunc("post_/api/index/v1/indexuser", testPostAPIIndexV1IndexuserPostAPIIndexV1Indexuser0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1IndexuserPostAPIIndexV1Indexuser0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1processalldocuments.go b/tests/mockserver/internal/handler/pathpostapiindexv1processalldocuments.go new file mode 100644 index 00000000..11e34568 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1processalldocuments.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Processalldocuments(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/processalldocuments[0]": + dir.HandlerFunc("post_/api/index/v1/processalldocuments", testPostAPIIndexV1ProcessalldocumentsPostAPIIndexV1Processalldocuments0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1ProcessalldocumentsPostAPIIndexV1Processalldocuments0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", false); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1processallemployeesandteams.go b/tests/mockserver/internal/handler/pathpostapiindexv1processallemployeesandteams.go new file mode 100644 index 00000000..8bc7960b --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1processallemployeesandteams.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Processallemployeesandteams(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/processallemployeesandteams[0]": + dir.HandlerFunc("post_/api/index/v1/processallemployeesandteams", testPostAPIIndexV1ProcessallemployeesandteamsPostAPIIndexV1Processallemployeesandteams0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1ProcessallemployeesandteamsPostAPIIndexV1Processallemployeesandteams0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1processallmemberships.go b/tests/mockserver/internal/handler/pathpostapiindexv1processallmemberships.go new file mode 100644 index 00000000..dfe7762d --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1processallmemberships.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Processallmemberships(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/processallmemberships[0]": + dir.HandlerFunc("post_/api/index/v1/processallmemberships", testPostAPIIndexV1ProcessallmembershipsPostAPIIndexV1Processallmemberships0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1ProcessallmembershipsPostAPIIndexV1Processallmemberships0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", false); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1rotatetoken.go b/tests/mockserver/internal/handler/pathpostapiindexv1rotatetoken.go new file mode 100644 index 00000000..df7f30c2 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1rotatetoken.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Rotatetoken(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/rotatetoken[0]": + dir.HandlerFunc("post_/api/index/v1/rotatetoken", testPostAPIIndexV1RotatetokenPostAPIIndexV1Rotatetoken0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1RotatetokenPostAPIIndexV1Rotatetoken0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.RotateTokenResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostapiindexv1updatepermissions.go b/tests/mockserver/internal/handler/pathpostapiindexv1updatepermissions.go new file mode 100644 index 00000000..9bb5d576 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapiindexv1updatepermissions.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIIndexV1Updatepermissions(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/api/index/v1/updatepermissions[0]": + dir.HandlerFunc("post_/api/index/v1/updatepermissions", testPostAPIIndexV1UpdatepermissionsPostAPIIndexV1Updatepermissions0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostAPIIndexV1UpdatepermissionsPostAPIIndexV1Updatepermissions0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1activity.go b/tests/mockserver/internal/handler/pathpostrestapiv1activity.go new file mode 100644 index 00000000..cf821af6 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1activity.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Activity(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "activity[0]": + dir.HandlerFunc("activity", testActivityActivity0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testActivityActivity0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1addcollectionitems.go b/tests/mockserver/internal/handler/pathpostrestapiv1addcollectionitems.go new file mode 100644 index 00000000..51677417 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1addcollectionitems.go @@ -0,0 +1,1517 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Addcollectionitems(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "addcollectionitems[0]": + dir.HandlerFunc("addcollectionitems", testAddcollectionitemsAddcollectionitems0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testAddcollectionitemsAddcollectionitems0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.AddCollectionItemsResponse{ + Collection: &components.Collection{ + Name: "", + Description: "greedily indeed marten whereas rebel expansion", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 759858, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 976421, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 649696, + }, + components.Share{ + NumDaysAgo: 970396, + }, + components.Share{ + NumDaysAgo: 288210, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 489899, + }, + components.Reminder{ + RemindAt: 168446, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 390252, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 283321, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 869836, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 102608, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 289582, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 569138, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 978832, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 573370, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 542921, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + components.CollectionItem{ + CollectionID: 357599, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 477688, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeCollection, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1addverificationreminder.go b/tests/mockserver/internal/handler/pathpostrestapiv1addverificationreminder.go new file mode 100644 index 00000000..81760bb5 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1addverificationreminder.go @@ -0,0 +1,761 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Addverificationreminder(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "addverificationreminder[0]": + dir.HandlerFunc("addverificationreminder", testAddverificationreminderAddverificationreminder0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testAddverificationreminderAddverificationreminder0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 310007, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 381872, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "ditch cruelly geez bah", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Role: components.UserRoleVerifier, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 922427, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 744290, + ItemType: components.CollectionItemItemTypeCollection, + }, + components.CollectionItem{ + CollectionID: 857658, + ItemType: components.CollectionItemItemTypeCollection, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + }, + }, + components.Collection{ + Name: "", + Description: "unfortunately brr brr whereas object if frantically randomize contrail silently", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 571806, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 991839, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Reminders: []components.Reminder{ + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 431849, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 121811, + }, + CandidateVerifiers: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1adminsearch.go b/tests/mockserver/internal/handler/pathpostrestapiv1adminsearch.go new file mode 100644 index 00000000..cbe3c2c9 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1adminsearch.go @@ -0,0 +1,163 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Adminsearch(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "adminsearch[0]": + dir.HandlerFunc("adminsearch", testAdminsearchAdminsearch0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testAdminsearchAdminsearch0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.SearchResponse{ + TrackingToken: types.String("trackingToken"), + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://www.example.com/", + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + components.SearchResult{ + Title: types.String("title"), + URL: "https://www.example.com/", + Snippets: []components.SearchResultSnippet{}, + }, + }, + GleanDataError: &components.GleanDataError{ + ErrorMessages: []components.ErrorMessage{ + components.ErrorMessage{ + Source: types.String("gmail"), + ErrorMessage: types.String("invalid token"), + }, + components.ErrorMessage{ + Source: types.String("slack"), + ErrorMessage: types.String("expired token"), + }, + }, + }, + RequestID: types.String("5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100"), + FacetResults: []components.FacetResult{ + components.FacetResult{ + SourceName: types.String("sourceName"), + OperatorName: types.String("operatorName"), + Buckets: []components.FacetBucket{ + components.FacetBucket{ + Count: types.Int64(1), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("stringValue"), + IntegerValue: types.Int64(5), + }, + }, + components.FacetBucket{ + Count: types.Int64(1), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("stringValue"), + IntegerValue: types.Int64(5), + }, + }, + }, + }, + components.FacetResult{ + SourceName: types.String("sourceName"), + OperatorName: types.String("operatorName"), + Buckets: []components.FacetBucket{ + components.FacetBucket{ + Count: types.Int64(1), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("stringValue"), + IntegerValue: types.Int64(5), + }, + }, + components.FacetBucket{ + Count: types.Int64(1), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("stringValue"), + IntegerValue: types.Int64(5), + }, + }, + }, + }, + }, + RewrittenFacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("fieldName"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{}, + components.FacetFilterValue{}, + }, + }, + components.FacetFilter{ + FieldName: types.String("fieldName"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{}, + components.FacetFilterValue{}, + }, + }, + }, + HasMoreResults: types.Bool(true), + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1autocomplete.go b/tests/mockserver/internal/handler/pathpostrestapiv1autocomplete.go new file mode 100644 index 00000000..323d49bb --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1autocomplete.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Autocomplete(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "autocomplete[0]": + dir.HandlerFunc("autocomplete", testAutocompleteAutocomplete0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testAutocompleteAutocomplete0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.AutocompleteResponse{ + TrackingToken: types.String("trackingToken"), + Results: []components.AutocompleteResult{ + components.AutocompleteResult{ + Result: "sample result", + ResultType: components.AutocompleteResultResultTypeDocument.ToPointer(), + Score: types.Float64(4.56), + URL: types.String("https://www.example.com/"), + TrackingToken: types.String("abcd"), + }, + }, + BackendTimeMillis: types.Int64(1100), + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1chat.go b/tests/mockserver/internal/handler/pathpostrestapiv1chat.go new file mode 100644 index 00000000..24ba560b --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1chat.go @@ -0,0 +1,171 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Chat(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "chatStream-defaultExample[0]": + dir.HandlerFunc("chatStream", testChatStreamChatStreamDefaultExample0)(w, req) + case "chatStream-gptAgentExample[0]": + dir.HandlerFunc("chatStream", testChatStreamChatStreamGptAgentExample0)(w, req) + case "chatStream-streamingExample[0]": + dir.HandlerFunc("chatStream", testChatStreamChatStreamStreamingExample0)(w, req) + case "chatStream-updateResponse[0]": + dir.HandlerFunc("chatStream", testChatStreamChatStreamUpdateResponse0)(w, req) + case "chatStream-citationResponse[0]": + dir.HandlerFunc("chatStream", testChatStreamChatStreamCitationResponse0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testChatStreamChatStreamDefaultExample0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"text/plain"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBodyBytes := []byte("{\"messages\":[{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"hasMoreFragments\":false,\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\"},\"fragments\":[{\"text\":\"There are no holidays!\"}]}]}") + w.Header().Set("Content-Type", "text/plain") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} + +func testChatStreamChatStreamGptAgentExample0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"text/plain"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBodyBytes := []byte("") + w.Header().Set("Content-Type", "text/plain") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} + +func testChatStreamChatStreamStreamingExample0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"text/plain"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBodyBytes := []byte("{\"messages\":[{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\",\"hasMoreFragments\":true},\"fragments\":null},{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\",\"hasMoreFragments\":true},\"fragments\":null},{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\",\"hasMoreFragments\":true},\"fragments\":[{\"text\":\"e are\"}]},{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\",\"hasMoreFragments\":true},\"fragments\":[{\"text\":\"no hol\"}]},{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\",\"hasMoreFragments\":false},\"fragments\":[{\"text\":\"idays!\"}]}]}") + w.Header().Set("Content-Type", "text/plain") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} + +func testChatStreamChatStreamUpdateResponse0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"text/plain"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBodyBytes := []byte("{\"messages\":[{\"author\":\"GLEAN_AI\",\"messageType\":\"UPDATE\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\"},\"fragments\":[{\"text\":\"**Reading:**\"},{\"structuredResults\":[{\"document\":{\"id\":\"123\",\"title\":\"Company Handbook\"}}]}]}]}") + w.Header().Set("Content-Type", "text/plain") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} + +func testChatStreamChatStreamCitationResponse0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"text/plain"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBodyBytes := []byte("{\"messages\":[{\"author\":\"GLEAN_AI\",\"messageType\":\"CONTENT\",\"agentConfig\":{\"agent\":\"DEFAULT\",\"mode\":\"DEFAULT\"},\"citations\":[{\"sourceDocument\":{\"id\":\"123\",\"title\":\"Company Handbook\",\"referenceRanges\":[{\"textRange\":{\"startIndex\":0,\"endIndex\":12,\"type\":\"CITATION\"}}]}}]}]}") + w.Header().Set("Content-Type", "text/plain") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1createannouncement.go b/tests/mockserver/internal/handler/pathpostrestapiv1createannouncement.go new file mode 100644 index 00000000..e6508355 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createannouncement.go @@ -0,0 +1,2371 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Createannouncement(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createannouncement[0]": + dir.HandlerFunc("createannouncement", testCreateannouncementCreateannouncement0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testCreateannouncementCreateannouncement0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.Announcement{ + Body: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + StructuredList: []components.StructuredTextItem{ + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 520049, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 800759, + }, + components.TextRange{ + StartIndex: 117747, + }, + components.TextRange{ + StartIndex: 589813, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 277321, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + MentionedPeople: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "sleet where schedule", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 108833, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 572012, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + components.CollectionItem{ + CollectionID: 616892, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleVerifier, + }, + }, + }, + components.Collection{ + Name: "", + Description: "zowie nasalise punctually yippee", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 703146, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{ + Reactors: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 312813, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.Share{ + NumDaysAgo: 903800, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Reminders: []components.Reminder{ + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 620608, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 188605, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 252418, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 874230, + }, + CandidateVerifiers: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DraftID: types.Int64(342), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 605172, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1createanswer.go b/tests/mockserver/internal/handler/pathpostrestapiv1createanswer.go new file mode 100644 index 00000000..00ff9e15 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createanswer.go @@ -0,0 +1,2065 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Createanswer(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createanswer[0]": + dir.HandlerFunc("createanswer", testCreateanswerCreateanswer0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testCreateanswerCreateanswer0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.Answer{ + ID: 3, + DocID: types.String("ANSWERS_answer_3"), + Question: types.String("Why is the sky blue?"), + BodyText: types.String("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."), + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 433224, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 995852, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "shadowy foodstuffs welcome via deeply writ amid", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 629063, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 338524, + ItemType: components.CollectionItemItemTypeCollection, + }, + components.CollectionItem{ + CollectionID: 154150, + ItemType: components.CollectionItemItemTypeURL, + }, + components.CollectionItem{ + CollectionID: 739949, + ItemType: components.CollectionItemItemTypeCollection, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 982866, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 749299, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 150565, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 572012, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 185076, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 616892, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 190973, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + CombinedAnswerText: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + StructuredList: []components.StructuredTextItem{ + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 665035, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 261757, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + }, + }, + Likes: &components.AnswerLikes{ + LikedBy: []components.AnswerLike{ + components.AnswerLike{ + User: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LikedByUser: true, + NumLikes: 453975, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 557925, + }, + }, + }, + Board: &components.AnswerBoard{ + Name: "", + Description: "massive under meh severe ditch bungalow when sauerkraut", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 404062, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 639388, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1createauthtoken.go b/tests/mockserver/internal/handler/pathpostrestapiv1createauthtoken.go new file mode 100644 index 00000000..f2055916 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createauthtoken.go @@ -0,0 +1,65 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Createauthtoken(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createauthtoken[0]": + dir.HandlerFunc("createauthtoken", testCreateauthtokenCreateauthtoken0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testCreateauthtokenCreateauthtoken0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.CreateAuthTokenResponse{ + Token: "", + ExpirationTime: 207213, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go new file mode 100644 index 00000000..16f7233c --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go @@ -0,0 +1,1964 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Createcollection(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createcollection[0]": + dir.HandlerFunc("createcollection", testCreatecollectionCreatecollection0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.CreateCollectionResponse{ + Name: "", + Description: "mentor early miserly stealthily without trick yahoo until planula", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 784768, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 913221, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "lobotomise apud overwork snuggle midst er how allocation", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 884414, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 312813, + ItemType: components.CollectionItemItemTypeCollection, + }, + components.CollectionItem{ + CollectionID: 903800, + ItemType: components.CollectionItemItemTypeURL, + }, + }, + }, + components.Collection{ + Name: "", + Description: "given satisfy majority pace however crocodile yowza knowingly abaft", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 426375, + }, + components.Collection{ + Name: "", + Description: "failing white accompany whoever treasure", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 310702, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 446521, + }, + components.Share{ + NumDaysAgo: 909366, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 493315, + }, + components.Reminder{ + RemindAt: 778851, + }, + components.Reminder{ + RemindAt: 468734, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 307079, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 300662, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 488177, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 678847, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 48554, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 913385, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 816391, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Collection: &components.Collection{ + Name: "", + Description: "grade underachieve secret", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 772467, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeCollection, + }, + components.CollectionItem{ + CollectionID: 611865, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 488022, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Collection: &components.Collection{ + Name: "", + Description: "except solace fat whoa braid factorise apud generally out", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 560003, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeURL, + }, + }, + Children: []components.Collection{ + components.Collection{ + Name: "", + Description: "sweetly however whoever zowie wherever vivaciously", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 118148, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.Collection{ + Name: "", + Description: "shinny ugh sheepishly mmm queasily factorize arrogantly", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 754554, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleVerifier, + }, + }, + ErrorCode: components.CreateCollectionResponseErrorCodeConcurrentHierarchyEdit, + Collection: &components.Collection{ + Name: "", + Description: "adventurously given mean alienated geez than ack bah", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 958816, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1createshortcut.go b/tests/mockserver/internal/handler/pathpostrestapiv1createshortcut.go new file mode 100644 index 00000000..baf612de --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createshortcut.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Createshortcut(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createshortcut[0]": + dir.HandlerFunc("createshortcut", testCreateshortcutCreateshortcut0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testCreateshortcutCreateshortcut0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.CreateShortcutResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1deleteallchats.go b/tests/mockserver/internal/handler/pathpostrestapiv1deleteallchats.go new file mode 100644 index 00000000..a8326202 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1deleteallchats.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Deleteallchats(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteallchats[0]": + dir.HandlerFunc("deleteallchats", testDeleteallchatsDeleteallchats0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testDeleteallchatsDeleteallchats0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1deleteannouncement.go b/tests/mockserver/internal/handler/pathpostrestapiv1deleteannouncement.go new file mode 100644 index 00000000..8a58ed5c --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1deleteannouncement.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Deleteannouncement(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteannouncement[0]": + dir.HandlerFunc("deleteannouncement", testDeleteannouncementDeleteannouncement0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testDeleteannouncementDeleteannouncement0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1deleteanswer.go b/tests/mockserver/internal/handler/pathpostrestapiv1deleteanswer.go new file mode 100644 index 00000000..0b853e55 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1deleteanswer.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Deleteanswer(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteanswer[0]": + dir.HandlerFunc("deleteanswer", testDeleteanswerDeleteanswer0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testDeleteanswerDeleteanswer0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1deletechatfiles.go b/tests/mockserver/internal/handler/pathpostrestapiv1deletechatfiles.go new file mode 100644 index 00000000..9e26a1a0 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1deletechatfiles.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Deletechatfiles(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deletechatfiles[0]": + dir.HandlerFunc("deletechatfiles", testDeletechatfilesDeletechatfiles0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testDeletechatfilesDeletechatfiles0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1deletechats.go b/tests/mockserver/internal/handler/pathpostrestapiv1deletechats.go new file mode 100644 index 00000000..d1b13693 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1deletechats.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Deletechats(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deletechats[0]": + dir.HandlerFunc("deletechats", testDeletechatsDeletechats0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testDeletechatsDeletechats0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1deletecollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1deletecollection.go new file mode 100644 index 00000000..1089baf0 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1deletecollection.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Deletecollection(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deletecollection[0]": + dir.HandlerFunc("deletecollection", testDeletecollectionDeletecollection0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testDeletecollectionDeletecollection0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1deletecollectionitem.go b/tests/mockserver/internal/handler/pathpostrestapiv1deletecollectionitem.go new file mode 100644 index 00000000..b4f2f9ad --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1deletecollectionitem.go @@ -0,0 +1,1847 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Deletecollectionitem(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deletecollectionitem[0]": + dir.HandlerFunc("deletecollectionitem", testDeletecollectionitemDeletecollectionitem0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testDeletecollectionitemDeletecollectionitem0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.DeleteCollectionItemResponse{ + Collection: &components.Collection{ + Name: "", + Description: "up nice seafood", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 735937, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 663050, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 934663, + }, + components.Share{ + NumDaysAgo: 307207, + }, + components.Share{ + NumDaysAgo: 246264, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 835281, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 239964, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 260387, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 784251, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 501323, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeCollection, + }, + components.CollectionItem{ + CollectionID: 220432, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 187266, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeURL, + }, + components.CollectionItem{ + CollectionID: 16069, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 696999, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1deleteshortcut.go b/tests/mockserver/internal/handler/pathpostrestapiv1deleteshortcut.go new file mode 100644 index 00000000..0c4dc328 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1deleteshortcut.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Deleteshortcut(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "deleteshortcut[0]": + dir.HandlerFunc("deleteshortcut", testDeleteshortcutDeleteshortcut0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testDeleteshortcutDeleteshortcut0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1editanswer.go b/tests/mockserver/internal/handler/pathpostrestapiv1editanswer.go new file mode 100644 index 00000000..3e6d8e2a --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1editanswer.go @@ -0,0 +1,2231 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Editanswer(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "editanswer[0]": + dir.HandlerFunc("editanswer", testEditanswerEditanswer0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testEditanswerEditanswer0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.Answer{ + ID: 3, + DocID: types.String("ANSWERS_answer_3"), + Question: types.String("Why is the sky blue?"), + BodyText: types.String("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."), + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 490266, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 949852, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "overwork scent er alert consequently brochure awful chilly scary", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 859594, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 359827, + ItemType: components.CollectionItemItemTypeText, + }, + }, + }, + components.Collection{ + Name: "", + Description: "below considering correctly poor instead", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 973585, + }, + components.Collection{ + Name: "", + Description: "brr pillbox exactly through scented drive etch", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 353341, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 119170, + }, + components.Share{ + NumDaysAgo: 28922, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 103434, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 57214, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 72991, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 900561, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + CombinedAnswerText: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + StructuredList: []components.StructuredTextItem{ + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 751237, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 488606, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + }, + }, + Likes: &components.AnswerLikes{ + LikedBy: []components.AnswerLike{ + components.AnswerLike{ + User: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.AnswerLike{ + User: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.AnswerLike{ + User: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LikedByUser: false, + NumLikes: 526808, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 945691, + }, + }, + }, + Board: &components.AnswerBoard{ + Name: "", + Description: "transparency lest while up yahoo towards fabricate motionless", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 882159, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 12186, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1editcollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1editcollection.go new file mode 100644 index 00000000..85035720 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1editcollection.go @@ -0,0 +1,1491 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Editcollection(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "editcollection[0]": + dir.HandlerFunc("editcollection", testEditcollectionEditcollection0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testEditcollectionEditcollection0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.EditCollectionResponse{ + Name: "", + Description: "urgently voluntarily scale gut", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 643119, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 553539, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "exotic fussy shadowy", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 224552, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 774530, + ItemType: components.CollectionItemItemTypeDocument, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 115263, + }, + components.Share{ + NumDaysAgo: 925954, + }, + components.Share{ + NumDaysAgo: 538720, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 318637, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 219050, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 762098, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 595467, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 619716, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 22113, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Collection: &components.Collection{ + Name: "", + Description: "queasily down worthy generously than narrate pish off", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 567572, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeText, + }, + }, + Children: []components.Collection{ + components.Collection{ + Name: "", + Description: "since straight gadzooks pulp", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 89970, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + }, + ErrorCode: components.EditCollectionResponseErrorCodeNameExists, + Collection: &components.Collection{ + Name: "", + Description: "ameliorate well political", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 151869, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1editcollectionitem.go b/tests/mockserver/internal/handler/pathpostrestapiv1editcollectionitem.go new file mode 100644 index 00000000..fef63305 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1editcollectionitem.go @@ -0,0 +1,1134 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Editcollectionitem(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "editcollectionitem[0]": + dir.HandlerFunc("editcollectionitem", testEditcollectionitemEditcollectionitem0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testEditcollectionitemEditcollectionitem0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.EditCollectionItemResponse{ + Collection: &components.Collection{ + Name: "", + Description: "where nasalise emphasize jealously appliance", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 927066, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 702646, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 600927, + }, + components.Share{ + NumDaysAgo: 753737, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 841463, + }, + components.Reminder{ + RemindAt: 402252, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 286790, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 519565, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 90490, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 304041, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 299381, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 992935, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 559534, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 788309, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 487486, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleVerifier, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1editpin.go b/tests/mockserver/internal/handler/pathpostrestapiv1editpin.go new file mode 100644 index 00000000..6947ec7b --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1editpin.go @@ -0,0 +1,406 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Editpin(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "editpin[0]": + dir.HandlerFunc("editpin", testEditpinEditpin0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testEditpinEditpin0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 922296, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 47491, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "informal wrongly lest slime since pace into row", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 793957, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 841760, + ItemType: components.CollectionItemItemTypeCollection, + }, + components.CollectionItem{ + CollectionID: 546659, + ItemType: components.CollectionItemItemTypeCollection, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + }, + }, + components.Collection{ + Name: "", + Description: "twine because unnaturally card gallery among agile duh pro athwart", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 201064, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 544237, + }, + components.Share{ + NumDaysAgo: 241956, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 448916, + }, + components.Reminder{ + RemindAt: 494003, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 29269, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1feed.go b/tests/mockserver/internal/handler/pathpostrestapiv1feed.go new file mode 100644 index 00000000..910b74f4 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1feed.go @@ -0,0 +1,2074 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Feed(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "feed[0]": + dir.HandlerFunc("feed", testFeedFeed0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testFeedFeed0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.FeedResponse{ + ServerTimestamp: 152670, + Results: []components.FeedResult{ + components.FeedResult{ + Category: components.FeedResultCategoryZeroStateWorkflowFavorites, + PrimaryEntry: components.FeedEntry{ + Title: "", + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Event: &components.CalendarEvent{ + ID: "", + URL: "https://cultivated-longboat.com", + Attendees: &components.CalendarAttendees{ + People: []components.CalendarAttendee{ + components.CalendarAttendee{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + GeneratedAttachments: []components.GeneratedAttachment{ + components.GeneratedAttachment{ + Documents: []components.Document{ + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Customer: &components.Customer{ + ID: "", + Company: components.Company{ + Name: "", + Location: types.String("New York City"), + Industry: types.String("Finances"), + About: types.String("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"), + }, + Poc: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + Notes: types.String("CIO is interested in trying out the product."), + }, + ExternalLinks: []components.StructuredLink{ + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + Content: []components.GeneratedAttachmentContent{ + components.GeneratedAttachmentContent{ + DisplayHeader: types.String("Action Items"), + }, + }, + }, + }, + }, + Announcement: &components.Announcement{ + DraftID: types.Int64(342), + }, + Collection: &components.Collection{ + Name: "", + Description: "toward potentially zealous", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleVerifier, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleOwner, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 455039, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 31514, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + ItemType: components.CollectionItemItemTypeText, + }, + components.CollectionItem{ + CollectionID: 698671, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + ItemType: components.CollectionItemItemTypeURL, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleViewer, + }, + }, + }, + CollectionItem: &components.CollectionItem{ + CollectionID: 250166, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Collection: &components.Collection{ + Name: "", + Description: "instead waft bah failing um under out", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 230306, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{}, + Children: []components.Collection{}, + Roles: []components.UserRoleSpecification{}, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + PromptTemplate: &components.PromptTemplateResult{ + PromptTemplate: &components.PromptTemplate{ + Template: "", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleEditor, + }, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleEditor, + }, + }, + }, + }, + Workflow: &components.WorkflowResult{ + Workflow: components.Workflow{ + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + Activities: []components.UserActivity{ + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + SecondaryEntries: []components.FeedEntry{ + components.FeedEntry{ + Title: "", + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Event: &components.CalendarEvent{ + ID: "", + URL: "https://partial-saw.com", + Attendees: &components.CalendarAttendees{ + People: []components.CalendarAttendee{}, + }, + GeneratedAttachments: []components.GeneratedAttachment{ + components.GeneratedAttachment{ + Documents: []components.Document{ + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Customer: &components.Customer{ + ID: "", + Company: components.Company{ + Name: "", + Location: types.String("New York City"), + Industry: types.String("Finances"), + About: types.String("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"), + }, + Poc: []components.Person{}, + MergedCustomers: []components.Customer{}, + Notes: types.String("CIO is interested in trying out the product."), + }, + ExternalLinks: []components.StructuredLink{ + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + Content: []components.GeneratedAttachmentContent{ + components.GeneratedAttachmentContent{ + DisplayHeader: types.String("Action Items"), + }, + }, + }, + components.GeneratedAttachment{ + Documents: []components.Document{ + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Customer: &components.Customer{ + ID: "", + Company: components.Company{ + Name: "", + Location: types.String("New York City"), + Industry: types.String("Finances"), + About: types.String("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"), + }, + Poc: []components.Person{}, + MergedCustomers: []components.Customer{}, + Notes: types.String("CIO is interested in trying out the product."), + }, + ExternalLinks: []components.StructuredLink{ + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + Content: []components.GeneratedAttachmentContent{ + components.GeneratedAttachmentContent{ + DisplayHeader: types.String("Action Items"), + }, + }, + }, + }, + }, + Announcement: &components.Announcement{ + DraftID: types.Int64(342), + }, + Collection: &components.Collection{ + Name: "", + Description: "management polyester flustered dimly", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 301931, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{}, + Children: []components.Collection{}, + Roles: []components.UserRoleSpecification{}, + }, + CollectionItem: &components.CollectionItem{ + CollectionID: 350031, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Collection: &components.Collection{ + Name: "", + Description: "deliquesce so where aw peninsula at standard brr failing owlishly", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 259619, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{}, + Children: []components.Collection{}, + Roles: []components.UserRoleSpecification{}, + }, + ItemType: components.CollectionItemItemTypeCollection, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + PromptTemplate: &components.PromptTemplateResult{ + PromptTemplate: &components.PromptTemplate{ + Template: "", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + }, + }, + }, + Workflow: &components.WorkflowResult{ + Workflow: components.Workflow{ + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + Activities: []components.UserActivity{ + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + }, + }, + components.FeedResult{ + Category: components.FeedResultCategoryDisplayableList, + PrimaryEntry: components.FeedEntry{ + Title: "", + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Event: &components.CalendarEvent{ + ID: "", + URL: "https://qualified-plumber.info", + Attendees: &components.CalendarAttendees{ + People: []components.CalendarAttendee{}, + }, + GeneratedAttachments: []components.GeneratedAttachment{ + components.GeneratedAttachment{ + Documents: []components.Document{ + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Customer: &components.Customer{ + ID: "", + Company: components.Company{ + Name: "", + Location: types.String("New York City"), + Industry: types.String("Finances"), + About: types.String("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"), + }, + Poc: []components.Person{}, + MergedCustomers: []components.Customer{}, + Notes: types.String("CIO is interested in trying out the product."), + }, + ExternalLinks: []components.StructuredLink{ + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + Content: []components.GeneratedAttachmentContent{ + components.GeneratedAttachmentContent{ + DisplayHeader: types.String("Action Items"), + }, + }, + }, + }, + }, + Announcement: &components.Announcement{ + DraftID: types.Int64(342), + }, + Collection: &components.Collection{ + Name: "", + Description: "grandiose yowza stale yet sinful mmm", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 659387, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{}, + Children: []components.Collection{}, + Roles: []components.UserRoleSpecification{}, + }, + CollectionItem: &components.CollectionItem{ + CollectionID: 460790, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Collection: &components.Collection{ + Name: "", + Description: "since jubilantly meanwhile vestment muddy stiff", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 507793, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{}, + Children: []components.Collection{}, + Roles: []components.UserRoleSpecification{}, + }, + ItemType: components.CollectionItemItemTypeText, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + PromptTemplate: &components.PromptTemplateResult{ + PromptTemplate: &components.PromptTemplate{ + Template: "", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleOwner, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleVerifier, + }, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleEditor, + }, + }, + }, + }, + Workflow: &components.WorkflowResult{ + Workflow: components.Workflow{ + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + Activities: []components.UserActivity{ + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + SecondaryEntries: []components.FeedEntry{ + components.FeedEntry{ + Title: "", + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Event: &components.CalendarEvent{ + ID: "", + URL: "https://utter-populist.net", + Attendees: &components.CalendarAttendees{ + People: []components.CalendarAttendee{}, + }, + GeneratedAttachments: []components.GeneratedAttachment{ + components.GeneratedAttachment{ + Documents: []components.Document{ + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Customer: &components.Customer{ + ID: "", + Company: components.Company{ + Name: "", + Location: types.String("New York City"), + Industry: types.String("Finances"), + About: types.String("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"), + }, + Poc: []components.Person{}, + MergedCustomers: []components.Customer{}, + Notes: types.String("CIO is interested in trying out the product."), + }, + ExternalLinks: []components.StructuredLink{ + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + Content: []components.GeneratedAttachmentContent{ + components.GeneratedAttachmentContent{ + DisplayHeader: types.String("Action Items"), + }, + }, + }, + }, + }, + Announcement: &components.Announcement{ + DraftID: types.Int64(342), + }, + Collection: &components.Collection{ + Name: "", + Description: "verve however unhealthy delightfully formamide utter redress for finally", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 613860, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{}, + Children: []components.Collection{}, + Roles: []components.UserRoleSpecification{}, + }, + CollectionItem: &components.CollectionItem{ + CollectionID: 938484, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Collection: &components.Collection{ + Name: "", + Description: "stoop dowse tensely duh atop which any", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 761068, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{}, + Children: []components.Collection{}, + Roles: []components.UserRoleSpecification{}, + }, + ItemType: components.CollectionItemItemTypeURL, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + PromptTemplate: &components.PromptTemplateResult{ + PromptTemplate: &components.PromptTemplate{ + Template: "", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + }, + }, + }, + Workflow: &components.WorkflowResult{ + Workflow: components.Workflow{ + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + Activities: []components.UserActivity{ + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + components.FeedEntry{ + Title: "", + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Event: &components.CalendarEvent{ + ID: "", + URL: "https://babyish-quinoa.name/", + Attendees: &components.CalendarAttendees{ + People: []components.CalendarAttendee{}, + }, + GeneratedAttachments: []components.GeneratedAttachment{ + components.GeneratedAttachment{ + Documents: []components.Document{ + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Customer: &components.Customer{ + ID: "", + Company: components.Company{ + Name: "", + Location: types.String("New York City"), + Industry: types.String("Finances"), + About: types.String("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"), + }, + Poc: []components.Person{}, + MergedCustomers: []components.Customer{}, + Notes: types.String("CIO is interested in trying out the product."), + }, + ExternalLinks: []components.StructuredLink{ + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + components.StructuredLink{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + Content: []components.GeneratedAttachmentContent{ + components.GeneratedAttachmentContent{ + DisplayHeader: types.String("Action Items"), + }, + }, + }, + }, + }, + Announcement: &components.Announcement{ + DraftID: types.Int64(342), + }, + Collection: &components.Collection{ + Name: "", + Description: "unearth grubby bathrobe instead brr soupy", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 591260, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{}, + Children: []components.Collection{}, + Roles: []components.UserRoleSpecification{}, + }, + CollectionItem: &components.CollectionItem{ + CollectionID: 946419, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Collection: &components.Collection{ + Name: "", + Description: "awkwardly given whoever curiously around jump or", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 206282, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{}, + Children: []components.Collection{}, + Roles: []components.UserRoleSpecification{}, + }, + ItemType: components.CollectionItemItemTypeText, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + PromptTemplate: &components.PromptTemplateResult{ + PromptTemplate: &components.PromptTemplate{ + Template: "", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleViewer, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleAnswerModerator, + }, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleViewer, + }, + }, + }, + }, + Workflow: &components.WorkflowResult{ + Workflow: components.Workflow{ + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + Activities: []components.UserActivity{ + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.UserActivity{ + Actor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + }, + }, + }, + FacetResults: map[string][]components.FacetResult{ + "key": []components.FacetResult{ + components.FacetResult{ + SourceName: types.String("container_name"), + OperatorName: types.String("SelectMultiple"), + Buckets: []components.FacetBucket{ + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + HasMoreBuckets: types.Bool(false), + GroupName: types.String("Service Cloud"), + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1feedback.go b/tests/mockserver/internal/handler/pathpostrestapiv1feedback.go new file mode 100644 index 00000000..372a01f2 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1feedback.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Feedback(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "feedback[0]": + dir.HandlerFunc("feedback", testFeedbackFeedback0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testFeedbackFeedback0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", false); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getanswer.go b/tests/mockserver/internal/handler/pathpostrestapiv1getanswer.go new file mode 100644 index 00000000..497adcd4 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getanswer.go @@ -0,0 +1,2650 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Getanswer(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getanswer[0]": + dir.HandlerFunc("getanswer", testGetanswerGetanswer0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetanswerGetanswer0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetAnswerResponse{ + AnswerResult: &components.AnswerResult{ + Answer: components.Answer{ + ID: 3, + DocID: types.String("ANSWERS_answer_3"), + Question: types.String("Why is the sky blue?"), + BodyText: types.String("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."), + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 521235, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 458049, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "carefully glorious scrabble ignite", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 159685, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 108980, + ItemType: components.CollectionItemItemTypeCollection, + }, + components.CollectionItem{ + CollectionID: 644971, + ItemType: components.CollectionItemItemTypeURL, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 384844, + }, + components.Share{ + NumDaysAgo: 91052, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 656841, + }, + components.Reminder{ + RemindAt: 570980, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 607679, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 397483, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 455424, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 103111, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 392574, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 754054, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + CombinedAnswerText: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + StructuredList: []components.StructuredTextItem{ + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 710636, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 395188, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 547184, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + }, + }, + Likes: &components.AnswerLikes{ + LikedBy: []components.AnswerLike{ + components.AnswerLike{ + User: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.AnswerLike{ + User: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.AnswerLike{ + User: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LikedByUser: false, + NumLikes: 576892, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 258862, + }, + }, + }, + Board: &components.AnswerBoard{ + Name: "", + Description: "whether deflate book knotty er beneath nervously than", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 194354, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 831606, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + Error: &components.GetAnswerError{ + AnswerAuthor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go new file mode 100644 index 00000000..93343662 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go @@ -0,0 +1,1202 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Getchat(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getchat[0]": + dir.HandlerFunc("getchat", testGetchatGetchat0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetchatGetchat0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetChatResponse{ + ChatResult: &components.ChatResult{ + Chat: &components.Chat{ + ID: types.String("string"), + CreateTime: types.Int64(0), + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdateTime: types.Int64(0), + Name: types.String("string"), + ApplicationID: types.String("string"), + ApplicationName: types.String("string"), + Icon: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + Messages: []components.ChatMessage{ + components.ChatMessage{ + AgentConfig: &components.AgentConfig{ + Agent: components.AgentEnumDefault.ToPointer(), + Mode: components.ModeDefault.ToPointer(), + }, + Author: components.AuthorUser.ToPointer(), + Citations: []components.ChatMessageCitation{ + components.ChatMessageCitation{ + TrackingToken: types.String("string"), + SourceDocument: &components.Document{ + ID: types.String("string"), + Datasource: types.String("string"), + ConnectorType: components.ConnectorTypeAPICrawl.ToPointer(), + DocType: types.String("string"), + Content: &components.DocumentContent{ + FullTextList: []string{ + "", + }, + }, + Title: types.String("string"), + URL: types.String("string"), + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + Sections: []components.DocumentSection{ + components.DocumentSection{ + Title: types.String(""), + URL: types.String("https://normal-making.name"), + }, + }, + }, + SourceFile: &components.ChatFile{ + ID: types.String("FILE_1234"), + URL: types.String("www.google.com"), + Name: types.String("sample.pdf"), + Metadata: &components.ChatFileMetadata{ + Status: components.ChatFileStatusProcessing.ToPointer(), + UploadTime: types.Int64(0), + ProcessedSize: types.Int64(0), + FailureReason: components.ChatFileFailureReasonParseFailed.ToPointer(), + MimeType: types.String("string"), + }, + }, + SourcePerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + ReferenceRanges: []components.ReferenceRange{ + components.ReferenceRange{ + TextRange: &components.TextRange{ + StartIndex: 969961, + EndIndex: types.Int64(458049), + Type: components.TextRangeTypeCitation.ToPointer(), + URL: types.String("https://earnest-tuber.info/"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "", + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 78888, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 219956, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 313464, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + UploadedFileIds: []string{ + "string", + }, + Fragments: []components.ChatMessageFragment{ + components.ChatMessageFragment{ + StructuredResults: []components.StructuredResult{ + components.StructuredResult{ + Document: &components.Document{ + ID: types.String(""), + Datasource: types.String(""), + ConnectorType: components.ConnectorTypeAPICrawl.ToPointer(), + DocType: types.String(""), + Title: types.String(""), + URL: types.String("https://strange-gloom.net"), + Metadata: &components.DocumentMetadata{ + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + MentionedPeople: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "scrabble ignite aw showboat shakily", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleEditor, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 843618, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 149108, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + ItemType: components.CollectionItemItemTypeURL, + }, + components.CollectionItem{ + CollectionID: 503671, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + ItemType: components.CollectionItemItemTypeCollection, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Role: components.UserRoleOwner, + }, + }, + }, + components.Collection{ + Name: "", + Description: "ah ack aha bah", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 72193, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Items: []components.CollectionItem{}, + Children: []components.Collection{}, + Roles: []components.UserRoleSpecification{}, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{ + Reactors: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + components.Reaction{ + Reactors: []components.Person{}, + }, + components.Reaction{ + Reactors: []components.Person{}, + }, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 786783, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.Share{ + NumDaysAgo: 972276, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Reminders: []components.Reminder{ + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + RemindAt: 844917, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + RemindAt: 531548, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + RemindAt: 576892, + }, + CandidateVerifiers: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + Sections: []components.DocumentSection{}, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Customer: &components.Customer{ + ID: "", + Domains: []string{}, + Company: components.Company{ + Name: "", + Location: types.String("New York City"), + Industry: types.String("Finances"), + About: types.String("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"), + }, + DocumentCounts: map[string]int64{ + "key": 534384, + "key1": 901064, + }, + Poc: []components.Person{}, + MergedCustomers: []components.Customer{}, + StartDate: types.MustNewDateFromString("2025-09-27"), + ContractAnnualRevenue: types.Float64(2187.45), + Notes: types.String(""), + }, + Team: &components.Team{ + ID: "", + Name: "", + Description: types.String("aw fibre hassle freezing but conversation under"), + BusinessUnit: types.String(""), + Department: types.String(""), + PhotoURL: types.String("https://sizzling-accountability.net/"), + BannerURL: types.String("https://miserable-hydrant.biz/"), + ExternalLink: types.String("https://hasty-cappelletti.name/"), + Members: []components.PersonToTeamRelationship{}, + MemberCount: types.Int64(626356), + Emails: []components.TeamEmail{}, + DatasourceProfiles: []components.DatasourceProfile{}, + Datasource: types.String(""), + CreatedFrom: types.String(""), + LastUpdatedAt: types.MustNewTimeFromString("2023-08-02T00:17:06.651Z"), + Status: components.TeamStatusQueuedForCreation.ToPointer(), + CanBeDeleted: types.Bool(false), + LoggingID: types.String(""), + }, + CustomEntity: &components.CustomEntity{ + ID: types.String(""), + Title: types.String(""), + Datasource: types.String(""), + ObjectType: types.String(""), + Roles: []components.UserRoleSpecification{}, + }, + Answer: &components.Answer{ + ID: 313992, + DocID: types.String(""), + Question: types.String(""), + QuestionVariations: []string{}, + BodyText: types.String(""), + BoardID: types.Int64(933583), + AudienceFilters: []components.FacetFilter{}, + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + Roles: []components.UserRoleSpecification{}, + SourceDocumentSpec: types.Pointer(components.CreateDocumentSpecUnionDocumentSpec1( + components.DocumentSpec1{}, + )), + SourceType: components.AnswerSourceTypeAssistant.ToPointer(), + CombinedAnswerText: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + StructuredList: []components.StructuredTextItem{ + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + }, + }, + Likes: &components.AnswerLikes{ + LikedBy: []components.AnswerLike{}, + LikedByUser: false, + NumLikes: 30856, + }, + Author: &components.Person{ + Name: "", + ObfuscatedID: "", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{}, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + Results: []components.SearchResult{}, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + Results: []components.SearchResult{}, + }, + }, + Metadata: &components.PersonMetadata{ + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + }, + }, + CreateTime: types.MustNewTimeFromString("2024-01-11T09:24:54.882Z"), + UpdateTime: types.MustNewTimeFromString("2024-10-30T08:25:44.878Z"), + UpdatedBy: &components.Person{ + Name: "", + ObfuscatedID: "", + RelatedDocuments: []components.RelatedDocuments{}, + Metadata: &components.PersonMetadata{ + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + Reminders: []components.Reminder{}, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + RemindAt: 306618, + }, + CandidateVerifiers: []components.Person{}, + }, + }, + Board: &components.AnswerBoard{ + Name: "", + Description: "indolent vainly closely", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 601522, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + Roles: []components.UserRoleSpecification{}, + }, + Collections: []components.Collection{}, + DocumentCategory: types.String(""), + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + ExtractedQnA: &components.ExtractedQnA{ + Heading: types.String(""), + Question: types.String(""), + QuestionResult: &components.SearchResult{ + StructuredResults: []components.StructuredResult{}, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "name", + ObfuscatedID: "", + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + URL: "https://gorgeous-custom.org/", + Snippets: []components.SearchResultSnippet{}, + RelatedResults: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + Results: []components.SearchResult{}, + }, + }, + AllClusteredResults: []components.ClusterGroup{ + components.ClusterGroup{ + ClusteredResults: []components.SearchResult{}, + VisibleCountHint: 564329, + }, + }, + MustIncludeSuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + Pins: []components.PinDocument{}, + }, + }, + Meeting: &components.Meeting{ + ID: types.String(""), + Title: types.String(""), + Description: types.String("inside dulcimer however sonnet um eek until geez phew"), + StartTime: types.MustNewTimeFromString("2025-10-27T12:29:37.632Z"), + EndTime: types.MustNewTimeFromString("2024-03-28T07:14:42.093Z"), + Attendees: &components.CalendarAttendees{ + People: []components.CalendarAttendee{ + components.CalendarAttendee{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + components.CalendarAttendee{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + GroupAttendees: []components.CalendarAttendee{}, + }, + }, + }, + }, + App: &components.AppResult{ + Datasource: "", + DocType: types.String(""), + MimeType: types.String(""), + IconURL: types.String("https://bustling-birdbath.org"), + }, + Collection: &components.Collection{ + Name: "", + Description: "unless yuck serenade cuddly rundown neighboring considering upliftingly why", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{}, + Icon: types.String(""), + AdminLocked: types.Bool(false), + ParentID: types.Int64(896826), + AllowedDatasource: types.String(""), + ID: 67110, + CreateTime: types.MustNewTimeFromString("2024-07-30T13:34:32.569Z"), + UpdateTime: types.MustNewTimeFromString("2023-04-24T03:06:17.109Z"), + Creator: &components.Person{ + Name: "", + ObfuscatedID: "", + RelatedDocuments: []components.RelatedDocuments{}, + Metadata: &components.PersonMetadata{ + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + }, + }, + UpdatedBy: &components.Person{ + Name: "", + ObfuscatedID: "", + RelatedDocuments: []components.RelatedDocuments{}, + Metadata: &components.PersonMetadata{ + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + }, + }, + ItemCount: types.Int64(534236), + ChildCount: types.Int64(215291), + Items: []components.CollectionItem{}, + Shortcuts: []string{}, + Children: []components.Collection{}, + Roles: []components.UserRoleSpecification{}, + }, + AnswerBoard: &components.AnswerBoard{ + Name: "", + Description: "innocent downchange ick rudely what youthfully lightly yum", + AddedRoles: []components.UserRoleSpecification{}, + RemovedRoles: []components.UserRoleSpecification{}, + AudienceFilters: []components.FacetFilter{}, + ID: 569914, + CreateTime: types.MustNewTimeFromString("2023-02-12T07:51:20.736Z"), + UpdateTime: types.MustNewTimeFromString("2024-03-18T02:09:52.587Z"), + Creator: &components.Person{ + Name: "", + ObfuscatedID: "", + RelatedDocuments: []components.RelatedDocuments{}, + Metadata: &components.PersonMetadata{ + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + }, + }, + UpdatedBy: &components.Person{ + Name: "", + ObfuscatedID: "", + RelatedDocuments: []components.RelatedDocuments{}, + Metadata: &components.PersonMetadata{ + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + }, + }, + ItemCount: types.Int64(771154), + Roles: []components.UserRoleSpecification{}, + }, + Code: &components.Code{ + RepoName: types.String("scio"), + FileName: types.String("README.md"), + }, + Shortcut: &components.Shortcut{ + InputAlias: "", + DestinationURL: types.String("https://tight-version.org/"), + 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"), + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{}, + Person: &components.Person{ + Name: "", + ObfuscatedID: "", + RelatedDocuments: []components.RelatedDocuments{}, + Metadata: &components.PersonMetadata{ + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + }, + }, + }, + RelatedDocuments: []components.RelatedDocuments{}, + RelatedQuestion: &components.RelatedQuestion{ + Question: types.String(""), + Answer: types.String(""), + Ranges: []components.TextRange{}, + }, + Disambiguation: &components.Disambiguation{ + Name: types.String(""), + ID: types.String(""), + Type: components.EntityTypePerson.ToPointer(), + }, + Snippets: []components.SearchResultSnippet{}, + TrackingToken: types.String("string"), + Prominence: components.ProminenceHero.ToPointer(), + Source: components.StructuredResultSourceExpertDetection.ToPointer(), + }, + }, + TrackingToken: types.String("string"), + Text: types.String("string"), + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + File: &components.ChatFile{ + ID: types.String("FILE_1234"), + URL: types.String("www.google.com"), + Name: types.String("sample.pdf"), + Metadata: &components.ChatFileMetadata{ + Status: components.ChatFileStatusProcessing.ToPointer(), + UploadTime: types.Int64(0), + ProcessedSize: types.Int64(0), + FailureReason: components.ChatFileFailureReasonParseFailed.ToPointer(), + MimeType: types.String("string"), + }, + }, + Action: &components.ToolInfo{ + Metadata: &components.ToolMetadata{ + Type: components.ToolMetadataTypeRetrieval, + Name: "string", + DisplayName: "string", + ToolID: types.String("string"), + DisplayDescription: "string", + LogoURL: types.String("string"), + ObjectName: types.String("[\"HR ticket\",\"Email\",\"Chat message\"]"), + KnowledgeType: components.KnowledgeTypeNeutralKnowledge.ToPointer(), + CreatedBy: &components.PersonObject{ + Name: "", + ObfuscatedID: "", + }, + LastUpdatedBy: &components.PersonObject{ + Name: "", + ObfuscatedID: "", + }, + CreatedAt: types.MustNewTimeFromString("2019-08-24T14:15:22Z"), + LastUpdatedAt: types.MustNewTimeFromString("2019-08-24T14:15:22Z"), + WriteActionType: components.WriteActionTypeRedirect.ToPointer(), + AuthType: components.AuthTypeNone.ToPointer(), + Auth: &components.AuthConfig{ + IsOnPrem: types.Bool(true), + UsesCentralAuth: types.Bool(false), + Type: components.AuthConfigTypeDwd.ToPointer(), + GrantType: components.GrantTypeAuthCode.ToPointer(), + Status: components.AuthConfigStatusAuthorized.ToPointer(), + ClientURL: types.String("https://woeful-trench.com/"), + Scopes: []string{}, + Audiences: []string{}, + AuthorizationURL: types.String("https://imaginative-premium.com/"), + LastAuthorizedAt: types.MustNewTimeFromString("2023-12-19T20:03:14.149Z"), + }, + Permissions: &components.ObjectPermissions{}, + UsageInstructions: types.String("string"), + IsSetupFinished: types.Bool(true), + }, + Parameters: map[string]components.WriteActionParameter{ + "property1": components.WriteActionParameter{ + Type: components.WriteActionParameterTypeUnknown.ToPointer(), + DisplayName: types.String("Shemar63"), + Value: types.String(""), + IsRequired: types.Bool(true), + Description: types.String("handle unlike unlike fen gently or exotic mortally nor"), + PossibleValues: []components.PossibleValue{}, + }, + "property2": components.WriteActionParameter{ + Type: components.WriteActionParameterTypeString.ToPointer(), + DisplayName: types.String("Ahmad_Reichel95"), + Value: types.String(""), + IsRequired: types.Bool(false), + Description: types.String("mmm premise pro instead bleakly starch including per ill-fated"), + PossibleValues: []components.PossibleValue{}, + }, + }, + }, + }, + }, + Ts: types.String("string"), + MessageID: types.String("string"), + MessageTrackingToken: types.String("string"), + MessageType: components.MessageTypeUpdate.ToPointer(), + HasMoreFragments: types.Bool(true), + }, + }, + }, + TrackingToken: types.String("string"), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getchatapplication.go b/tests/mockserver/internal/handler/pathpostrestapiv1getchatapplication.go new file mode 100644 index 00000000..73921fbb --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getchatapplication.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Getchatapplication(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getchatapplication[0]": + dir.HandlerFunc("getchatapplication", testGetchatapplicationGetchatapplication0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetchatapplicationGetchatapplication0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetChatApplicationResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getchatfiles.go b/tests/mockserver/internal/handler/pathpostrestapiv1getchatfiles.go new file mode 100644 index 00000000..634da19e --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getchatfiles.go @@ -0,0 +1,86 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Getchatfiles(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getchatfiles[0]": + dir.HandlerFunc("getchatfiles", testGetchatfilesGetchatfiles0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetchatfilesGetchatfiles0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetChatFilesResponse{ + Files: map[string]components.ChatFile{ + "key": components.ChatFile{ + ID: types.String("FILE_1234"), + URL: types.String("www.google.com"), + Name: types.String("sample.pdf"), + }, + "key1": components.ChatFile{ + ID: types.String("FILE_1234"), + URL: types.String("www.google.com"), + Name: types.String("sample.pdf"), + }, + "key2": components.ChatFile{ + ID: types.String("FILE_1234"), + URL: types.String("www.google.com"), + Name: types.String("sample.pdf"), + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getcollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1getcollection.go new file mode 100644 index 00000000..06602a26 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getcollection.go @@ -0,0 +1,1335 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Getcollection(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getcollection[0]": + dir.HandlerFunc("getcollection", testGetcollectionGetcollection0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetcollectionGetcollection0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetCollectionResponse{ + Collection: &components.Collection{ + Name: "", + Description: "for carefully glorious scrabble ignite aw showboat", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 607679, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 397483, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 392574, + }, + components.Share{ + NumDaysAgo: 908293, + }, + components.Share{ + NumDaysAgo: 754054, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 149108, + }, + components.Reminder{ + RemindAt: 741131, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 503671, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 486669, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 81373, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 165215, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 666980, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 25042, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 168726, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 491026, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 844917, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeURL, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + }, + RootCollection: &components.Collection{ + Name: "", + Description: "aw fibre hassle freezing but conversation under", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 22258, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getdocpermissions.go b/tests/mockserver/internal/handler/pathpostrestapiv1getdocpermissions.go new file mode 100644 index 00000000..1a9ec320 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getdocpermissions.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Getdocpermissions(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getdocpermissions[0]": + dir.HandlerFunc("getdocpermissions", testGetdocpermissionsGetdocpermissions0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetdocpermissionsGetdocpermissions0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetDocPermissionsResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getdocuments.go b/tests/mockserver/internal/handler/pathpostrestapiv1getdocuments.go new file mode 100644 index 00000000..de33c6ba --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getdocuments.go @@ -0,0 +1,79 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Getdocuments(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getdocuments[0]": + dir.HandlerFunc("getdocuments", testGetdocumentsGetdocuments0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetdocumentsGetdocuments0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", false); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetDocumentsResponse{ + Documents: map[string]components.DocumentOrErrorUnion{ + "key": components.CreateDocumentOrErrorUnionDocument( + components.Document{}, + ), + "key1": components.CreateDocumentOrErrorUnionDocument( + components.Document{}, + ), + "key2": components.CreateDocumentOrErrorUnionDocument( + components.Document{}, + ), + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getdocumentsbyfacets.go b/tests/mockserver/internal/handler/pathpostrestapiv1getdocumentsbyfacets.go new file mode 100644 index 00000000..84cb4d74 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getdocumentsbyfacets.go @@ -0,0 +1,1341 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Getdocumentsbyfacets(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getdocumentsbyfacets[0]": + dir.HandlerFunc("getdocumentsbyfacets", testGetdocumentsbyfacetsGetdocumentsbyfacets0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetdocumentsbyfacetsGetdocumentsbyfacets0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", false); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetDocumentsByFacetsResponse{ + Documents: []components.Document{ + components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 847689, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 244762, + }, + components.TextRange{ + StartIndex: 577503, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 946448, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + MentionedPeople: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "since unlike huzzah chunder ignite loftily bar circa flame", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 327937, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 69838, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + components.CollectionItem{ + CollectionID: 996681, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeText, + }, + components.CollectionItem{ + CollectionID: 480101, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{ + Reactors: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 414155, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Reminders: []components.Reminder{ + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 818513, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 511688, + }, + CandidateVerifiers: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getpin.go b/tests/mockserver/internal/handler/pathpostrestapiv1getpin.go new file mode 100644 index 00000000..877e3e83 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getpin.go @@ -0,0 +1,605 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Getpin(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getpin[0]": + dir.HandlerFunc("getpin", testGetpinGetpin0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetpinGetpin0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetPinResponse{ + Pin: &components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 544221, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 969961, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "extract neaten qua meanwhile bah", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 808481, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 656841, + ItemType: components.CollectionItemItemTypeURL, + }, + components.CollectionItem{ + CollectionID: 607679, + ItemType: components.CollectionItemItemTypeCollection, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + }, + }, + components.Collection{ + Name: "", + Description: "once out effector determined backburn weary", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 547184, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 31446, + }, + components.Share{ + NumDaysAgo: 339847, + }, + components.Share{ + NumDaysAgo: 844917, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 845806, + }, + components.Reminder{ + RemindAt: 350813, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 534384, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 913207, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 533795, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 949290, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 716267, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getshortcut.go b/tests/mockserver/internal/handler/pathpostrestapiv1getshortcut.go new file mode 100644 index 00000000..96557d0d --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getshortcut.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Getshortcut(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "getshortcut[0]": + dir.HandlerFunc("getshortcut", testGetshortcutGetshortcut0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetshortcutGetshortcut0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.GetShortcutResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1insights.go b/tests/mockserver/internal/handler/pathpostrestapiv1insights.go new file mode 100644 index 00000000..28079887 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1insights.go @@ -0,0 +1,5262 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Insights(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "insights[0]": + dir.HandlerFunc("insights", testInsightsInsights0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testInsightsInsights0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.InsightsResponse{ + Users: &components.UserInsightsResponse{ + ActivityInsights: []components.UserActivityInsight{ + components.UserActivityInsight{ + User: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 450824, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 213457, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "yahoo disapprove glum ugh roundabout middle ha rise readily", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 237994, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 256758, + ItemType: components.CollectionItemItemTypeCollection, + }, + components.CollectionItem{ + CollectionID: 783459, + ItemType: components.CollectionItemItemTypeURL, + }, + components.CollectionItem{ + CollectionID: 188420, + ItemType: components.CollectionItemItemTypeText, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + }, + }, + components.Collection{ + Name: "", + Description: "bell unabashedly unwilling disk", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 698722, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 365275, + }, + components.Share{ + NumDaysAgo: 790898, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 856562, + }, + components.Reminder{ + RemindAt: 328633, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 287673, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 140875, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 210313, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Activity: components.ActivityEnumSearch, + }, + components.UserActivityInsight{ + User: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Activity: components.ActivityEnumAll, + }, + }, + InactiveInsights: []components.UserActivityInsight{ + components.UserActivityInsight{ + User: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Activity: components.ActivityEnumSearch, + }, + components.UserActivityInsight{ + User: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Activity: components.ActivityEnumSearch, + }, + components.UserActivityInsight{ + User: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Activity: components.ActivityEnumAll, + }, + }, + }, + Content: &components.ContentInsightsResponse{ + DocumentInsights: []components.DocumentInsight{ + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 783566, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 519998, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 500839, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + Collections: &components.ContentInsightsResponse{ + DocumentInsights: []components.DocumentInsight{ + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 609810, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 413854, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 150399, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + CollectionsV2: &components.ContentInsightsResponse{ + DocumentInsights: []components.DocumentInsight{ + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 148964, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 541220, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 222075, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + Announcements: &components.ContentInsightsResponse{ + DocumentInsights: []components.DocumentInsight{ + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 15843, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + Answers: &components.ContentInsightsResponse{ + DocumentInsights: []components.DocumentInsight{ + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 39567, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 892341, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.DocumentInsight{ + Document: components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 486092, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + Ai: &components.AiInsightsResponse{ + AssistantInsights: []components.UserActivityInsight{ + components.UserActivityInsight{ + User: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Activity: components.ActivityEnumSearch, + }, + }, + }, + AiApps: &components.AiAppsInsightsResponse{ + AiAppInsights: []components.UserActivityInsight{ + components.UserActivityInsight{ + User: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Activity: components.ActivityEnumSearch, + }, + components.UserActivityInsight{ + User: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Activity: components.ActivityEnumAll, + }, + }, + }, + GleanAssist: &components.GleanAssistInsightsResponse{ + ActivityInsights: []components.UserActivityInsight{ + components.UserActivityInsight{ + User: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Activity: components.ActivityEnumSearch, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listanswers.go b/tests/mockserver/internal/handler/pathpostrestapiv1listanswers.go new file mode 100644 index 00000000..9c8732d8 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listanswers.go @@ -0,0 +1,3497 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Listanswers(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listanswers[0]": + dir.HandlerFunc("listanswers", testListanswersListanswers0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testListanswersListanswers0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.ListAnswersResponse{ + AnswerResults: []components.AnswerResult{ + components.AnswerResult{ + Answer: components.Answer{ + ID: 3, + DocID: types.String("ANSWERS_answer_3"), + Question: types.String("Why is the sky blue?"), + BodyText: types.String("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."), + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 229716, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 635532, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "avalanche jungle unto meanwhile beside tromp worth reluctantly", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 781409, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 66993, + ItemType: components.CollectionItemItemTypeDocument, + }, + components.CollectionItem{ + CollectionID: 294083, + ItemType: components.CollectionItemItemTypeCollection, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 678179, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 810770, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 956959, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 948614, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 20615, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + }, + CombinedAnswerText: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + StructuredList: []components.StructuredTextItem{ + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 370293, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + }, + }, + Likes: &components.AnswerLikes{ + LikedBy: []components.AnswerLike{}, + LikedByUser: false, + NumLikes: 50388, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 487446, + }, + }, + }, + Board: &components.AnswerBoard{ + Name: "", + Description: "boo massive sorrowful aw strict behind along energetic oddball", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 472871, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 367314, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + components.AnswerResult{ + Answer: components.Answer{ + ID: 3, + DocID: types.String("ANSWERS_answer_3"), + Question: types.String("Why is the sky blue?"), + BodyText: types.String("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."), + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + CombinedAnswerText: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + }, + Likes: &components.AnswerLikes{ + LikedBy: []components.AnswerLike{}, + LikedByUser: false, + NumLikes: 233358, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 536405, + }, + }, + }, + Board: &components.AnswerBoard{ + Name: "", + Description: "likely up questionably forgery glow warmhearted", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 674469, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 359708, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + components.AnswerResult{ + Answer: components.Answer{ + ID: 3, + DocID: types.String("ANSWERS_answer_3"), + Question: types.String("Why is the sky blue?"), + BodyText: types.String("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."), + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + CombinedAnswerText: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + }, + Likes: &components.AnswerLikes{ + LikedBy: []components.AnswerLike{}, + LikedByUser: true, + NumLikes: 80289, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 327973, + }, + }, + }, + Board: &components.AnswerBoard{ + Name: "", + Description: "freely overcook till boo ack", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 477827, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 238432, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listchats.go b/tests/mockserver/internal/handler/pathpostrestapiv1listchats.go new file mode 100644 index 00000000..7b862227 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listchats.go @@ -0,0 +1,626 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Listchats(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listchats[0]": + dir.HandlerFunc("listchats", testListchatsListchats0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testListchatsListchats0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.ListChatsResponse{ + ChatResults: []components.ChatMetadataResult{ + components.ChatMetadataResult{ + Chat: &components.ChatMetadata{ + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 177706, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 152837, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "accountability pish likewise", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Role: components.UserRoleVerifier, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleAnswerModerator, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 425334, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 480616, + ItemType: components.CollectionItemItemTypeDocument, + }, + components.CollectionItem{ + CollectionID: 523875, + ItemType: components.CollectionItemItemTypeCollection, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + }, + }, + components.Collection{ + Name: "", + Description: "safely briefly ugh fen", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 96709, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 5229, + }, + components.Share{ + NumDaysAgo: 810770, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 505778, + }, + components.Reminder{ + RemindAt: 948614, + }, + components.Reminder{ + RemindAt: 900109, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 20615, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 726700, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Icon: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + components.ChatMetadataResult{ + Chat: &components.ChatMetadata{ + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Icon: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + components.ChatMetadataResult{ + Chat: &components.ChatMetadata{ + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Icon: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listcollections.go b/tests/mockserver/internal/handler/pathpostrestapiv1listcollections.go new file mode 100644 index 00000000..d44d70da --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listcollections.go @@ -0,0 +1,1907 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Listcollections(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listcollections[0]": + dir.HandlerFunc("listcollections", testListcollectionsListcollections0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testListcollectionsListcollections0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.ListCollectionsResponse{ + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "yuck accountability pish likewise excepting unimpressively quickly", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 692918, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 838930, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 164965, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 777245, + }, + components.Reminder{ + RemindAt: 141764, + }, + components.Reminder{ + RemindAt: 664080, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 284580, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 544651, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastReminder: &components.Reminder{ + RemindAt: 60868, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 993305, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 258945, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleVerifier, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 29267, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 408066, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 370293, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + components.CollectionItem{ + CollectionID: 900911, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 462343, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + }, + }, + components.Collection{ + Name: "", + Description: "massive sorrowful aw", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 314888, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.Collection{ + Name: "", + Description: "merrily wherever failing orchestrate lest", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 895039, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listentities.go b/tests/mockserver/internal/handler/pathpostrestapiv1listentities.go new file mode 100644 index 00000000..c44c305a --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listentities.go @@ -0,0 +1,709 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Listentities(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listentities[0]": + dir.HandlerFunc("listentities", testListentitiesListentities0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testListentitiesListentities0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.ListEntitiesResponse{ + Results: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + TeamResults: []components.Team{ + components.Team{ + ID: "", + Name: "", + Members: []components.PersonToTeamRelationship{ + components.PersonToTeamRelationship{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 229716, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 635532, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "avalanche jungle unto meanwhile beside tromp worth reluctantly", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 294083, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 747562, + ItemType: components.CollectionItemItemTypeText, + }, + components.CollectionItem{ + CollectionID: 324206, + ItemType: components.CollectionItemItemTypeDocument, + }, + components.CollectionItem{ + CollectionID: 678179, + ItemType: components.CollectionItemItemTypeText, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Role: components.UserRoleAnswerModerator, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 20615, + }, + components.Share{ + NumDaysAgo: 467775, + }, + components.Share{ + NumDaysAgo: 993677, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 406555, + }, + components.Reminder{ + RemindAt: 29267, + }, + components.Reminder{ + RemindAt: 652326, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 688784, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 41398, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 329360, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Relationship: components.PersonToTeamRelationshipRelationshipMember.ToPointer(), + }, + components.PersonToTeamRelationship{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Relationship: components.PersonToTeamRelationshipRelationshipMember.ToPointer(), + }, + }, + DatasourceProfiles: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + Status: components.TeamStatusProcessed.ToPointer(), + CanBeDeleted: types.Bool(true), + }, + components.Team{ + ID: "", + Name: "", + DatasourceProfiles: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + Status: components.TeamStatusProcessed.ToPointer(), + CanBeDeleted: types.Bool(true), + }, + components.Team{ + ID: "", + Name: "", + DatasourceProfiles: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + Status: components.TeamStatusProcessed.ToPointer(), + CanBeDeleted: types.Bool(true), + }, + }, + CustomEntityResults: []components.CustomEntity{ + components.CustomEntity{}, + components.CustomEntity{}, + }, + FacetResults: []components.FacetResult{ + components.FacetResult{ + SourceName: types.String("container_name"), + OperatorName: types.String("SelectMultiple"), + Buckets: []components.FacetBucket{ + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + HasMoreBuckets: types.Bool(false), + GroupName: types.String("Service Cloud"), + }, + components.FacetResult{ + SourceName: types.String("container_name"), + OperatorName: types.String("SelectMultiple"), + Buckets: []components.FacetBucket{ + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + HasMoreBuckets: types.Bool(false), + GroupName: types.String("Service Cloud"), + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listpins.go b/tests/mockserver/internal/handler/pathpostrestapiv1listpins.go new file mode 100644 index 00000000..04774e10 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listpins.go @@ -0,0 +1,692 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Listpins(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listpins[0]": + dir.HandlerFunc("listpins", testListpinsListpins0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testListpinsListpins0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.ListPinsResponse{ + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 177706, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 152837, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "bah since zowie loudly aha although gosh whenever", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 544651, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 60868, + ItemType: components.CollectionItemItemTypeText, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + }, + }, + components.Collection{ + Name: "", + Description: "via during someplace woot excepting gah only despite", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 933854, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 500063, + }, + components.Share{ + NumDaysAgo: 206163, + }, + components.Share{ + NumDaysAgo: 310383, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 838038, + }, + components.Reminder{ + RemindAt: 517221, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 774578, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 213989, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listshortcuts.go b/tests/mockserver/internal/handler/pathpostrestapiv1listshortcuts.go new file mode 100644 index 00000000..b04d1fd2 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listshortcuts.go @@ -0,0 +1,153 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Listshortcuts(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listshortcuts[0]": + dir.HandlerFunc("listshortcuts", testListshortcutsListshortcuts0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testListshortcutsListshortcuts0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.ListShortcutsPaginatedResponse{ + Shortcuts: []components.Shortcut{ + components.Shortcut{ + InputAlias: "", + DestinationURL: types.String("https://remorseful-concentration.biz"), + CreatedBy: &components.Person{}, + }, + components.Shortcut{ + InputAlias: "", + DestinationURL: types.String("https://primary-paintwork.com/"), + CreatedBy: &components.Person{}, + }, + components.Shortcut{ + InputAlias: "", + DestinationURL: types.String("https://breakable-bathrobe.net"), + CreatedBy: &components.Person{}, + }, + }, + FacetResults: []components.FacetResult{ + components.FacetResult{ + SourceName: types.String("container_name"), + OperatorName: types.String("SelectMultiple"), + Buckets: []components.FacetBucket{ + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + HasMoreBuckets: types.Bool(false), + GroupName: types.String("Service Cloud"), + }, + components.FacetResult{ + SourceName: types.String("container_name"), + OperatorName: types.String("SelectMultiple"), + Buckets: []components.FacetBucket{ + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + HasMoreBuckets: types.Bool(false), + GroupName: types.String("Service Cloud"), + }, + }, + Meta: components.ShortcutsPaginationMetadata{}, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listverifications.go b/tests/mockserver/internal/handler/pathpostrestapiv1listverifications.go new file mode 100644 index 00000000..f6f86bed --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listverifications.go @@ -0,0 +1,1716 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Listverifications(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "listverifications[0]": + dir.HandlerFunc("listverifications", testListverificationsListverifications0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testListverificationsListverifications0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.VerificationFeed{ + Documents: []components.Verification{ + components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 229716, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 635532, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "avalanche jungle unto meanwhile beside tromp worth reluctantly", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 294083, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 747562, + ItemType: components.CollectionItemItemTypeText, + }, + components.CollectionItem{ + CollectionID: 324206, + ItemType: components.CollectionItemItemTypeDocument, + }, + components.CollectionItem{ + CollectionID: 678179, + ItemType: components.CollectionItemItemTypeText, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Role: components.UserRoleAnswerModerator, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 20615, + }, + components.Share{ + NumDaysAgo: 467775, + }, + components.Share{ + NumDaysAgo: 993677, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 406555, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 652326, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Reminders: []components.Reminder{ + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 370293, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 900911, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 424586, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 221489, + }, + CandidateVerifiers: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 277523, + }, + }, + }, + components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 749833, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1messages.go b/tests/mockserver/internal/handler/pathpostrestapiv1messages.go new file mode 100644 index 00000000..8b2aa7ac --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1messages.go @@ -0,0 +1,8718 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Messages(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "messages[0]": + dir.HandlerFunc("messages", testMessagesMessages0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testMessagesMessages0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.MessagesResponse{ + HasMore: false, + SearchResponse: &components.SearchResponse{ + TrackingToken: types.String("trackingToken"), + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + StructuredResults: []components.StructuredResult{ + components.StructuredResult{ + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 450824, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 213457, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 438142, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 78888, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + MentionedPeople: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "meanwhile bah because impassioned responsibility jogging airman per", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 168726, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 491026, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeURL, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleVerifier, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{ + Reactors: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 845806, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.Share{ + NumDaysAgo: 534384, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Reminders: []components.Reminder{ + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 387819, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 698722, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 365275, + }, + CandidateVerifiers: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Customer: &components.Customer{ + ID: "", + Company: components.Company{ + Name: "", + Location: types.String("New York City"), + Industry: types.String("Finances"), + About: types.String("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"), + }, + Poc: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + Notes: types.String("CIO is interested in trying out the product."), + }, + Team: &components.Team{ + ID: "", + Name: "", + Members: []components.PersonToTeamRelationship{ + components.PersonToTeamRelationship{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Relationship: components.PersonToTeamRelationshipRelationshipMember.ToPointer(), + }, + }, + DatasourceProfiles: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + Status: components.TeamStatusProcessed.ToPointer(), + CanBeDeleted: types.Bool(true), + }, + CustomEntity: &components.CustomEntity{}, + Answer: &components.Answer{ + ID: 3, + DocID: types.String("ANSWERS_answer_3"), + Question: types.String("Why is the sky blue?"), + BodyText: types.String("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."), + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + CombinedAnswerText: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + StructuredList: []components.StructuredTextItem{ + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 637897, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 960234, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 163922, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + }, + }, + Likes: &components.AnswerLikes{ + LikedBy: []components.AnswerLike{ + components.AnswerLike{ + User: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LikedByUser: true, + NumLikes: 750176, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 194354, + }, + }, + }, + Board: &components.AnswerBoard{ + Name: "", + Description: "absolve beside makeover amidst diver if behind drat", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 435401, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 382213, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + ExtractedQnA: &components.ExtractedQnA{ + QuestionResult: &components.SearchResult{ + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 990860, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + RelatedResults: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 820095, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 346523, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 193124, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + AllClusteredResults: []components.ClusterGroup{ + components.ClusterGroup{ + VisibleCountHint: 197787, + }, + components.ClusterGroup{ + VisibleCountHint: 60189, + }, + }, + MustIncludeSuggestions: &components.QuerySuggestionList{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 478496, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Meeting: &components.Meeting{ + Attendees: &components.CalendarAttendees{ + People: []components.CalendarAttendee{ + components.CalendarAttendee{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.CalendarAttendee{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + Collection: &components.Collection{ + Name: "", + Description: "baptise kick ick gosh stall phew", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 999561, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + AnswerBoard: &components.AnswerBoard{ + Name: "", + Description: "unnecessarily medium following pfft bashfully before", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 534236, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + Code: &components.Code{ + RepoName: types.String("scio"), + FileName: types.String("README.md"), + Lines: []components.CodeLine{ + components.CodeLine{}, + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + RelatedQuestion: &components.RelatedQuestion{}, + }, + components.StructuredResult{ + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 972200, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Customer: &components.Customer{ + ID: "", + Company: components.Company{ + Name: "", + Location: types.String("New York City"), + Industry: types.String("Finances"), + About: types.String("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"), + }, + Notes: types.String("CIO is interested in trying out the product."), + }, + Team: &components.Team{ + ID: "", + Name: "", + DatasourceProfiles: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + Status: components.TeamStatusProcessed.ToPointer(), + CanBeDeleted: types.Bool(true), + }, + CustomEntity: &components.CustomEntity{}, + Answer: &components.Answer{ + ID: 3, + DocID: types.String("ANSWERS_answer_3"), + Question: types.String("Why is the sky blue?"), + BodyText: types.String("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."), + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + CombinedAnswerText: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + }, + Likes: &components.AnswerLikes{ + LikedBy: []components.AnswerLike{}, + LikedByUser: false, + NumLikes: 738008, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 688038, + }, + }, + }, + Board: &components.AnswerBoard{ + Name: "", + Description: "parade since delightfully", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 207365, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 961784, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + ExtractedQnA: &components.ExtractedQnA{ + QuestionResult: &components.SearchResult{ + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 61187, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + MustIncludeSuggestions: &components.QuerySuggestionList{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 950775, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Meeting: &components.Meeting{ + Attendees: &components.CalendarAttendees{}, + }, + Collection: &components.Collection{ + Name: "", + Description: "whereas chubby bah er taut toward footrest victorious custody huzzah", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 863294, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + AnswerBoard: &components.AnswerBoard{ + Name: "", + Description: "er until seal er", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 591321, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + Code: &components.Code{ + RepoName: types.String("scio"), + FileName: types.String("README.md"), + }, + QuerySuggestions: &components.QuerySuggestionList{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + RelatedQuestion: &components.RelatedQuestion{}, + }, + }, + GeneratedQnaResult: &components.GeneratedQna{ + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 73819, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 743152, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + GleanDataError: &components.GleanDataError{ + ErrorMessages: []components.ErrorMessage{ + components.ErrorMessage{ + Source: types.String("gmail"), + ErrorMessage: types.String("invalid token"), + }, + components.ErrorMessage{ + Source: types.String("slack"), + ErrorMessage: types.String("expired token"), + }, + }, + }, + RequestID: types.String("5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100"), + BackendTimeMillis: types.Int64(1100), + Metadata: &components.SearchResponseMetadata{ + SearchedQueryRanges: []components.TextRange{ + components.TextRange{ + StartIndex: 245129, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 298813, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 147593, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 954659, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 600259, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 195022, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 801589, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + AdditionalQuerySuggestions: &components.QuerySuggestionList{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + FacetResults: []components.FacetResult{ + components.FacetResult{ + SourceName: types.String("container_name"), + OperatorName: types.String("SelectMultiple"), + Buckets: []components.FacetBucket{ + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + HasMoreBuckets: types.Bool(false), + GroupName: types.String("Service Cloud"), + }, + components.FacetResult{ + SourceName: types.String("container_name"), + OperatorName: types.String("SelectMultiple"), + Buckets: []components.FacetBucket{ + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + components.FacetBucket{ + Count: types.Int64(1), + Datasource: types.String("jira"), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("engineering"), + IntegerValue: types.Int64(5), + DisplayLabel: types.String("engineering"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + HasMoreBuckets: types.Bool(false), + GroupName: types.String("Service Cloud"), + }, + }, + ResultsDescription: &components.ResultsDescription{ + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + RewrittenFacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + HasMoreResults: types.Bool(true), + }, + RootMessage: &components.SearchResult{ + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 733319, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + MustIncludeSuggestions: &components.QuerySuggestionList{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 359740, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1people.go b/tests/mockserver/internal/handler/pathpostrestapiv1people.go new file mode 100644 index 00000000..f86753d5 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1people.go @@ -0,0 +1,1640 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1People(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "people[0]": + dir.HandlerFunc("people", testPeoplePeople0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPeoplePeople0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.PeopleResponse{ + Results: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 325985, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 5324, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{ + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + components.CreateCustomFieldValueCustomFieldValueStr( + components.CustomFieldValueStr{}, + ), + }, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + MentionedPeople: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "underneath whoa electronics tributary", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 544551, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 450370, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + components.CollectionItem{ + CollectionID: 574783, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeText, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + }, + components.Collection{ + Name: "", + Description: "playfully heavy finally altruistic whenever er utter notwithstanding", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 372647, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.Collection{ + Name: "", + Description: "boohoo analogy hm and rise weight", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 705939, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{ + Reactors: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 406671, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Reminders: []components.Reminder{ + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 870639, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 945399, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 970028, + }, + CandidateVerifiers: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1pin.go b/tests/mockserver/internal/handler/pathpostrestapiv1pin.go new file mode 100644 index 00000000..09fdba85 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1pin.go @@ -0,0 +1,546 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Pin(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "pin[0]": + dir.HandlerFunc("pin", testPinPin0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPinPin0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 417458, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 69025, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "vice between gee", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 550483, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 452224, + ItemType: components.CollectionItemItemTypeText, + }, + components.CollectionItem{ + CollectionID: 259772, + ItemType: components.CollectionItemItemTypeCollection, + }, + components.CollectionItem{ + CollectionID: 137324, + ItemType: components.CollectionItemItemTypeURL, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Role: components.UserRoleAnswerModerator, + }, + }, + }, + components.Collection{ + Name: "", + Description: "attend alongside aw blend ha ew", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 497070, + }, + components.Collection{ + Name: "", + Description: "embalm simple ouch when pfft ah vainly", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 154150, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 842284, + }, + components.Share{ + NumDaysAgo: 466260, + }, + components.Share{ + NumDaysAgo: 931588, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + Reminders: []components.Reminder{ + components.Reminder{ + RemindAt: 982866, + }, + }, + LastReminder: &components.Reminder{ + RemindAt: 482357, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 150565, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1recommendations.go b/tests/mockserver/internal/handler/pathpostrestapiv1recommendations.go new file mode 100644 index 00000000..78289a8e --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1recommendations.go @@ -0,0 +1,5663 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Recommendations(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "recommendations[0]": + dir.HandlerFunc("recommendations", testRecommendationsRecommendations0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testRecommendationsRecommendations0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.ResultsResponse{ + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + StructuredResults: []components.StructuredResult{ + components.StructuredResult{ + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 257594, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 538524, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 650257, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + MentionedPeople: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "dusk entwine cease than materialise whenever fireplace eek", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 71727, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 102105, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeCollection, + }, + components.CollectionItem{ + CollectionID: 515424, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeDocument, + }, + components.CollectionItem{ + CollectionID: 330168, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeText, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleVerifier, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{ + Reactors: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 364853, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.Share{ + NumDaysAgo: 533353, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.Share{ + NumDaysAgo: 82419, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Reminders: []components.Reminder{ + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 606221, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 33153, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 624169, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 535774, + }, + CandidateVerifiers: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Customer: &components.Customer{ + ID: "", + Company: components.Company{ + Name: "", + Location: types.String("New York City"), + Industry: types.String("Finances"), + About: types.String("Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"), + }, + Poc: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + Notes: types.String("CIO is interested in trying out the product."), + }, + Team: &components.Team{ + ID: "", + Name: "", + Members: []components.PersonToTeamRelationship{ + components.PersonToTeamRelationship{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Relationship: components.PersonToTeamRelationshipRelationshipMember.ToPointer(), + }, + components.PersonToTeamRelationship{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Relationship: components.PersonToTeamRelationshipRelationshipMember.ToPointer(), + }, + }, + DatasourceProfiles: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + Status: components.TeamStatusProcessed.ToPointer(), + CanBeDeleted: types.Bool(true), + }, + CustomEntity: &components.CustomEntity{}, + Answer: &components.Answer{ + ID: 3, + DocID: types.String("ANSWERS_answer_3"), + Question: types.String("Why is the sky blue?"), + BodyText: types.String("From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."), + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + CombinedAnswerText: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + StructuredList: []components.StructuredTextItem{ + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 962229, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 395713, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + }, + }, + Likes: &components.AnswerLikes{ + LikedBy: []components.AnswerLike{}, + LikedByUser: false, + NumLikes: 297770, + }, + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 752324, + }, + }, + }, + Board: &components.AnswerBoard{ + Name: "", + Description: "adventurously notwithstanding canter generously tenderly helpfully front schnitzel", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 324124, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 912614, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + ExtractedQnA: &components.ExtractedQnA{ + QuestionResult: &components.SearchResult{ + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 565417, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + RelatedResults: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 358317, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 116602, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 975675, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + AllClusteredResults: []components.ClusterGroup{ + components.ClusterGroup{ + VisibleCountHint: 49580, + }, + components.ClusterGroup{ + VisibleCountHint: 242509, + }, + components.ClusterGroup{ + VisibleCountHint: 812000, + }, + }, + MustIncludeSuggestions: &components.QuerySuggestionList{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 952650, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Meeting: &components.Meeting{ + Attendees: &components.CalendarAttendees{ + People: []components.CalendarAttendee{ + components.CalendarAttendee{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.CalendarAttendee{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.CalendarAttendee{ + Person: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + Collection: &components.Collection{ + Name: "", + Description: "furthermore hence formal tune flowery aside the schedule witty", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 965, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + AnswerBoard: &components.AnswerBoard{ + Name: "", + Description: "fess um whoa times boohoo down", + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 762536, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + Code: &components.Code{ + RepoName: types.String("scio"), + FileName: types.String("README.md"), + Lines: []components.CodeLine{ + components.CodeLine{}, + components.CodeLine{}, + components.CodeLine{}, + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + RelatedQuestion: &components.RelatedQuestion{}, + }, + }, + GeneratedQnaResult: &components.GeneratedQna{ + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 389859, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 916413, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 63382, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateVerified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 928524, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 466270, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 569654, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + BackendTimeMillis: types.Int64(1100), + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1search.go b/tests/mockserver/internal/handler/pathpostrestapiv1search.go new file mode 100644 index 00000000..f8bb6d1b --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1search.go @@ -0,0 +1,163 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Search(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "search[0]": + dir.HandlerFunc("search", testSearchSearch0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testSearchSearch0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.SearchResponse{ + TrackingToken: types.String("trackingToken"), + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://www.example.com/", + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + components.SearchResult{ + Title: types.String("title"), + URL: "https://www.example.com/", + Snippets: []components.SearchResultSnippet{}, + }, + }, + GleanDataError: &components.GleanDataError{ + ErrorMessages: []components.ErrorMessage{ + components.ErrorMessage{ + Source: types.String("gmail"), + ErrorMessage: types.String("invalid token"), + }, + components.ErrorMessage{ + Source: types.String("slack"), + ErrorMessage: types.String("expired token"), + }, + }, + }, + RequestID: types.String("5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100"), + FacetResults: []components.FacetResult{ + components.FacetResult{ + SourceName: types.String("sourceName"), + OperatorName: types.String("operatorName"), + Buckets: []components.FacetBucket{ + components.FacetBucket{ + Count: types.Int64(1), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("stringValue"), + IntegerValue: types.Int64(5), + }, + }, + components.FacetBucket{ + Count: types.Int64(1), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("stringValue"), + IntegerValue: types.Int64(5), + }, + }, + }, + }, + components.FacetResult{ + SourceName: types.String("sourceName"), + OperatorName: types.String("operatorName"), + Buckets: []components.FacetBucket{ + components.FacetBucket{ + Count: types.Int64(1), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("stringValue"), + IntegerValue: types.Int64(5), + }, + }, + components.FacetBucket{ + Count: types.Int64(1), + Percentage: types.Int64(5), + Value: &components.FacetValue{ + StringValue: types.String("stringValue"), + IntegerValue: types.Int64(5), + }, + }, + }, + }, + }, + RewrittenFacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("fieldName"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{}, + components.FacetFilterValue{}, + }, + }, + components.FacetFilter{ + FieldName: types.String("fieldName"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{}, + components.FacetFilterValue{}, + }, + }, + }, + HasMoreResults: types.Bool(true), + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1summarize.go b/tests/mockserver/internal/handler/pathpostrestapiv1summarize.go new file mode 100644 index 00000000..f3d4c34a --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1summarize.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Summarize(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "summarize[0]": + dir.HandlerFunc("summarize", testSummarizeSummarize0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testSummarizeSummarize0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.SummarizeResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1toolscall.go b/tests/mockserver/internal/handler/pathpostrestapiv1toolscall.go new file mode 100644 index 00000000..3feb1184 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1toolscall.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1ToolsCall(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "post_/rest/api/v1/tools/call[0]": + dir.HandlerFunc("post_/rest/api/v1/tools/call", testPostRestAPIV1ToolsCallPostRestAPIV1ToolsCall0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostRestAPIV1ToolsCallPostRestAPIV1ToolsCall0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.ToolsCallResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1unpin.go b/tests/mockserver/internal/handler/pathpostrestapiv1unpin.go new file mode 100644 index 00000000..c1a7228b --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1unpin.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Unpin(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "unpin[0]": + dir.HandlerFunc("unpin", testUnpinUnpin0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testUnpinUnpin0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"*/*"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + w.WriteHeader(http.StatusOK) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1updateannouncement.go b/tests/mockserver/internal/handler/pathpostrestapiv1updateannouncement.go new file mode 100644 index 00000000..2687efec --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1updateannouncement.go @@ -0,0 +1,2580 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Updateannouncement(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateannouncement[0]": + dir.HandlerFunc("updateannouncement", testUpdateannouncementUpdateannouncement0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testUpdateannouncementUpdateannouncement0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.Announcement{ + Body: &components.StructuredText{ + Text: "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + StructuredList: []components.StructuredTextItem{ + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 517232, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 676467, + }, + components.TextRange{ + StartIndex: 749867, + }, + components.TextRange{ + StartIndex: 595467, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 454586, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + MentionedPeople: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + Attribution: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "queasily down worthy generously than narrate pish off", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleOwner, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 162698, + Creator: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 553022, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeURL, + }, + components.CollectionItem{ + CollectionID: 322125, + CreatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + ItemType: components.CollectionItemItemTypeText, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleViewer, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleEditor, + }, + components.UserRoleSpecification{ + Person: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Role: components.UserRoleAnswerModerator, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{ + Reactors: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 132693, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.Share{ + NumDaysAgo: 241217, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + components.Share{ + NumDaysAgo: 355708, + Sharer: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + }, + Verification: &components.Verification{ + State: components.StateUnverified, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Reminders: []components.Reminder{ + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 46236, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 25092, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 109020, + }, + CandidateVerifiers: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 390161, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + components.StructuredTextItem{ + Link: types.String("https://en.wikipedia.org/wiki/Diffuse_sky_radiation"), + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 349429, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Text: types.String("Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."), + }, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DraftID: types.Int64(342), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + SourceDocument: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + Verification: &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 726281, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1updateshortcut.go b/tests/mockserver/internal/handler/pathpostrestapiv1updateshortcut.go new file mode 100644 index 00000000..13770a05 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1updateshortcut.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Updateshortcut(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "updateshortcut[0]": + dir.HandlerFunc("updateshortcut", testUpdateshortcutUpdateshortcut0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testUpdateshortcutUpdateshortcut0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.UpdateShortcutResponse{} + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1uploadchatfiles.go b/tests/mockserver/internal/handler/pathpostrestapiv1uploadchatfiles.go new file mode 100644 index 00000000..990aa000 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1uploadchatfiles.go @@ -0,0 +1,86 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Uploadchatfiles(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "uploadchatfiles[0]": + dir.HandlerFunc("uploadchatfiles", testUploadchatfilesUploadchatfiles0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testUploadchatfilesUploadchatfiles0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "multipart/form-data", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.UploadChatFilesResponse{ + Files: []components.ChatFile{ + components.ChatFile{ + ID: types.String("FILE_1234"), + URL: types.String("www.google.com"), + Name: types.String("sample.pdf"), + }, + components.ChatFile{ + ID: types.String("FILE_1234"), + URL: types.String("www.google.com"), + Name: types.String("sample.pdf"), + }, + components.ChatFile{ + ID: types.String("FILE_1234"), + URL: types.String("www.google.com"), + Name: types.String("sample.pdf"), + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1verify.go b/tests/mockserver/internal/handler/pathpostrestapiv1verify.go new file mode 100644 index 00000000..93c9498c --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1verify.go @@ -0,0 +1,899 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Verify(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "verify[0]": + dir.HandlerFunc("verify", testVerifyVerify0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testVerifyVerify0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + respBody := &components.Verification{ + State: components.StateDeprecated, + Metadata: &components.VerificationMetadata{ + LastVerifier: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + RelatedDocuments: []components.RelatedDocuments{ + components.RelatedDocuments{ + QuerySuggestion: &components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + SearchProviderInfo: &components.SearchProviderInfo{ + Name: types.String("Google"), + SearchLinkURLTemplate: types.String("https://www.google.com/search?q={query}&hl=en"), + }, + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + RequestOptions: &components.SearchRequestOptions{ + DatasourceFilter: types.String("JIRA"), + DatasourcesFilter: []string{ + "JIRA", + }, + QueryOverridesFacetFilters: types.Bool(true), + FacetFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + FacetFilterSets: []components.FacetFilterSet{ + components.FacetFilterSet{ + Filters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + }, + }, + FacetBucketSize: 227138, + AuthTokens: []components.AuthToken{ + components.AuthToken{ + AccessToken: "123abc", + Datasource: "gmail", + Scope: types.String("email profile https://www.googleapis.com/auth/gmail.readonly"), + TokenType: types.String("Bearer"), + AuthUser: types.String("1"), + }, + }, + }, + Ranges: []components.TextRange{ + components.TextRange{ + StartIndex: 394054, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Pins: []components.PinDocument{ + components.PinDocument{ + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + DocumentID: "", + }, + }, + Collections: []components.Collection{ + components.Collection{ + Name: "", + Description: "fiddle gee lightly these unique", + AddedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + }, + RemovedRoles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleViewer, + }, + }, + AudienceFilters: []components.FacetFilter{ + components.FacetFilter{ + FieldName: types.String("type"), + Values: []components.FacetFilterValue{ + components.FacetFilterValue{ + Value: types.String("Spreadsheet"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + components.FacetFilterValue{ + Value: types.String("Presentation"), + RelationType: components.RelationTypeEquals.ToPointer(), + }, + }, + }, + }, + ID: 248707, + Items: []components.CollectionItem{ + components.CollectionItem{ + CollectionID: 159863, + ItemType: components.CollectionItemItemTypeDocument, + }, + components.CollectionItem{ + CollectionID: 725143, + ItemType: components.CollectionItemItemTypeDocument, + }, + }, + Roles: []components.UserRoleSpecification{ + components.UserRoleSpecification{ + Role: components.UserRoleOwner, + }, + components.UserRoleSpecification{ + Role: components.UserRoleVerifier, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{ + Reacts: []components.Reaction{ + components.Reaction{}, + components.Reaction{}, + }, + Shares: []components.Share{ + components.Share{ + NumDaysAgo: 638745, + }, + components.Share{ + NumDaysAgo: 331260, + }, + components.Share{ + NumDaysAgo: 759941, + }, + }, + }, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 344155, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + components.TextRange{ + StartIndex: 851433, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + }, + }, + }, + }, + InputDetails: &components.SearchRequestInputDetails{ + HasCopyPaste: types.Bool(true), + }, + }, + Results: []components.SearchResult{ + components.SearchResult{ + Title: types.String("title"), + URL: "https://example.com/foo/bar", + NativeAppURL: types.String("slack://foo/bar"), + Snippets: []components.SearchResultSnippet{ + components.SearchResultSnippet{ + Snippet: "snippet", + MimeType: types.String("mimeType"), + }, + }, + }, + }, + }, + }, + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{ + Suggestions: []components.QuerySuggestion{ + components.QuerySuggestion{ + Query: "app:github type:pull author:mortimer", + Label: types.String("Mortimer's PRs"), + Datasource: types.String("github"), + }, + }, + }, + InviteInfo: &components.InviteInfo{ + Invites: []components.ChannelInviteInfo{ + components.ChannelInviteInfo{}, + components.ChannelInviteInfo{}, + }, + }, + CustomFields: []components.CustomFieldData{ + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + components.CustomFieldData{ + Label: "", + Values: []components.CustomFieldValue{}, + Displayable: types.Bool(true), + }, + }, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Document: &components.Document{ + Metadata: &components.DocumentMetadata{ + Datasource: types.String("datasource"), + ObjectType: types.String("Feature Request"), + Container: types.String("container"), + ParentID: types.String("JIRA_EN-1337"), + MimeType: types.String("mimeType"), + DocumentID: types.String("documentId"), + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Owner: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Components: []string{ + "Backend", + "Networking", + }, + Status: types.String("[\"Done\"]"), + AssignedTo: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + UpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Interactions: &components.DocumentInteractions{}, + CustomData: map[string]components.CustomDataValue{ + "someCustomField": components.CustomDataValue{}, + }, + ContactPerson: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + }, + }, + Reminders: []components.Reminder{ + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 732097, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 510781, + }, + components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 875373, + }, + }, + LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + Requestor: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + Metadata: &components.PersonMetadata{ + Type: components.PersonMetadataTypeFullTime.ToPointer(), + Title: types.String("Actor"), + Department: types.String("Movies"), + Email: types.String("george@example.com"), + Location: types.String("Hollywood, CA"), + Phone: types.String("6505551234"), + PhotoURL: types.String("https://example.com/george.jpg"), + StartDate: types.MustNewDateFromString("2000-01-23"), + DatasourceProfile: []components.DatasourceProfile{ + components.DatasourceProfile{ + Datasource: "github", + Handle: "", + }, + }, + QuerySuggestions: &components.QuerySuggestionList{}, + InviteInfo: &components.InviteInfo{}, + Badges: []components.Badge{ + components.Badge{ + Key: types.String("deployment_name_new_hire"), + DisplayName: types.String("New hire"), + IconConfig: &components.IconConfig{ + Color: types.String("#343CED"), + Key: types.String("person_icon"), + IconType: components.IconTypeGlyph.ToPointer(), + Name: types.String("user"), + }, + }, + }, + }, + }, + RemindAt: 740498, + }, + CandidateVerifiers: []components.Person{ + components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/handler/values/files.go b/tests/mockserver/internal/handler/values/files.go new file mode 100644 index 00000000..6eca8858 --- /dev/null +++ b/tests/mockserver/internal/handler/values/files.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package values + +import ( + "io" + "os" +) + +func ReadFileToStream(fileName string) io.Reader { + s, err := os.Open(fileName) + if err != nil { + panic(err) + } + return s +} + +func ReadFileToBytes(fileName string) []byte { + data, err := os.ReadFile(fileName) + if err != nil { + panic(err) + } + return data +} + +func ReadFileToString(fileName string) string { + data, err := os.ReadFile(fileName) + if err != nil { + panic(err) + } + return string(data) +} + +func ReadBytes(r io.Reader) []byte { + data, err := io.ReadAll(r) + if err != nil { + panic(err) + } + return data +} diff --git a/tests/mockserver/internal/logging/doc.go b/tests/mockserver/internal/logging/doc.go new file mode 100644 index 00000000..8835f1cc --- /dev/null +++ b/tests/mockserver/internal/logging/doc.go @@ -0,0 +1,4 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +// Package logging contains the implementation and helpers for logging. +package logging diff --git a/tests/mockserver/internal/logging/formats.go b/tests/mockserver/internal/logging/formats.go new file mode 100644 index 00000000..d6ab53c8 --- /dev/null +++ b/tests/mockserver/internal/logging/formats.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "fmt" + "strings" +) + +const ( + // JSON log format. + FormatJSON = "JSON" + + // Plaintext log format. + FormatText = "text" + + // Default log format. + DefaultFormat = FormatText +) + +// Formats returns all supported formats. +func Formats() []string { + return []string{ + FormatJSON, + FormatText, + } +} + +func formatFromString(format string) (string, error) { + switch format { + case FormatJSON: + return format, nil + case FormatText: + return format, nil + default: + return "", fmt.Errorf("unsupported log format (%s), supported formats: %s", format, strings.Join(Formats(), ", ")) + } +} diff --git a/tests/mockserver/internal/logging/http_file.go b/tests/mockserver/internal/logging/http_file.go new file mode 100644 index 00000000..d690d915 --- /dev/null +++ b/tests/mockserver/internal/logging/http_file.go @@ -0,0 +1,310 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "bufio" + "bytes" + "errors" + "fmt" + "io/fs" + "log" + "net/http" + "net/http/httptest" + "net/http/httputil" + "os" + "path/filepath" + "strconv" + "strings" + "sync" +) + +const ( + // DefaultHTTPFileDirectory is the default directory used for raw HTTP + // request and response files. + DefaultHTTPFileDirectory = "_debug" +) + +// HTTPFileDirectory is the directory where raw HTTP request and response files +// are written. +type HTTPFileDirectory struct { + // Filesystem at path. + filesystem fs.FS + + // Mapping of operations to call count. Used to sequentially increment file + // names and return current count. + operationCalls map[string]int64 + + // Mutex to protect operationCalls. + operationCallsMutex *sync.RWMutex + + // Absolute path to directory. + path string +} + +// NewHTTPFileDirectory will create a HTTPFileDirectory which exists and is a +// directory or will return an error. +func NewHTTPFileDirectory(explicitPath string) (*HTTPFileDirectory, error) { + path, err := filepath.Abs(DefaultHTTPFileDirectory) + if err != nil { + return nil, fmt.Errorf("error getting absolute path of HTTP file directory (%s): %w", DefaultHTTPFileDirectory, err) + } + + if explicitPath != "" { + absExplicitPath, err := filepath.Abs(explicitPath) + if err != nil { + return nil, fmt.Errorf("error getting absolute path of HTTP file directory (%s): %w", explicitPath, err) + } + + path = absExplicitPath + } + + result := &HTTPFileDirectory{ + filesystem: os.DirFS(path), + operationCalls: make(map[string]int64), + operationCallsMutex: new(sync.RWMutex), + path: path, + } + + fileInfo, err := os.Stat(path) + + if errors.Is(err, os.ErrNotExist) { + err := os.Mkdir(path, 0o2777) + if err != nil { + return nil, fmt.Errorf("error making HTTP file directory (%s): %w", path, err) + } + + return result, nil + } + + if err != nil { + return nil, fmt.Errorf("error reading HTTP file directory (%s): %w", path, err) + } + + if !fileInfo.IsDir() { + return nil, fmt.Errorf("error using HTTP file directory (%s): not a directory", path) + } + + return result, nil +} + +// Clean will remove all files from HTTPFileDirectory. +func (d *HTTPFileDirectory) Clean() error { + walkDirFunc := func(path string, entry fs.DirEntry, err error) error { + if err != nil { + return fmt.Errorf("error walking %s: %w", d.path, err) + } + + if path == "." { + return nil + } + + if entry.IsDir() { + return fs.SkipDir + } + + absPath := filepath.Join(d.path, path) + + err = os.Remove(absPath) + if err != nil { + return fmt.Errorf("error removing %s: %w", absPath, err) + } + + return nil + } + + return fs.WalkDir(d.filesystem, ".", walkDirFunc) +} + +// HandlerFunc is a HTTP handler that automatically writes the raw HTTP +// request and response to {path}/{operationId}_{call}_request and +// {path}/{operationId}_{call}_response files respectively. +func (d *HTTPFileDirectory) HandlerFunc(operationId string, next http.HandlerFunc) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + call := d.nextOperationCall(operationId) + + dump, err := httputil.DumpRequest(req, true) + if err != nil { + log.Printf("error dumping HTTP request: %s", err) + } + + if len(dump) > 0 { + requestPath := filepath.Join(d.path, d.operationCallRequestFilename(operationId, call)) + + err = os.WriteFile(requestPath, dump, 0o644) + if err != nil { + log.Printf("error writing HTTP request file (%s): %s", requestPath, err) + } + } + + recorder := httptest.NewRecorder() + + next(recorder, req) + + dump, err = httputil.DumpResponse(recorder.Result(), true) + if err != nil { + log.Printf("error dumping HTTP response: %s", err) + } + + if len(dump) > 0 { + responsePath := filepath.Join(d.path, d.operationCallResponseFilename(operationId, call)) + err = os.WriteFile(responsePath, dump, 0o644) + if err != nil { + log.Printf("error writing HTTP response file (%s): %s", responsePath, err) + } + } + + recorderToWriter(recorder, w) + } +} + +// Operation will return a new OASOperation from HTTPFileDirectory. +func (d *HTTPFileDirectory) Operation(operationId string) (*OASOperation, error) { + request, err := d.Request(operationId, 1) + if err != nil { + return nil, err + } + + result := NewOASOperation(d, operationId, request.Method, request.URL.Path) + + return result, nil +} + +// Operations will return all detected OASOperation from HTTPFileDirectory. +func (d *HTTPFileDirectory) Operations() ([]*OASOperation, error) { + var result []*OASOperation + + walkDirFunc := func(path string, entry fs.DirEntry, err error) error { + if err != nil { + return fmt.Errorf("error walking %s: %w", d.path, err) + } + + if !strings.HasSuffix(path, "_1_request") { + return nil + } + + operationId := strings.TrimSuffix(path, "_1_request") + operation, err := d.Operation(operationId) + if err != nil { + return err + } + + result = append(result, operation) + + return nil + } + + err := fs.WalkDir(d.filesystem, ".", walkDirFunc) + + return result, err +} + +// OperationCallCount will return the number of detected calls for an +// OASOperation. +func (d *HTTPFileDirectory) OperationCallCount(operationId string) int64 { + d.operationCallsMutex.RLock() + defer d.operationCallsMutex.RUnlock() + + result, ok := d.operationCalls[operationId] + + if ok { + return result + } + + return 0 +} + +// RawRequest returns the raw HTTP request contents as dumped by +// [httputil.DumpRequest]. +func (d *HTTPFileDirectory) RawRequest(operationId string, call int64) ([]byte, error) { + filename := d.operationCallRequestFilename(operationId, call) + file, err := fs.ReadFile(d.filesystem, filename) + if err != nil { + return nil, fmt.Errorf("error reading HTTP request file (%s): %w", filename, err) + } + + return file, nil +} + +// RawResponse returns the raw HTTP response contents as dumped by +// [httputil.DumpResponse]. +func (d *HTTPFileDirectory) RawResponse(operationId string, call int64) ([]byte, error) { + filename := d.operationCallResponseFilename(operationId, call) + file, err := fs.ReadFile(d.filesystem, d.operationCallResponseFilename(operationId, call)) + if err != nil { + return nil, fmt.Errorf("error reading HTTP response file (%s): %w", filename, err) + } + + return file, nil +} + +// Request returns the parsed HTTP request contents. +func (d *HTTPFileDirectory) Request(operationId string, call int64) (*http.Request, error) { + rawRequest, err := d.RawRequest(operationId, call) + if err != nil { + return nil, err + } + + result, err := http.ReadRequest(bufio.NewReader(bytes.NewReader(rawRequest))) + if err != nil { + return nil, fmt.Errorf("error converting HTTP request for operation %s call %d: %w", operationId, call, err) + } + + return result, nil +} + +// Response returns the parsed HTTP response contents. +func (d *HTTPFileDirectory) Response(operationId string, call int64) (*http.Response, error) { + rawResponse, err := d.RawResponse(operationId, call) + if err != nil { + return nil, err + } + + result, err := http.ReadResponse(bufio.NewReader(bytes.NewReader(rawResponse)), nil) + if err != nil { + return nil, fmt.Errorf("error converting HTTP response for operation %s call %d: %w", operationId, call, err) + } + + return result, nil +} + +// nextOperationCall returns the incremented call number for an operation. +func (d *HTTPFileDirectory) nextOperationCall(operationId string) int64 { + d.operationCallsMutex.Lock() + defer d.operationCallsMutex.Unlock() + + var result int64 + + priorCalls, ok := d.operationCalls[operationId] + + if ok { + result = priorCalls + 1 + } else { + // Start call counts at 1 for human consumption. + result = 1 + } + + d.operationCalls[operationId] = result + + return result +} + +// operationCallRequestFilename returns the raw HTTP request file name for the +// given operation and call. +func (d *HTTPFileDirectory) operationCallRequestFilename(operationId string, call int64) string { + return sanitizeOperationIdForFilename(operationId) + "_" + strconv.FormatInt(call, 10) + "_request" +} + +// operationCallResponseFilename returns the raw HTTP response file name for the +// given operation and call. +func (d *HTTPFileDirectory) operationCallResponseFilename(operationId string, call int64) string { + return sanitizeOperationIdForFilename(operationId) + "_" + strconv.FormatInt(call, 10) + "_response" +} + +func sanitizeOperationIdForFilename(operationId string) string { + operationId = strings.ReplaceAll(operationId, "{", "_") + operationId = strings.ReplaceAll(operationId, "}", "_") + operationId = strings.ReplaceAll(operationId, "/", "_") + operationId = strings.ReplaceAll(operationId, " ", "_") + return operationId +} diff --git a/tests/mockserver/internal/logging/http_logger.go b/tests/mockserver/internal/logging/http_logger.go new file mode 100644 index 00000000..fdd5d058 --- /dev/null +++ b/tests/mockserver/internal/logging/http_logger.go @@ -0,0 +1,90 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "context" + "fmt" + "log/slog" + "net/http" + "net/http/httptest" + "net/http/httputil" +) + +// HTTPLoggerHandler wraps another [http.Handler] with logging output using the +// provided logger. +func HTTPLoggerHandler(logger *slog.Logger, next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + httpLogger := logger.WithGroup("http") + recorder := httptest.NewRecorder() + reqAttr := slog.Group( + "request", + slog.String("method", req.Method), + slog.String("url", req.URL.RequestURI()), + ) + + if !logger.Enabled(context.Background(), slog.LevelDebug) { + httpLogger.With(reqAttr).Info("received request") + next.ServeHTTP(recorder, req) + + resp := recorder.Result() + respAttr := slog.Group( + "response", + slog.String("status", resp.Status), + ) + + httpLogger.With(reqAttr).With(respAttr).Info("serving response") + + recorderToWriter(recorder, w) + + return + } + + dump, err := httputil.DumpRequest(req, true) + + if err != nil { + http.Error(w, fmt.Sprint(err), http.StatusInternalServerError) + + return + } + + rawReqAttr := slog.Group( + "request", + slog.String("method", req.Method), + slog.String("url", req.URL.RequestURI()), + slog.String("raw", string(dump)), + ) + + httpLogger.With(rawReqAttr).Debug("received request") + + next.ServeHTTP(recorder, req) + + dump, err = httputil.DumpResponse(recorder.Result(), true) + + if err != nil { + http.Error(w, fmt.Sprint(err), http.StatusInternalServerError) + + return + } + + rawRespAttr := slog.Group( + "response", + slog.String("raw", string(dump)), + ) + + // Intentionally use simpler request log attributes + httpLogger.With(reqAttr).With(rawRespAttr).Debug("serving response") + + recorderToWriter(recorder, w) + }) +} + +// recorderToWriter copies the recorded response back to the writer. +func recorderToWriter(recorder *httptest.ResponseRecorder, w http.ResponseWriter) { + for k, v := range recorder.Result().Header { + w.Header()[k] = v + } + + w.WriteHeader(recorder.Code) + _, _ = recorder.Body.WriteTo(w) +} diff --git a/tests/mockserver/internal/logging/levels.go b/tests/mockserver/internal/logging/levels.go new file mode 100644 index 00000000..d2a8e93c --- /dev/null +++ b/tests/mockserver/internal/logging/levels.go @@ -0,0 +1,55 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "fmt" + "log/slog" + "strings" +) + +const ( + // Debug log level. + LevelDebug = "DEBUG" + + // Info log level. + LevelInfo = "INFO" + + // Warning log level. + LevelWarn = "WARN" + + // Error log level. + LevelError = "ERROR" + + // Default log level. + DefaultLevel = LevelInfo +) + +// Levels returns all supported levels. +func Levels() []string { + return []string{ + LevelDebug, + LevelInfo, + LevelWarn, + LevelError, + } +} + +func levelFromString(level string) (*slog.LevelVar, error) { + result := new(slog.LevelVar) + + switch strings.ToUpper(level) { + case "DEBUG": + result.Set(slog.LevelDebug) + case "INFO": + result.Set(slog.LevelInfo) + case "WARN": + result.Set(slog.LevelWarn) + case "ERROR": + result.Set(slog.LevelError) + default: + return nil, fmt.Errorf("unsupported log level (%s), supported levels: %s", level, strings.Join(Levels(), ", ")) + } + + return result, nil +} diff --git a/tests/mockserver/internal/logging/logger.go b/tests/mockserver/internal/logging/logger.go new file mode 100644 index 00000000..bfd6dc78 --- /dev/null +++ b/tests/mockserver/internal/logging/logger.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "fmt" + "io" + "log/slog" +) + +func NewLogger(w io.Writer, formatStr string, levelStr string) (*slog.Logger, error) { + level, err := levelFromString(levelStr) + + if err != nil { + return nil, err + } + + format, err := formatFromString(formatStr) + + if err != nil { + return nil, err + } + + handlerOpts := &slog.HandlerOptions{ + Level: level, + } + + var handler slog.Handler + + switch format { + case FormatJSON: + handler = slog.NewJSONHandler(w, handlerOpts) + case FormatText: + handler = slog.NewTextHandler(w, handlerOpts) + default: + return nil, fmt.Errorf("unimplemented format: %s", format) + } + + return slog.New(handler), nil +} diff --git a/tests/mockserver/internal/logging/oas_operation.go b/tests/mockserver/internal/logging/oas_operation.go new file mode 100644 index 00000000..d4f2af7b --- /dev/null +++ b/tests/mockserver/internal/logging/oas_operation.go @@ -0,0 +1,87 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import "net/http" + +// OASOperation contains a singular OAS operation. An operation can have one or +// more calls. +type OASOperation struct { + // Underlying HTTP calls for the operation. + calls []*OASOperationCall + + // Directory that contains HTTP request and response logs. + dir *HTTPFileDirectory + + // Operation identifier as defined in OAS. + id string + + // HTTP method for the operation, such as GET. + method string + + // URL path for the operation, such as /path. + path string + + // TODO: Add group +} + +// NewOASOperation creates a new OASOperation. +func NewOASOperation(dir *HTTPFileDirectory, operationId string, method string, path string) *OASOperation { + operationCalls := dir.OperationCallCount(operationId) + result := &OASOperation{ + calls: make([]*OASOperationCall, 0, operationCalls), + dir: dir, + id: operationId, + method: method, + path: path, + } + + for i := range operationCalls { + // Start at 1 for human consumption. + result.calls = append(result.calls, NewOASOperationCall(result, i+1)) + } + + return result +} + +// CallCount returns the number of calls to an operation. +func (o *OASOperation) CallCount() int64 { + return int64(len(o.calls)) +} + +// Id returns the operation identifier as defined in OAS. +func (o *OASOperation) Id() string { + return o.id +} + +// Method returns the HTTP method for the operation, such as GET. +func (o *OASOperation) Method() string { + return o.method +} + +// Path returns the URL path for the operation, such as /path. +func (o *OASOperation) Path() string { + return o.path +} + +// RawRequest returns the raw HTTP request contents as dumped by +// [httputil.DumpRequest]. +func (o *OASOperation) RawRequest(call int64) ([]byte, error) { + return o.dir.RawRequest(o.id, call) +} + +// RawResponse returns the raw HTTP response contents as dumped by +// [httputil.DumpResponse]. +func (o *OASOperation) RawResponse(call int64) ([]byte, error) { + return o.dir.RawResponse(o.id, call) +} + +// Request returns the parsed HTTP request contents. +func (o *OASOperation) Request(call int64) (*http.Request, error) { + return o.dir.Request(o.id, call) +} + +// Response returns the parsed HTTP response contents. +func (o *OASOperation) Response(call int64) (*http.Response, error) { + return o.dir.Response(o.id, call) +} diff --git a/tests/mockserver/internal/logging/oas_operation_call.go b/tests/mockserver/internal/logging/oas_operation_call.go new file mode 100644 index 00000000..beb05908 --- /dev/null +++ b/tests/mockserver/internal/logging/oas_operation_call.go @@ -0,0 +1,123 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package logging + +import ( + "bufio" + "bytes" + "net/http" +) + +// OASOperationCall contains a singular OAS operation HTTP call. +type OASOperationCall struct { + // The HTTP call number, as determined by the HTTP server. Starts at 1 and + // incremented. + call int64 + + // The associated OAS operation to this call. + operation *OASOperation + + // Parsed HTTP request contents. Cached on first use. + request *http.Request + + // Raw HTTP request contents. Cached on first use. + requestRaw []byte + + // Parsed HTTP response contents. Cached on first use. + response *http.Response + + // Raw HTTP response contents. Cached on first use. + responseRaw []byte + + // TODO: Add test identifier +} + +// NewOASOperationCall creates a new OASOperationCall. +func NewOASOperationCall(operation *OASOperation, call int64) *OASOperationCall { + return &OASOperationCall{ + call: call, + operation: operation, + } +} + +// RawRequest returns the raw HTTP request contents as dumped by +// [httputil.DumpRequest]. +func (c *OASOperationCall) RawRequest() ([]byte, error) { + if c.requestRaw != nil { + return c.requestRaw, nil + } + + requestRaw, err := c.operation.RawRequest(c.call) + + if err != nil { + return nil, err + } + + c.requestRaw = requestRaw + + return c.requestRaw, nil +} + +// RawResponse returns the raw HTTP response contents as dumped by +// [httputil.DumpResponse]. +func (c *OASOperationCall) RawResponse() ([]byte, error) { + if c.responseRaw != nil { + return c.responseRaw, nil + } + + responseRaw, err := c.operation.RawResponse(c.call) + + if err != nil { + return nil, err + } + + c.responseRaw = responseRaw + + return c.responseRaw, nil +} + +// Request returns the parsed HTTP request contents. +func (c *OASOperationCall) Request() (*http.Request, error) { + if c.request != nil { + return c.request, nil + } + + requestRaw, err := c.RawRequest() + + if err != nil { + return nil, err + } + + request, err := http.ReadRequest(bufio.NewReader(bytes.NewReader(requestRaw))) + + if err != nil { + return nil, err + } + + c.request = request + + return c.request, nil +} + +// Response returns the parsed HTTP response contents. +func (c *OASOperationCall) Response() (*http.Response, error) { + if c.response != nil { + return c.response, nil + } + + responseRaw, err := c.RawResponse() + + if err != nil { + return nil, err + } + + response, err := http.ReadResponse(bufio.NewReader(bytes.NewReader(responseRaw)), nil) + + if err != nil { + return nil, err + } + + c.response = response + + return c.response, nil +} diff --git a/tests/mockserver/internal/sdk/models/components/activity.go b/tests/mockserver/internal/sdk/models/components/activity.go new file mode 100644 index 00000000..495599c8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/activity.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Activity struct { + Events []ActivityEvent `json:"events"` +} + +func (o *Activity) GetEvents() []ActivityEvent { + if o == nil { + return []ActivityEvent{} + } + return o.Events +} diff --git a/tests/mockserver/internal/sdk/models/components/activityevent.go b/tests/mockserver/internal/sdk/models/components/activityevent.go new file mode 100644 index 00000000..d01ceec5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/activityevent.go @@ -0,0 +1,110 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +// ActivityEventAction - The type of activity this represents. +type ActivityEventAction string + +const ( + ActivityEventActionView ActivityEventAction = "VIEW" + ActivityEventActionEdit ActivityEventAction = "EDIT" + ActivityEventActionSearch ActivityEventAction = "SEARCH" + ActivityEventActionComment ActivityEventAction = "COMMENT" + ActivityEventActionCrawl ActivityEventAction = "CRAWL" + ActivityEventActionHistoricalSearch ActivityEventAction = "HISTORICAL_SEARCH" + ActivityEventActionHistoricalView ActivityEventAction = "HISTORICAL_VIEW" +) + +func (e ActivityEventAction) ToPointer() *ActivityEventAction { + return &e +} +func (e *ActivityEventAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "VIEW": + fallthrough + case "EDIT": + fallthrough + case "SEARCH": + fallthrough + case "COMMENT": + fallthrough + case "CRAWL": + fallthrough + case "HISTORICAL_SEARCH": + fallthrough + case "HISTORICAL_VIEW": + *e = ActivityEventAction(v) + return nil + default: + return fmt.Errorf("invalid value for ActivityEventAction: %v", v) + } +} + +type ActivityEvent struct { + // 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. + ID *string `json:"id,omitempty"` + // The type of activity this represents. + Action ActivityEventAction `json:"action"` + Params *ActivityEventParams `json:"params,omitempty"` + // The ISO 8601 timestamp when the activity began. + Timestamp time.Time `json:"timestamp"` + // The URL of the activity. + URL string `json:"url"` +} + +func (a ActivityEvent) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *ActivityEvent) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ActivityEvent) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *ActivityEvent) GetAction() ActivityEventAction { + if o == nil { + return ActivityEventAction("") + } + return o.Action +} + +func (o *ActivityEvent) GetParams() *ActivityEventParams { + if o == nil { + return nil + } + return o.Params +} + +func (o *ActivityEvent) GetTimestamp() time.Time { + if o == nil { + return time.Time{} + } + return o.Timestamp +} + +func (o *ActivityEvent) GetURL() string { + if o == nil { + return "" + } + return o.URL +} diff --git a/tests/mockserver/internal/sdk/models/components/activityeventparams.go b/tests/mockserver/internal/sdk/models/components/activityeventparams.go new file mode 100644 index 00000000..eae5f03e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/activityeventparams.go @@ -0,0 +1,87 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ActivityEventParams struct { + // The HTML content of the page body. + BodyContent *string `json:"bodyContent,omitempty"` + // The full datasource instance name inferred from the URL of the event + DatasourceInstance *string `json:"datasourceInstance,omitempty"` + // The datasource without the instance inferred from the URL of the event + Datasource *string `json:"datasource,omitempty"` + // The instance only name of the datasource instance, e.g. 1 for jira_1, inferred from the URL of the event + InstanceOnlyName *string `json:"instanceOnlyName,omitempty"` + // Length in seconds of the activity. For VIEWS, this represents the amount the page was visible in the foreground. + Duration *int64 `json:"duration,omitempty"` + // The user's search query associated with a SEARCH. + Query *string `json:"query,omitempty"` + // The referring URL of the VIEW or SEARCH. + Referrer *string `json:"referrer,omitempty"` + // The page title associated with the URL of the event + Title *string `json:"title,omitempty"` + // 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. + Truncated *bool `json:"truncated,omitempty"` +} + +func (o *ActivityEventParams) GetBodyContent() *string { + if o == nil { + return nil + } + return o.BodyContent +} + +func (o *ActivityEventParams) GetDatasourceInstance() *string { + if o == nil { + return nil + } + return o.DatasourceInstance +} + +func (o *ActivityEventParams) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *ActivityEventParams) GetInstanceOnlyName() *string { + if o == nil { + return nil + } + return o.InstanceOnlyName +} + +func (o *ActivityEventParams) GetDuration() *int64 { + if o == nil { + return nil + } + return o.Duration +} + +func (o *ActivityEventParams) GetQuery() *string { + if o == nil { + return nil + } + return o.Query +} + +func (o *ActivityEventParams) GetReferrer() *string { + if o == nil { + return nil + } + return o.Referrer +} + +func (o *ActivityEventParams) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *ActivityEventParams) GetTruncated() *bool { + if o == nil { + return nil + } + return o.Truncated +} diff --git a/tests/mockserver/internal/sdk/models/components/addcollectionitemserror.go b/tests/mockserver/internal/sdk/models/components/addcollectionitemserror.go new file mode 100644 index 00000000..215308e8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/addcollectionitemserror.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type AddCollectionItemsErrorErrorType string + +const ( + AddCollectionItemsErrorErrorTypeExistingItem AddCollectionItemsErrorErrorType = "EXISTING_ITEM" +) + +func (e AddCollectionItemsErrorErrorType) ToPointer() *AddCollectionItemsErrorErrorType { + return &e +} +func (e *AddCollectionItemsErrorErrorType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "EXISTING_ITEM": + *e = AddCollectionItemsErrorErrorType(v) + return nil + default: + return fmt.Errorf("invalid value for AddCollectionItemsErrorErrorType: %v", v) + } +} + +type AddCollectionItemsError struct { + ErrorType *AddCollectionItemsErrorErrorType `json:"errorType,omitempty"` +} + +func (o *AddCollectionItemsError) GetErrorType() *AddCollectionItemsErrorErrorType { + if o == nil { + return nil + } + return o.ErrorType +} diff --git a/tests/mockserver/internal/sdk/models/components/addcollectionitemsrequest.go b/tests/mockserver/internal/sdk/models/components/addcollectionitemsrequest.go new file mode 100644 index 00000000..3a1ab6f6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/addcollectionitemsrequest.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AddCollectionItemsRequest struct { + // The ID of the Collection to add items to. + CollectionID float64 `json:"collectionId"` + // The CollectionItemDescriptors of the items being added. + AddedCollectionItemDescriptors []CollectionItemDescriptor `json:"addedCollectionItemDescriptors,omitempty"` +} + +func (o *AddCollectionItemsRequest) GetCollectionID() float64 { + if o == nil { + return 0.0 + } + return o.CollectionID +} + +func (o *AddCollectionItemsRequest) GetAddedCollectionItemDescriptors() []CollectionItemDescriptor { + if o == nil { + return nil + } + return o.AddedCollectionItemDescriptors +} diff --git a/tests/mockserver/internal/sdk/models/components/addcollectionitemsresponse.go b/tests/mockserver/internal/sdk/models/components/addcollectionitemsresponse.go new file mode 100644 index 00000000..dcb69503 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/addcollectionitemsresponse.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AddCollectionItemsResponse struct { + Collection *Collection `json:"collection,omitempty"` + Error *AddCollectionItemsError `json:"error,omitempty"` +} + +func (o *AddCollectionItemsResponse) GetCollection() *Collection { + if o == nil { + return nil + } + return o.Collection +} + +func (o *AddCollectionItemsResponse) GetError() *AddCollectionItemsError { + if o == nil { + return nil + } + return o.Error +} diff --git a/tests/mockserver/internal/sdk/models/components/additionalfielddefinition.go b/tests/mockserver/internal/sdk/models/components/additionalfielddefinition.go new file mode 100644 index 00000000..65166a2a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/additionalfielddefinition.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// Value - Either a string or HypertextField. When OpenAPI Generator supports oneOf, we can semantically enforce this in the docs. +type Value struct { +} + +// AdditionalFieldDefinition - Additional information about the employee or team. +type AdditionalFieldDefinition struct { + // 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. + Key *string `json:"key,omitempty"` + // List of type string or HypertextField. + // + // HypertextField is defined as + // ``` + // { + // anchor: string, // Anchor text for the hypertext field. + // hyperlink: string, // URL for the hypertext field. + // } + // ``` + // Example: ```{"anchor":"Glean","hyperlink":"https://glean.com"}``` + // + // When OpenAPI Generator supports oneOf, we will semantically enforce this in the docs. + // + // **Note**: If using the Python SDK to pass in a list of strings, the value may need to be a list of dictionaries. In that case, the key in that dictionary will be ignored. + // Example: ```"languages": [{"lang":"English","lang":"Spanish",...}]```. In this case, the key "lang" will be ignored and can even be passed in as an empty string. + // + Value []Value `json:"value,omitempty"` +} + +func (o *AdditionalFieldDefinition) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *AdditionalFieldDefinition) GetValue() []Value { + if o == nil { + return nil + } + return o.Value +} diff --git a/tests/mockserver/internal/sdk/models/components/agent.go b/tests/mockserver/internal/sdk/models/components/agent.go new file mode 100644 index 00000000..584c94ce --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/agent.go @@ -0,0 +1,106 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" +) + +// AgentMetadata - The agent metadata. Currently not implemented. +type AgentMetadata struct { +} + +// AgentCapabilities - Describes features that the agent supports. example: { +// "ap.io.messages": true, +// "ap.io.streaming": true +// } +type AgentCapabilities struct { + // Whether the agent supports messages as an input. If true, you'll pass `messages` as an input when running the agent. + ApIoMessages *bool `json:"ap.io.messages,omitempty"` + // Whether the agent supports streaming output. If true, you you can stream agent ouput. All agents currently support streaming. + ApIoStreaming *bool `json:"ap.io.streaming,omitempty"` + AdditionalProperties map[string]any `additionalProperties:"true" json:"-"` +} + +func (a AgentCapabilities) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AgentCapabilities) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *AgentCapabilities) GetApIoMessages() *bool { + if o == nil { + return nil + } + return o.ApIoMessages +} + +func (o *AgentCapabilities) GetApIoStreaming() *bool { + if o == nil { + return nil + } + return o.ApIoStreaming +} + +func (o *AgentCapabilities) GetAdditionalProperties() map[string]any { + if o == nil { + return nil + } + return o.AdditionalProperties +} + +type Agent struct { + // The ID of the agent. + AgentID string `json:"agent_id"` + // The name of the agent + Name string `json:"name"` + // The description of the agent. + Description *string `json:"description,omitempty"` + // The agent metadata. Currently not implemented. + Metadata *AgentMetadata `json:"metadata,omitempty"` + // Describes features that the agent supports. example: { + // "ap.io.messages": true, + // "ap.io.streaming": true + // } + Capabilities AgentCapabilities `json:"capabilities"` +} + +func (o *Agent) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +func (o *Agent) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Agent) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *Agent) GetMetadata() *AgentMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *Agent) GetCapabilities() AgentCapabilities { + if o == nil { + return AgentCapabilities{} + } + return o.Capabilities +} diff --git a/tests/mockserver/internal/sdk/models/components/agentconfig.go b/tests/mockserver/internal/sdk/models/components/agentconfig.go new file mode 100644 index 00000000..f861987c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/agentconfig.go @@ -0,0 +1,84 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// AgentEnum - Name of the agent. +type AgentEnum string + +const ( + AgentEnumDefault AgentEnum = "DEFAULT" + AgentEnumGpt AgentEnum = "GPT" +) + +func (e AgentEnum) ToPointer() *AgentEnum { + return &e +} +func (e *AgentEnum) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DEFAULT": + fallthrough + case "GPT": + *e = AgentEnum(v) + return nil + default: + return fmt.Errorf("invalid value for AgentEnum: %v", v) + } +} + +// Mode - Top level modes to run GleanChat in. +type Mode string + +const ( + ModeDefault Mode = "DEFAULT" + ModeQuick Mode = "QUICK" +) + +func (e Mode) ToPointer() *Mode { + return &e +} +func (e *Mode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DEFAULT": + fallthrough + case "QUICK": + *e = Mode(v) + return nil + default: + return fmt.Errorf("invalid value for Mode: %v", v) + } +} + +// AgentConfig - Describes the agent that executes the request. +type AgentConfig struct { + // Name of the agent. + Agent *AgentEnum `json:"agent,omitempty"` + // Top level modes to run GleanChat in. + Mode *Mode `json:"mode,omitempty"` +} + +func (o *AgentConfig) GetAgent() *AgentEnum { + if o == nil { + return nil + } + return o.Agent +} + +func (o *AgentConfig) GetMode() *Mode { + if o == nil { + return nil + } + return o.Mode +} diff --git a/tests/mockserver/internal/sdk/models/components/agentexecutionstatus.go b/tests/mockserver/internal/sdk/models/components/agentexecutionstatus.go new file mode 100644 index 00000000..7a8ba840 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/agentexecutionstatus.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// AgentExecutionStatus - The status of the run. One of 'error', 'success'. +type AgentExecutionStatus string + +const ( + AgentExecutionStatusError AgentExecutionStatus = "error" + AgentExecutionStatusSuccess AgentExecutionStatus = "success" +) + +func (e AgentExecutionStatus) ToPointer() *AgentExecutionStatus { + return &e +} +func (e *AgentExecutionStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "error": + fallthrough + case "success": + *e = AgentExecutionStatus(v) + return nil + default: + return fmt.Errorf("invalid value for AgentExecutionStatus: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/agentrun.go b/tests/mockserver/internal/sdk/models/components/agentrun.go new file mode 100644 index 00000000..a4ee03e2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/agentrun.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// AgentRun - Payload for creating a run. +type AgentRun struct { + // The ID of the agent to run. + AgentID string `json:"agent_id"` + // The input to the agent. + Input map[string]any `json:"input,omitempty"` + // The messages to pass an input to the agent. + Messages []Message `json:"messages,omitempty"` + // The status of the run. One of 'error', 'success'. + Status *AgentExecutionStatus `json:"status,omitempty"` +} + +func (o *AgentRun) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +func (o *AgentRun) GetInput() map[string]any { + if o == nil { + return nil + } + return o.Input +} + +func (o *AgentRun) GetMessages() []Message { + if o == nil { + return nil + } + return o.Messages +} + +func (o *AgentRun) GetStatus() *AgentExecutionStatus { + if o == nil { + return nil + } + return o.Status +} diff --git a/tests/mockserver/internal/sdk/models/components/agentruncreate.go b/tests/mockserver/internal/sdk/models/components/agentruncreate.go new file mode 100644 index 00000000..0124a053 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/agentruncreate.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// AgentRunCreate - Payload for creating a run. +type AgentRunCreate struct { + // The ID of the agent to run. + AgentID string `json:"agent_id"` + // The input to the agent. + Input map[string]any `json:"input,omitempty"` + // The messages to pass an input to the agent. + Messages []Message `json:"messages,omitempty"` +} + +func (o *AgentRunCreate) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +func (o *AgentRunCreate) GetInput() map[string]any { + if o == nil { + return nil + } + return o.Input +} + +func (o *AgentRunCreate) GetMessages() []Message { + if o == nil { + return nil + } + return o.Messages +} diff --git a/tests/mockserver/internal/sdk/models/components/agentrunwaitresponse.go b/tests/mockserver/internal/sdk/models/components/agentrunwaitresponse.go new file mode 100644 index 00000000..b5aa1e8e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/agentrunwaitresponse.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AgentRunWaitResponse struct { + Run *AgentRun `json:"run,omitempty"` + // The messages returned by the run. + Messages []Message `json:"messages,omitempty"` +} + +func (o *AgentRunWaitResponse) GetRun() *AgentRun { + if o == nil { + return nil + } + return o.Run +} + +func (o *AgentRunWaitResponse) GetMessages() []Message { + if o == nil { + return nil + } + return o.Messages +} diff --git a/tests/mockserver/internal/sdk/models/components/agentschemas.go b/tests/mockserver/internal/sdk/models/components/agentschemas.go new file mode 100644 index 00000000..4fe8d12d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/agentschemas.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// InputSchema - The schema for the agent input. In JSON Schema format. +type InputSchema struct { +} + +// OutputSchema - The schema for the agent output. In JSON Schema format. +type OutputSchema struct { +} + +// AgentSchemas - Defines the structure and properties of an agent. +type AgentSchemas struct { + // The ID of the agent. + AgentID string `json:"agent_id"` + // The schema for the agent input. In JSON Schema format. + InputSchema InputSchema `json:"input_schema"` + // The schema for the agent output. In JSON Schema format. + OutputSchema OutputSchema `json:"output_schema"` +} + +func (o *AgentSchemas) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +func (o *AgentSchemas) GetInputSchema() InputSchema { + if o == nil { + return InputSchema{} + } + return o.InputSchema +} + +func (o *AgentSchemas) GetOutputSchema() OutputSchema { + if o == nil { + return OutputSchema{} + } + return o.OutputSchema +} diff --git a/tests/mockserver/internal/sdk/models/components/aiappactioncounts.go b/tests/mockserver/internal/sdk/models/components/aiappactioncounts.go new file mode 100644 index 00000000..ac7cf152 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/aiappactioncounts.go @@ -0,0 +1,84 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" +) + +// AiAppActionCounts - Map from action to frequency. +type AiAppActionCounts struct { + // Total number of Slackbot responses, both proactive and reactive. + TotalSlackbotResponses *int64 `json:"totalSlackbotResponses,omitempty"` + // Total number of Slackbot responses shared publicly (upvoted). + TotalSlackbotResponsesShared *int64 `json:"totalSlackbotResponsesShared,omitempty"` + // Total number of Slackbot responses rejected as not helpful (downvoted). + TotalSlackbotResponsesNotHelpful *int64 `json:"totalSlackbotResponsesNotHelpful,omitempty"` + // Total number of Chat messages sent in requested period. + TotalChatMessages *int64 `json:"totalChatMessages,omitempty"` + // Total number of Chat messages which received upvotes by the user. + TotalUpvotes *int64 `json:"totalUpvotes,omitempty"` + // Total number of Chat messages which received downvotes by the user. + TotalDownvotes *int64 `json:"totalDownvotes,omitempty"` + AdditionalProperties map[string]int64 `additionalProperties:"true" json:"-"` +} + +func (a AiAppActionCounts) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AiAppActionCounts) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *AiAppActionCounts) GetTotalSlackbotResponses() *int64 { + if o == nil { + return nil + } + return o.TotalSlackbotResponses +} + +func (o *AiAppActionCounts) GetTotalSlackbotResponsesShared() *int64 { + if o == nil { + return nil + } + return o.TotalSlackbotResponsesShared +} + +func (o *AiAppActionCounts) GetTotalSlackbotResponsesNotHelpful() *int64 { + if o == nil { + return nil + } + return o.TotalSlackbotResponsesNotHelpful +} + +func (o *AiAppActionCounts) GetTotalChatMessages() *int64 { + if o == nil { + return nil + } + return o.TotalChatMessages +} + +func (o *AiAppActionCounts) GetTotalUpvotes() *int64 { + if o == nil { + return nil + } + return o.TotalUpvotes +} + +func (o *AiAppActionCounts) GetTotalDownvotes() *int64 { + if o == nil { + return nil + } + return o.TotalDownvotes +} + +func (o *AiAppActionCounts) GetAdditionalProperties() map[string]int64 { + if o == nil { + return nil + } + return o.AdditionalProperties +} diff --git a/tests/mockserver/internal/sdk/models/components/aiappsinsightsresponse.go b/tests/mockserver/internal/sdk/models/components/aiappsinsightsresponse.go new file mode 100644 index 00000000..8de39cd4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/aiappsinsightsresponse.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AiAppsInsightsResponse struct { + // Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). + LastLogTimestamp *int64 `json:"lastLogTimestamp,omitempty"` + AiAppInsights []UserActivityInsight `json:"aiAppInsights,omitempty"` + // Total number of active users on the Ai App in the requested period. + TotalActiveUsers *int64 `json:"totalActiveUsers,omitempty"` + // Map from action to frequency. + ActionCounts *AiAppActionCounts `json:"actionCounts,omitempty"` + // list of departments applicable for users tab. + Departments []string `json:"departments,omitempty"` +} + +func (o *AiAppsInsightsResponse) GetLastLogTimestamp() *int64 { + if o == nil { + return nil + } + return o.LastLogTimestamp +} + +func (o *AiAppsInsightsResponse) GetAiAppInsights() []UserActivityInsight { + if o == nil { + return nil + } + return o.AiAppInsights +} + +func (o *AiAppsInsightsResponse) GetTotalActiveUsers() *int64 { + if o == nil { + return nil + } + return o.TotalActiveUsers +} + +func (o *AiAppsInsightsResponse) GetActionCounts() *AiAppActionCounts { + if o == nil { + return nil + } + return o.ActionCounts +} + +func (o *AiAppsInsightsResponse) GetDepartments() []string { + if o == nil { + return nil + } + return o.Departments +} diff --git a/tests/mockserver/internal/sdk/models/components/aiinsightsresponse.go b/tests/mockserver/internal/sdk/models/components/aiinsightsresponse.go new file mode 100644 index 00000000..478529db --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/aiinsightsresponse.go @@ -0,0 +1,113 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AiInsightsResponse struct { + // Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). + LastLogTimestamp *int64 `json:"lastLogTimestamp,omitempty"` + AssistantInsights []UserActivityInsight `json:"assistantInsights,omitempty"` + // Total number of Active Assistant users (chat, summary, AIA) in requested period. + TotalActiveAssistantUsers *int64 `json:"totalActiveAssistantUsers,omitempty"` + // Total number of Chat messages sent in requested period. + TotalChatMessages *int64 `json:"totalChatMessages,omitempty"` + // Total number of AI Document Summarizations invoked in the requested period. + TotalAiSummarizations *int64 `json:"totalAiSummarizations,omitempty"` + // Total number of AI Answers generated in the requested period. + TotalAiAnswers *int64 `json:"totalAiAnswers,omitempty"` + // Total number of Chat messages which received upvotes by the user. + TotalUpvotes *int64 `json:"totalUpvotes,omitempty"` + // Total number of Chat messages which received downvotes by the user. + TotalDownvotes *int64 `json:"totalDownvotes,omitempty"` + // Total number of Gleanbot responses, both proactive and reactive. + TotalGleanbotResponses *int64 `json:"totalGleanbotResponses,omitempty"` + // Total number of Gleanbot responses shared publicly (upvoted). + TotalGleanbotResponsesShared *int64 `json:"totalGleanbotResponsesShared,omitempty"` + // Total number of Glean responses rejected as not helpful (downvoted). + TotalGleanbotResponsesNotHelpful *int64 `json:"totalGleanbotResponsesNotHelpful,omitempty"` + // list of departments applicable for users tab. + Departments []string `json:"departments,omitempty"` +} + +func (o *AiInsightsResponse) GetLastLogTimestamp() *int64 { + if o == nil { + return nil + } + return o.LastLogTimestamp +} + +func (o *AiInsightsResponse) GetAssistantInsights() []UserActivityInsight { + if o == nil { + return nil + } + return o.AssistantInsights +} + +func (o *AiInsightsResponse) GetTotalActiveAssistantUsers() *int64 { + if o == nil { + return nil + } + return o.TotalActiveAssistantUsers +} + +func (o *AiInsightsResponse) GetTotalChatMessages() *int64 { + if o == nil { + return nil + } + return o.TotalChatMessages +} + +func (o *AiInsightsResponse) GetTotalAiSummarizations() *int64 { + if o == nil { + return nil + } + return o.TotalAiSummarizations +} + +func (o *AiInsightsResponse) GetTotalAiAnswers() *int64 { + if o == nil { + return nil + } + return o.TotalAiAnswers +} + +func (o *AiInsightsResponse) GetTotalUpvotes() *int64 { + if o == nil { + return nil + } + return o.TotalUpvotes +} + +func (o *AiInsightsResponse) GetTotalDownvotes() *int64 { + if o == nil { + return nil + } + return o.TotalDownvotes +} + +func (o *AiInsightsResponse) GetTotalGleanbotResponses() *int64 { + if o == nil { + return nil + } + return o.TotalGleanbotResponses +} + +func (o *AiInsightsResponse) GetTotalGleanbotResponsesShared() *int64 { + if o == nil { + return nil + } + return o.TotalGleanbotResponsesShared +} + +func (o *AiInsightsResponse) GetTotalGleanbotResponsesNotHelpful() *int64 { + if o == nil { + return nil + } + return o.TotalGleanbotResponsesNotHelpful +} + +func (o *AiInsightsResponse) GetDepartments() []string { + if o == nil { + return nil + } + return o.Departments +} diff --git a/tests/mockserver/internal/sdk/models/components/allowlistoptions.go b/tests/mockserver/internal/sdk/models/components/allowlistoptions.go new file mode 100644 index 00000000..cf238c9e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/allowlistoptions.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// AllowlistOptions - 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. +type AllowlistOptions struct { + // list of words and phrases to consider as whitelisted content + Terms []string `json:"terms,omitempty"` +} + +func (o *AllowlistOptions) GetTerms() []string { + if o == nil { + return nil + } + return o.Terms +} diff --git a/tests/mockserver/internal/sdk/models/components/announcement.go b/tests/mockserver/internal/sdk/models/components/announcement.go new file mode 100644 index 00000000..e9ccadcc --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/announcement.go @@ -0,0 +1,307 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +// AnnouncementChannel - This determines whether this is a Social Feed post or a regular announcement. +type AnnouncementChannel string + +const ( + AnnouncementChannelMain AnnouncementChannel = "MAIN" + AnnouncementChannelSocialFeed AnnouncementChannel = "SOCIAL_FEED" +) + +func (e AnnouncementChannel) ToPointer() *AnnouncementChannel { + return &e +} +func (e *AnnouncementChannel) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "MAIN": + fallthrough + case "SOCIAL_FEED": + *e = AnnouncementChannel(v) + return nil + default: + return fmt.Errorf("invalid value for AnnouncementChannel: %v", v) + } +} + +// AnnouncementPostType - 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. +type AnnouncementPostType string + +const ( + AnnouncementPostTypeText AnnouncementPostType = "TEXT" + AnnouncementPostTypeLink AnnouncementPostType = "LINK" +) + +func (e AnnouncementPostType) ToPointer() *AnnouncementPostType { + return &e +} +func (e *AnnouncementPostType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "TEXT": + fallthrough + case "LINK": + *e = AnnouncementPostType(v) + return nil + default: + return fmt.Errorf("invalid value for AnnouncementPostType: %v", v) + } +} + +type AnnouncementViewerInfo struct { + // Whether the viewer has dismissed the announcement. + IsDismissed *bool `json:"isDismissed,omitempty"` + // Whether the viewer has read the announcement. + IsRead *bool `json:"isRead,omitempty"` +} + +func (o *AnnouncementViewerInfo) GetIsDismissed() *bool { + if o == nil { + return nil + } + return o.IsDismissed +} + +func (o *AnnouncementViewerInfo) GetIsRead() *bool { + if o == nil { + return nil + } + return o.IsRead +} + +type Announcement struct { + // The date and time at which the announcement becomes active. + StartTime *time.Time `json:"startTime,omitempty"` + // The date and time at which the announcement expires. + EndTime *time.Time `json:"endTime,omitempty"` + // The headline of the announcement. + Title *string `json:"title,omitempty"` + Body *StructuredText `json:"body,omitempty"` + // An emoji used to indicate the nature of the announcement. + Emoji *string `json:"emoji,omitempty"` + Thumbnail *Thumbnail `json:"thumbnail,omitempty"` + Banner *Thumbnail `json:"banner,omitempty"` + // Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread). + SourceDocumentID *string `json:"sourceDocumentId,omitempty"` + // Whether or not to hide an author attribution. + HideAttribution *bool `json:"hideAttribution,omitempty"` + // This determines whether this is a Social Feed post or a regular announcement. + Channel *AnnouncementChannel `json:"channel,omitempty"` + // 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. + PostType *AnnouncementPostType `json:"postType,omitempty"` + // Used by the Social Feed to pin posts to the front of the feed. + IsPrioritized *bool `json:"isPrioritized,omitempty"` + // 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". + ViewURL *string `json:"viewUrl,omitempty"` + // The opaque id of the associated draft. + DraftID *int64 `json:"draftId,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + // The opaque id of the announcement. + ID *int64 `json:"id,omitempty"` + Author *Person `json:"author,omitempty"` + // Server Unix timestamp of the creation time (in seconds since epoch UTC). + CreateTimestamp *int64 `json:"createTimestamp,omitempty"` + // Server Unix timestamp of the last update time (in seconds since epoch UTC). + LastUpdateTimestamp *int64 `json:"lastUpdateTimestamp,omitempty"` + UpdatedBy *Person `json:"updatedBy,omitempty"` + ViewerInfo *AnnouncementViewerInfo `json:"viewerInfo,omitempty"` + SourceDocument *Document `json:"sourceDocument,omitempty"` + // Whether or not the announcement is published. + IsPublished *bool `json:"isPublished,omitempty"` +} + +func (a Announcement) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *Announcement) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Announcement) GetStartTime() *time.Time { + if o == nil { + return nil + } + return o.StartTime +} + +func (o *Announcement) GetEndTime() *time.Time { + if o == nil { + return nil + } + return o.EndTime +} + +func (o *Announcement) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *Announcement) GetBody() *StructuredText { + if o == nil { + return nil + } + return o.Body +} + +func (o *Announcement) GetEmoji() *string { + if o == nil { + return nil + } + return o.Emoji +} + +func (o *Announcement) GetThumbnail() *Thumbnail { + if o == nil { + return nil + } + return o.Thumbnail +} + +func (o *Announcement) GetBanner() *Thumbnail { + if o == nil { + return nil + } + return o.Banner +} + +func (o *Announcement) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *Announcement) GetSourceDocumentID() *string { + if o == nil { + return nil + } + return o.SourceDocumentID +} + +func (o *Announcement) GetHideAttribution() *bool { + if o == nil { + return nil + } + return o.HideAttribution +} + +func (o *Announcement) GetChannel() *AnnouncementChannel { + if o == nil { + return nil + } + return o.Channel +} + +func (o *Announcement) GetPostType() *AnnouncementPostType { + if o == nil { + return nil + } + return o.PostType +} + +func (o *Announcement) GetIsPrioritized() *bool { + if o == nil { + return nil + } + return o.IsPrioritized +} + +func (o *Announcement) GetViewURL() *string { + if o == nil { + return nil + } + return o.ViewURL +} + +func (o *Announcement) GetDraftID() *int64 { + if o == nil { + return nil + } + return o.DraftID +} + +func (o *Announcement) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *Announcement) GetID() *int64 { + if o == nil { + return nil + } + return o.ID +} + +func (o *Announcement) GetAuthor() *Person { + if o == nil { + return nil + } + return o.Author +} + +func (o *Announcement) GetCreateTimestamp() *int64 { + if o == nil { + return nil + } + return o.CreateTimestamp +} + +func (o *Announcement) GetLastUpdateTimestamp() *int64 { + if o == nil { + return nil + } + return o.LastUpdateTimestamp +} + +func (o *Announcement) GetUpdatedBy() *Person { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *Announcement) GetViewerInfo() *AnnouncementViewerInfo { + if o == nil { + return nil + } + return o.ViewerInfo +} + +func (o *Announcement) GetSourceDocument() *Document { + if o == nil { + return nil + } + return o.SourceDocument +} + +func (o *Announcement) GetIsPublished() *bool { + if o == nil { + return nil + } + return o.IsPublished +} diff --git a/tests/mockserver/internal/sdk/models/components/anonymousevent.go b/tests/mockserver/internal/sdk/models/components/anonymousevent.go new file mode 100644 index 00000000..4aa5bb37 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/anonymousevent.go @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// AnonymousEventEventType - The nature of the event, for example "out of office". +type AnonymousEventEventType string + +const ( + AnonymousEventEventTypeDefault AnonymousEventEventType = "DEFAULT" + AnonymousEventEventTypeOutOfOffice AnonymousEventEventType = "OUT_OF_OFFICE" +) + +func (e AnonymousEventEventType) ToPointer() *AnonymousEventEventType { + return &e +} +func (e *AnonymousEventEventType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DEFAULT": + fallthrough + case "OUT_OF_OFFICE": + *e = AnonymousEventEventType(v) + return nil + default: + return fmt.Errorf("invalid value for AnonymousEventEventType: %v", v) + } +} + +// AnonymousEvent - A generic, light-weight calendar event. +type AnonymousEvent struct { + Time *TimeInterval `json:"time,omitempty"` + // The nature of the event, for example "out of office". + EventType *AnonymousEventEventType `json:"eventType,omitempty"` +} + +func (o *AnonymousEvent) GetTime() *TimeInterval { + if o == nil { + return nil + } + return o.Time +} + +func (o *AnonymousEvent) GetEventType() *AnonymousEventEventType { + if o == nil { + return nil + } + return o.EventType +} diff --git a/tests/mockserver/internal/sdk/models/components/answer.go b/tests/mockserver/internal/sdk/models/components/answer.go new file mode 100644 index 00000000..39e297a4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/answer.go @@ -0,0 +1,255 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +type AnswerSourceType string + +const ( + AnswerSourceTypeDocument AnswerSourceType = "DOCUMENT" + AnswerSourceTypeAssistant AnswerSourceType = "ASSISTANT" +) + +func (e AnswerSourceType) ToPointer() *AnswerSourceType { + return &e +} +func (e *AnswerSourceType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DOCUMENT": + fallthrough + case "ASSISTANT": + *e = AnswerSourceType(v) + return nil + default: + return fmt.Errorf("invalid value for AnswerSourceType: %v", v) + } +} + +type Answer struct { + // The opaque ID of the Answer. + ID int64 `json:"id"` + // 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. + DocID *string `json:"docId,omitempty"` + Question *string `json:"question,omitempty"` + // Additional ways of phrasing this question. + QuestionVariations []string `json:"questionVariations,omitempty"` + // The plain text answer to the question. + BodyText *string `json:"bodyText,omitempty"` + // The parent board ID of this Answer, or 0 if it's a floating Answer. + BoardID *int64 `json:"boardId,omitempty"` + // Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // A list of user roles for the answer added by the owner. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of user roles for the answer removed by the owner. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` + // A list of roles for this answer explicitly granted by an owner, editor, or admin. + Roles []UserRoleSpecification `json:"roles,omitempty"` + SourceDocumentSpec *DocumentSpecUnion `json:"sourceDocumentSpec,omitempty"` + SourceType *AnswerSourceType `json:"sourceType,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + CombinedAnswerText *StructuredText `json:"combinedAnswerText,omitempty"` + Likes *AnswerLikes `json:"likes,omitempty"` + Author *Person `json:"author,omitempty"` + // The time the answer was created in ISO format (ISO 8601). + CreateTime *time.Time `json:"createTime,omitempty"` + // The time the answer was last updated in ISO format (ISO 8601). + UpdateTime *time.Time `json:"updateTime,omitempty"` + UpdatedBy *Person `json:"updatedBy,omitempty"` + Verification *Verification `json:"verification,omitempty"` + Board *AnswerBoard `json:"board,omitempty"` + // The collections to which the answer belongs. + Collections []Collection `json:"collections,omitempty"` + // The document's document_category(.proto). + DocumentCategory *string `json:"documentCategory,omitempty"` + SourceDocument *Document `json:"sourceDocument,omitempty"` +} + +func (a Answer) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *Answer) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Answer) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *Answer) GetDocID() *string { + if o == nil { + return nil + } + return o.DocID +} + +func (o *Answer) GetQuestion() *string { + if o == nil { + return nil + } + return o.Question +} + +func (o *Answer) GetQuestionVariations() []string { + if o == nil { + return nil + } + return o.QuestionVariations +} + +func (o *Answer) GetBodyText() *string { + if o == nil { + return nil + } + return o.BodyText +} + +func (o *Answer) GetBoardID() *int64 { + if o == nil { + return nil + } + return o.BoardID +} + +func (o *Answer) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *Answer) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *Answer) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} + +func (o *Answer) GetRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.Roles +} + +func (o *Answer) GetSourceDocumentSpec() *DocumentSpecUnion { + if o == nil { + return nil + } + return o.SourceDocumentSpec +} + +func (o *Answer) GetSourceType() *AnswerSourceType { + if o == nil { + return nil + } + return o.SourceType +} + +func (o *Answer) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *Answer) GetCombinedAnswerText() *StructuredText { + if o == nil { + return nil + } + return o.CombinedAnswerText +} + +func (o *Answer) GetLikes() *AnswerLikes { + if o == nil { + return nil + } + return o.Likes +} + +func (o *Answer) GetAuthor() *Person { + if o == nil { + return nil + } + return o.Author +} + +func (o *Answer) GetCreateTime() *time.Time { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *Answer) GetUpdateTime() *time.Time { + if o == nil { + return nil + } + return o.UpdateTime +} + +func (o *Answer) GetUpdatedBy() *Person { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *Answer) GetVerification() *Verification { + if o == nil { + return nil + } + return o.Verification +} + +func (o *Answer) GetBoard() *AnswerBoard { + if o == nil { + return nil + } + return o.Board +} + +func (o *Answer) GetCollections() []Collection { + if o == nil { + return nil + } + return o.Collections +} + +func (o *Answer) GetDocumentCategory() *string { + if o == nil { + return nil + } + return o.DocumentCategory +} + +func (o *Answer) GetSourceDocument() *Document { + if o == nil { + return nil + } + return o.SourceDocument +} diff --git a/tests/mockserver/internal/sdk/models/components/answerboard.go b/tests/mockserver/internal/sdk/models/components/answerboard.go new file mode 100644 index 00000000..a69d7740 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/answerboard.go @@ -0,0 +1,134 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type AnswerBoard struct { + // The unique name of the Collection. + Name string `json:"name"` + // A brief summary of the Collection's contents. + Description string `json:"description"` + // A list of added user roles for the Collection. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of removed user roles for the Collection. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` + // Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + // The unique ID of the Answer Board. + ID int64 `json:"id"` + CreateTime *time.Time `json:"createTime,omitempty"` + UpdateTime *time.Time `json:"updateTime,omitempty"` + Creator *Person `json:"creator,omitempty"` + UpdatedBy *Person `json:"updatedBy,omitempty"` + // The number of items currently in the Answer Board. Separated from the actual items so we can grab the count without items. + ItemCount *int64 `json:"itemCount,omitempty"` + // A list of user roles for the Answer Board. + Roles []UserRoleSpecification `json:"roles,omitempty"` +} + +func (a AnswerBoard) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AnswerBoard) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *AnswerBoard) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *AnswerBoard) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +func (o *AnswerBoard) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *AnswerBoard) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} + +func (o *AnswerBoard) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *AnswerBoard) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *AnswerBoard) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *AnswerBoard) GetCreateTime() *time.Time { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *AnswerBoard) GetUpdateTime() *time.Time { + if o == nil { + return nil + } + return o.UpdateTime +} + +func (o *AnswerBoard) GetCreator() *Person { + if o == nil { + return nil + } + return o.Creator +} + +func (o *AnswerBoard) GetUpdatedBy() *Person { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *AnswerBoard) GetItemCount() *int64 { + if o == nil { + return nil + } + return o.ItemCount +} + +func (o *AnswerBoard) GetRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.Roles +} diff --git a/tests/mockserver/internal/sdk/models/components/answercreationdata.go b/tests/mockserver/internal/sdk/models/components/answercreationdata.go new file mode 100644 index 00000000..779a51dd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/answercreationdata.go @@ -0,0 +1,141 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type AnswerCreationDataSourceType string + +const ( + AnswerCreationDataSourceTypeDocument AnswerCreationDataSourceType = "DOCUMENT" + AnswerCreationDataSourceTypeAssistant AnswerCreationDataSourceType = "ASSISTANT" +) + +func (e AnswerCreationDataSourceType) ToPointer() *AnswerCreationDataSourceType { + return &e +} +func (e *AnswerCreationDataSourceType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DOCUMENT": + fallthrough + case "ASSISTANT": + *e = AnswerCreationDataSourceType(v) + return nil + default: + return fmt.Errorf("invalid value for AnswerCreationDataSourceType: %v", v) + } +} + +type AnswerCreationData struct { + Question *string `json:"question,omitempty"` + // Additional ways of phrasing this question. + QuestionVariations []string `json:"questionVariations,omitempty"` + // The plain text answer to the question. + BodyText *string `json:"bodyText,omitempty"` + // The parent board ID of this Answer, or 0 if it's a floating Answer. + BoardID *int64 `json:"boardId,omitempty"` + // Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // A list of user roles for the answer added by the owner. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of user roles for the answer removed by the owner. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` + // A list of roles for this answer explicitly granted by an owner, editor, or admin. + Roles []UserRoleSpecification `json:"roles,omitempty"` + SourceDocumentSpec *DocumentSpecUnion `json:"sourceDocumentSpec,omitempty"` + SourceType *AnswerCreationDataSourceType `json:"sourceType,omitempty"` + // IDs of Collections to which a document is added. + AddedCollections []int64 `json:"addedCollections,omitempty"` + CombinedAnswerText *StructuredTextMutableProperties `json:"combinedAnswerText,omitempty"` +} + +func (o *AnswerCreationData) GetQuestion() *string { + if o == nil { + return nil + } + return o.Question +} + +func (o *AnswerCreationData) GetQuestionVariations() []string { + if o == nil { + return nil + } + return o.QuestionVariations +} + +func (o *AnswerCreationData) GetBodyText() *string { + if o == nil { + return nil + } + return o.BodyText +} + +func (o *AnswerCreationData) GetBoardID() *int64 { + if o == nil { + return nil + } + return o.BoardID +} + +func (o *AnswerCreationData) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *AnswerCreationData) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *AnswerCreationData) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} + +func (o *AnswerCreationData) GetRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.Roles +} + +func (o *AnswerCreationData) GetSourceDocumentSpec() *DocumentSpecUnion { + if o == nil { + return nil + } + return o.SourceDocumentSpec +} + +func (o *AnswerCreationData) GetSourceType() *AnswerCreationDataSourceType { + if o == nil { + return nil + } + return o.SourceType +} + +func (o *AnswerCreationData) GetAddedCollections() []int64 { + if o == nil { + return nil + } + return o.AddedCollections +} + +func (o *AnswerCreationData) GetCombinedAnswerText() *StructuredTextMutableProperties { + if o == nil { + return nil + } + return o.CombinedAnswerText +} diff --git a/tests/mockserver/internal/sdk/models/components/answerlike.go b/tests/mockserver/internal/sdk/models/components/answerlike.go new file mode 100644 index 00000000..8c643b1f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/answerlike.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type AnswerLike struct { + User *Person `json:"user,omitempty"` + // The time the user liked the answer in ISO format (ISO 8601). + CreateTime *time.Time `json:"createTime,omitempty"` +} + +func (a AnswerLike) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AnswerLike) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *AnswerLike) GetUser() *Person { + if o == nil { + return nil + } + return o.User +} + +func (o *AnswerLike) GetCreateTime() *time.Time { + if o == nil { + return nil + } + return o.CreateTime +} diff --git a/tests/mockserver/internal/sdk/models/components/answerlikes.go b/tests/mockserver/internal/sdk/models/components/answerlikes.go new file mode 100644 index 00000000..1341b507 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/answerlikes.go @@ -0,0 +1,32 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AnswerLikes struct { + LikedBy []AnswerLike `json:"likedBy"` + // Whether the user in context liked the answer. + LikedByUser bool `json:"likedByUser"` + // The total number of likes for the answer. + NumLikes int64 `json:"numLikes"` +} + +func (o *AnswerLikes) GetLikedBy() []AnswerLike { + if o == nil { + return []AnswerLike{} + } + return o.LikedBy +} + +func (o *AnswerLikes) GetLikedByUser() bool { + if o == nil { + return false + } + return o.LikedByUser +} + +func (o *AnswerLikes) GetNumLikes() int64 { + if o == nil { + return 0 + } + return o.NumLikes +} diff --git a/tests/mockserver/internal/sdk/models/components/answerresult.go b/tests/mockserver/internal/sdk/models/components/answerresult.go new file mode 100644 index 00000000..f5687a60 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/answerresult.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AnswerResult struct { + Answer Answer `json:"answer"` + // An opaque token that represents this particular Answer. To be used for `/feedback` reporting. + TrackingToken *string `json:"trackingToken,omitempty"` +} + +func (o *AnswerResult) GetAnswer() Answer { + if o == nil { + return Answer{} + } + return o.Answer +} + +func (o *AnswerResult) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} diff --git a/tests/mockserver/internal/sdk/models/components/appresult.go b/tests/mockserver/internal/sdk/models/components/appresult.go new file mode 100644 index 00000000..e19c2214 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/appresult.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AppResult struct { + // The app or other repository type this represents + Datasource string `json:"datasource"` + // The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). + DocType *string `json:"docType,omitempty"` + // Mimetype is used to differentiate between sub applications from a datasource (e.g. Sheets, Docs from Gdrive) + MimeType *string `json:"mimeType,omitempty"` + // If there is available icon URL. + IconURL *string `json:"iconUrl,omitempty"` +} + +func (o *AppResult) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *AppResult) GetDocType() *string { + if o == nil { + return nil + } + return o.DocType +} + +func (o *AppResult) GetMimeType() *string { + if o == nil { + return nil + } + return o.MimeType +} + +func (o *AppResult) GetIconURL() *string { + if o == nil { + return nil + } + return o.IconURL +} diff --git a/tests/mockserver/internal/sdk/models/components/authconfig.go b/tests/mockserver/internal/sdk/models/components/authconfig.go new file mode 100644 index 00000000..1cecca52 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/authconfig.go @@ -0,0 +1,217 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +// AuthConfigType - 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. +// 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. +// 'OAUTH_USER' uses individual user tokens for external API calls. +// 'DWD' refers to domain wide delegation. +type AuthConfigType string + +const ( + AuthConfigTypeNone AuthConfigType = "NONE" + AuthConfigTypeOauthUser AuthConfigType = "OAUTH_USER" + AuthConfigTypeOauthAdmin AuthConfigType = "OAUTH_ADMIN" + AuthConfigTypeAPIKey AuthConfigType = "API_KEY" + AuthConfigTypeBasicAuth AuthConfigType = "BASIC_AUTH" + AuthConfigTypeDwd AuthConfigType = "DWD" +) + +func (e AuthConfigType) ToPointer() *AuthConfigType { + return &e +} +func (e *AuthConfigType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NONE": + fallthrough + case "OAUTH_USER": + fallthrough + case "OAUTH_ADMIN": + fallthrough + case "API_KEY": + fallthrough + case "BASIC_AUTH": + fallthrough + case "DWD": + *e = AuthConfigType(v) + return nil + default: + return fmt.Errorf("invalid value for AuthConfigType: %v", v) + } +} + +// GrantType - The type of grant type being used. +type GrantType string + +const ( + GrantTypeAuthCode GrantType = "AUTH_CODE" + GrantTypeClientCredentials GrantType = "CLIENT_CREDENTIALS" +) + +func (e GrantType) ToPointer() *GrantType { + return &e +} +func (e *GrantType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "AUTH_CODE": + fallthrough + case "CLIENT_CREDENTIALS": + *e = GrantType(v) + return nil + default: + return fmt.Errorf("invalid value for GrantType: %v", v) + } +} + +// AuthConfigStatus - Auth status of the tool. +type AuthConfigStatus string + +const ( + AuthConfigStatusAwaitingAuth AuthConfigStatus = "AWAITING_AUTH" + AuthConfigStatusAuthorized AuthConfigStatus = "AUTHORIZED" +) + +func (e AuthConfigStatus) ToPointer() *AuthConfigStatus { + return &e +} +func (e *AuthConfigStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "AWAITING_AUTH": + fallthrough + case "AUTHORIZED": + *e = AuthConfigStatus(v) + return nil + default: + return fmt.Errorf("invalid value for AuthConfigStatus: %v", v) + } +} + +// AuthConfig - Config for tool's authentication method. +type AuthConfig struct { + // Whether or not this tool is hosted on-premise. + IsOnPrem *bool `json:"isOnPrem,omitempty"` + // Whether or not this uses central auth. + UsesCentralAuth *bool `json:"usesCentralAuth,omitempty"` + // 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. + // 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. + // 'OAUTH_USER' uses individual user tokens for external API calls. + // 'DWD' refers to domain wide delegation. + // + Type *AuthConfigType `json:"type,omitempty"` + // The type of grant type being used. + GrantType *GrantType `json:"grantType,omitempty"` + // Auth status of the tool. + Status *AuthConfigStatus `json:"status,omitempty"` + // The URL where users will be directed to start the OAuth flow. + ClientURL *string `json:"client_url,omitempty"` + // A list of strings denoting the different scopes or access levels required by the tool. + Scopes []string `json:"scopes,omitempty"` + // A list of strings denoting the different audience which can access the tool. + Audiences []string `json:"audiences,omitempty"` + // The OAuth provider's endpoint, where access tokens are requested. + AuthorizationURL *string `json:"authorization_url,omitempty"` + // The time the tool was last authorized in ISO format (ISO 8601). + LastAuthorizedAt *time.Time `json:"lastAuthorizedAt,omitempty"` +} + +func (a AuthConfig) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AuthConfig) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil { + return err + } + return nil +} + +func (o *AuthConfig) GetIsOnPrem() *bool { + if o == nil { + return nil + } + return o.IsOnPrem +} + +func (o *AuthConfig) GetUsesCentralAuth() *bool { + if o == nil { + return nil + } + return o.UsesCentralAuth +} + +func (o *AuthConfig) GetType() *AuthConfigType { + if o == nil { + return nil + } + return o.Type +} + +func (o *AuthConfig) GetGrantType() *GrantType { + if o == nil { + return nil + } + return o.GrantType +} + +func (o *AuthConfig) GetStatus() *AuthConfigStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *AuthConfig) GetClientURL() *string { + if o == nil { + return nil + } + return o.ClientURL +} + +func (o *AuthConfig) GetScopes() []string { + if o == nil { + return nil + } + return o.Scopes +} + +func (o *AuthConfig) GetAudiences() []string { + if o == nil { + return nil + } + return o.Audiences +} + +func (o *AuthConfig) GetAuthorizationURL() *string { + if o == nil { + return nil + } + return o.AuthorizationURL +} + +func (o *AuthConfig) GetLastAuthorizedAt() *time.Time { + if o == nil { + return nil + } + return o.LastAuthorizedAt +} diff --git a/tests/mockserver/internal/sdk/models/components/authtoken.go b/tests/mockserver/internal/sdk/models/components/authtoken.go new file mode 100644 index 00000000..a3945388 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/authtoken.go @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AuthToken struct { + AccessToken string `json:"accessToken"` + Datasource string `json:"datasource"` + Scope *string `json:"scope,omitempty"` + TokenType *string `json:"tokenType,omitempty"` + // Used by Google to indicate the index of the logged in user. Useful for generating hyperlinks that support multilogin. + AuthUser *string `json:"authUser,omitempty"` + // Unix timestamp when this token expires (in seconds since epoch UTC). + Expiration *int64 `json:"expiration,omitempty"` +} + +func (o *AuthToken) GetAccessToken() string { + if o == nil { + return "" + } + return o.AccessToken +} + +func (o *AuthToken) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *AuthToken) GetScope() *string { + if o == nil { + return nil + } + return o.Scope +} + +func (o *AuthToken) GetTokenType() *string { + if o == nil { + return nil + } + return o.TokenType +} + +func (o *AuthToken) GetAuthUser() *string { + if o == nil { + return nil + } + return o.AuthUser +} + +func (o *AuthToken) GetExpiration() *int64 { + if o == nil { + return nil + } + return o.Expiration +} diff --git a/tests/mockserver/internal/sdk/models/components/autocompleterequest.go b/tests/mockserver/internal/sdk/models/components/autocompleterequest.go new file mode 100644 index 00000000..98c22584 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/autocompleterequest.go @@ -0,0 +1,141 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type AutocompleteRequestResultType string + +const ( + AutocompleteRequestResultTypeAdditionalDocument AutocompleteRequestResultType = "ADDITIONAL_DOCUMENT" + AutocompleteRequestResultTypeApp AutocompleteRequestResultType = "APP" + AutocompleteRequestResultTypeBrowserHistory AutocompleteRequestResultType = "BROWSER_HISTORY" + AutocompleteRequestResultTypeDatasource AutocompleteRequestResultType = "DATASOURCE" + AutocompleteRequestResultTypeDocument AutocompleteRequestResultType = "DOCUMENT" + AutocompleteRequestResultTypeEntity AutocompleteRequestResultType = "ENTITY" + AutocompleteRequestResultTypeGolink AutocompleteRequestResultType = "GOLINK" + AutocompleteRequestResultTypeHistory AutocompleteRequestResultType = "HISTORY" + AutocompleteRequestResultTypeNewChat AutocompleteRequestResultType = "NEW_CHAT" + AutocompleteRequestResultTypeOperator AutocompleteRequestResultType = "OPERATOR" + AutocompleteRequestResultTypeOperatorValue AutocompleteRequestResultType = "OPERATOR_VALUE" + AutocompleteRequestResultTypeQuicklink AutocompleteRequestResultType = "QUICKLINK" + AutocompleteRequestResultTypeSuggestion AutocompleteRequestResultType = "SUGGESTION" +) + +func (e AutocompleteRequestResultType) ToPointer() *AutocompleteRequestResultType { + return &e +} +func (e *AutocompleteRequestResultType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADDITIONAL_DOCUMENT": + fallthrough + case "APP": + fallthrough + case "BROWSER_HISTORY": + fallthrough + case "DATASOURCE": + fallthrough + case "DOCUMENT": + fallthrough + case "ENTITY": + fallthrough + case "GOLINK": + fallthrough + case "HISTORY": + fallthrough + case "NEW_CHAT": + fallthrough + case "OPERATOR": + fallthrough + case "OPERATOR_VALUE": + fallthrough + case "QUICKLINK": + fallthrough + case "SUGGESTION": + *e = AutocompleteRequestResultType(v) + return nil + default: + return fmt.Errorf("invalid value for AutocompleteRequestResultType: %v", v) + } +} + +type AutocompleteRequest struct { + TrackingToken *string `json:"trackingToken,omitempty"` + SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` + // Partially typed query. + Query *string `json:"query,omitempty"` + // Filter results to only those relevant to one or more datasources (e.g. jira, gdrive). Results are unfiltered if missing. + DatasourcesFilter []string `json:"datasourcesFilter,omitempty"` + // Filter to only return results relevant to the given datasource. + Datasource *string `json:"datasource,omitempty"` + // Filter to only return results of the given type(s). All types may be returned if omitted. + ResultTypes []AutocompleteRequestResultType `json:"resultTypes,omitempty"` + // Maximum number of results to be returned. If no value is provided, the backend will cap at 200. + // + ResultSize *int64 `json:"resultSize,omitempty"` + // Auth tokens which may be used for federated results. + AuthTokens []AuthToken `json:"authTokens,omitempty"` +} + +func (o *AutocompleteRequest) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *AutocompleteRequest) GetSessionInfo() *SessionInfo { + if o == nil { + return nil + } + return o.SessionInfo +} + +func (o *AutocompleteRequest) GetQuery() *string { + if o == nil { + return nil + } + return o.Query +} + +func (o *AutocompleteRequest) GetDatasourcesFilter() []string { + if o == nil { + return nil + } + return o.DatasourcesFilter +} + +func (o *AutocompleteRequest) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *AutocompleteRequest) GetResultTypes() []AutocompleteRequestResultType { + if o == nil { + return nil + } + return o.ResultTypes +} + +func (o *AutocompleteRequest) GetResultSize() *int64 { + if o == nil { + return nil + } + return o.ResultSize +} + +func (o *AutocompleteRequest) GetAuthTokens() []AuthToken { + if o == nil { + return nil + } + return o.AuthTokens +} diff --git a/tests/mockserver/internal/sdk/models/components/autocompleteresponse.go b/tests/mockserver/internal/sdk/models/components/autocompleteresponse.go new file mode 100644 index 00000000..7e2ca2ff --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/autocompleteresponse.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type AutocompleteResponse struct { + // List of experiment ids for the corresponding request. + ExperimentIds []int64 `json:"experimentIds,omitempty"` + // An opaque token that represents this particular set of autocomplete results. To be used for /feedback reporting. + TrackingToken *string `json:"trackingToken,omitempty"` + SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` + Results []AutocompleteResult `json:"results,omitempty"` + // Subsections of the results list from which distinct sections should be created. + Groups []AutocompleteResultGroup `json:"groups,omitempty"` + GleanDataError *GleanDataError `json:"errorInfo,omitempty"` + // Time in milliseconds the backend took to respond to the request. + BackendTimeMillis *int64 `json:"backendTimeMillis,omitempty"` +} + +func (o *AutocompleteResponse) GetExperimentIds() []int64 { + if o == nil { + return nil + } + return o.ExperimentIds +} + +func (o *AutocompleteResponse) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *AutocompleteResponse) GetSessionInfo() *SessionInfo { + if o == nil { + return nil + } + return o.SessionInfo +} + +func (o *AutocompleteResponse) GetResults() []AutocompleteResult { + if o == nil { + return nil + } + return o.Results +} + +func (o *AutocompleteResponse) GetGroups() []AutocompleteResultGroup { + if o == nil { + return nil + } + return o.Groups +} + +func (o *AutocompleteResponse) GetGleanDataError() *GleanDataError { + if o == nil { + return nil + } + return o.GleanDataError +} + +func (o *AutocompleteResponse) GetBackendTimeMillis() *int64 { + if o == nil { + return nil + } + return o.BackendTimeMillis +} diff --git a/tests/mockserver/internal/sdk/models/components/autocompleteresult.go b/tests/mockserver/internal/sdk/models/components/autocompleteresult.go new file mode 100644 index 00000000..9dec806a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/autocompleteresult.go @@ -0,0 +1,164 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type AutocompleteResultResultType string + +const ( + AutocompleteResultResultTypeAdditionalDocument AutocompleteResultResultType = "ADDITIONAL_DOCUMENT" + AutocompleteResultResultTypeApp AutocompleteResultResultType = "APP" + AutocompleteResultResultTypeBrowserHistory AutocompleteResultResultType = "BROWSER_HISTORY" + AutocompleteResultResultTypeDatasource AutocompleteResultResultType = "DATASOURCE" + AutocompleteResultResultTypeDocument AutocompleteResultResultType = "DOCUMENT" + AutocompleteResultResultTypeEntity AutocompleteResultResultType = "ENTITY" + AutocompleteResultResultTypeGolink AutocompleteResultResultType = "GOLINK" + AutocompleteResultResultTypeHistory AutocompleteResultResultType = "HISTORY" + AutocompleteResultResultTypeNewChat AutocompleteResultResultType = "NEW_CHAT" + AutocompleteResultResultTypeOperator AutocompleteResultResultType = "OPERATOR" + AutocompleteResultResultTypeOperatorValue AutocompleteResultResultType = "OPERATOR_VALUE" + AutocompleteResultResultTypeQuicklink AutocompleteResultResultType = "QUICKLINK" + AutocompleteResultResultTypeSuggestion AutocompleteResultResultType = "SUGGESTION" +) + +func (e AutocompleteResultResultType) ToPointer() *AutocompleteResultResultType { + return &e +} +func (e *AutocompleteResultResultType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADDITIONAL_DOCUMENT": + fallthrough + case "APP": + fallthrough + case "BROWSER_HISTORY": + fallthrough + case "DATASOURCE": + fallthrough + case "DOCUMENT": + fallthrough + case "ENTITY": + fallthrough + case "GOLINK": + fallthrough + case "HISTORY": + fallthrough + case "NEW_CHAT": + fallthrough + case "OPERATOR": + fallthrough + case "OPERATOR_VALUE": + fallthrough + case "QUICKLINK": + fallthrough + case "SUGGESTION": + *e = AutocompleteResultResultType(v) + return nil + default: + return fmt.Errorf("invalid value for AutocompleteResultResultType: %v", v) + } +} + +type AutocompleteResult struct { + Result string `json:"result"` + // A list of all possible keywords for given result. + Keywords []string `json:"keywords,omitempty"` + ResultType *AutocompleteResultResultType `json:"resultType,omitempty"` + // Higher indicates a more confident match. + Score *float64 `json:"score,omitempty"` + OperatorMetadata *OperatorMetadata `json:"operatorMetadata,omitempty"` + // An action for a specific datasource that will show up in autocomplete and app card, e.g. "Create new issue" for jira. + Quicklink *Quicklink `json:"quicklink,omitempty"` + Document *Document `json:"document,omitempty"` + URL *string `json:"url,omitempty"` + // A single object that can support any object in the work graph. Only a single object will be populated. + StructuredResult *StructuredResult `json:"structuredResult,omitempty"` + // A token to be passed in /feedback events associated with this autocomplete result. + TrackingToken *string `json:"trackingToken,omitempty"` + // Subsections of the result string to which some special formatting should be applied (eg. bold) + Ranges []TextRange `json:"ranges,omitempty"` +} + +func (o *AutocompleteResult) GetResult() string { + if o == nil { + return "" + } + return o.Result +} + +func (o *AutocompleteResult) GetKeywords() []string { + if o == nil { + return nil + } + return o.Keywords +} + +func (o *AutocompleteResult) GetResultType() *AutocompleteResultResultType { + if o == nil { + return nil + } + return o.ResultType +} + +func (o *AutocompleteResult) GetScore() *float64 { + if o == nil { + return nil + } + return o.Score +} + +func (o *AutocompleteResult) GetOperatorMetadata() *OperatorMetadata { + if o == nil { + return nil + } + return o.OperatorMetadata +} + +func (o *AutocompleteResult) GetQuicklink() *Quicklink { + if o == nil { + return nil + } + return o.Quicklink +} + +func (o *AutocompleteResult) GetDocument() *Document { + if o == nil { + return nil + } + return o.Document +} + +func (o *AutocompleteResult) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *AutocompleteResult) GetStructuredResult() *StructuredResult { + if o == nil { + return nil + } + return o.StructuredResult +} + +func (o *AutocompleteResult) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *AutocompleteResult) GetRanges() []TextRange { + if o == nil { + return nil + } + return o.Ranges +} diff --git a/tests/mockserver/internal/sdk/models/components/autocompleteresultgroup.go b/tests/mockserver/internal/sdk/models/components/autocompleteresultgroup.go new file mode 100644 index 00000000..fbf4682f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/autocompleteresultgroup.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// AutocompleteResultGroup - A subsection of the results list from which distinct sections should be created. +type AutocompleteResultGroup struct { + // The inclusive start index of the range. + StartIndex *int64 `json:"startIndex,omitempty"` + // The exclusive end index of the range. + EndIndex *int64 `json:"endIndex,omitempty"` + // The title of the result group to be displayed. Empty means no title. + Title *string `json:"title,omitempty"` +} + +func (o *AutocompleteResultGroup) GetStartIndex() *int64 { + if o == nil { + return nil + } + return o.StartIndex +} + +func (o *AutocompleteResultGroup) GetEndIndex() *int64 { + if o == nil { + return nil + } + return o.EndIndex +} + +func (o *AutocompleteResultGroup) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} diff --git a/tests/mockserver/internal/sdk/models/components/badge.go b/tests/mockserver/internal/sdk/models/components/badge.go new file mode 100644 index 00000000..08fc19de --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/badge.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// Badge - Displays a user's accomplishment or milestone +type Badge struct { + // An auto generated unique identifier. + Key *string `json:"key,omitempty"` + // The badge name displayed to users + DisplayName *string `json:"displayName,omitempty"` + // Defines how to render an icon + IconConfig *IconConfig `json:"iconConfig,omitempty"` + // The badge should be shown on the PersonAttribution + Pinned *bool `json:"pinned,omitempty"` +} + +func (o *Badge) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *Badge) GetDisplayName() *string { + if o == nil { + return nil + } + return o.DisplayName +} + +func (o *Badge) GetIconConfig() *IconConfig { + if o == nil { + return nil + } + return o.IconConfig +} + +func (o *Badge) GetPinned() *bool { + if o == nil { + return nil + } + return o.Pinned +} diff --git a/tests/mockserver/internal/sdk/models/components/bulkindexdocumentsrequest.go b/tests/mockserver/internal/sdk/models/components/bulkindexdocumentsrequest.go new file mode 100644 index 00000000..66aa01e5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/bulkindexdocumentsrequest.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// BulkIndexDocumentsRequest - Describes the request body of the /bulkindexdocuments API call +type BulkIndexDocumentsRequest struct { + // Unique id that must be used for this bulk upload instance + UploadID string `json:"uploadId"` + // true if this is the first page of the upload. Defaults to false + IsFirstPage *bool `json:"isFirstPage,omitempty"` + // true if this is the last page of the upload. Defaults to false + IsLastPage *bool `json:"isLastPage,omitempty"` + // Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + ForceRestartUpload *bool `json:"forceRestartUpload,omitempty"` + // Datasource of the documents + Datasource string `json:"datasource"` + // Batch of documents for the datasource + Documents []DocumentDefinition `json:"documents"` + // 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` + DisableStaleDocumentDeletionCheck *bool `json:"disableStaleDocumentDeletionCheck,omitempty"` +} + +func (o *BulkIndexDocumentsRequest) GetUploadID() string { + if o == nil { + return "" + } + return o.UploadID +} + +func (o *BulkIndexDocumentsRequest) GetIsFirstPage() *bool { + if o == nil { + return nil + } + return o.IsFirstPage +} + +func (o *BulkIndexDocumentsRequest) GetIsLastPage() *bool { + if o == nil { + return nil + } + return o.IsLastPage +} + +func (o *BulkIndexDocumentsRequest) GetForceRestartUpload() *bool { + if o == nil { + return nil + } + return o.ForceRestartUpload +} + +func (o *BulkIndexDocumentsRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *BulkIndexDocumentsRequest) GetDocuments() []DocumentDefinition { + if o == nil { + return []DocumentDefinition{} + } + return o.Documents +} + +func (o *BulkIndexDocumentsRequest) GetDisableStaleDocumentDeletionCheck() *bool { + if o == nil { + return nil + } + return o.DisableStaleDocumentDeletionCheck +} diff --git a/tests/mockserver/internal/sdk/models/components/bulkindexemployeesrequest.go b/tests/mockserver/internal/sdk/models/components/bulkindexemployeesrequest.go new file mode 100644 index 00000000..84b2d85a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/bulkindexemployeesrequest.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// BulkIndexEmployeesRequest - Describes the request body of the /bulkindexemployees API call +type BulkIndexEmployeesRequest struct { + // Unique id that must be used for this bulk upload instance + UploadID string `json:"uploadId"` + // true if this is the first page of the upload. Defaults to false + IsFirstPage *bool `json:"isFirstPage,omitempty"` + // true if this is the last page of the upload. Defaults to false + IsLastPage *bool `json:"isLastPage,omitempty"` + // Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + ForceRestartUpload *bool `json:"forceRestartUpload,omitempty"` + // Batch of employee information + Employees []EmployeeInfoDefinition `json:"employees"` + // 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` + DisableStaleDataDeletionCheck *bool `json:"disableStaleDataDeletionCheck,omitempty"` +} + +func (o *BulkIndexEmployeesRequest) GetUploadID() string { + if o == nil { + return "" + } + return o.UploadID +} + +func (o *BulkIndexEmployeesRequest) GetIsFirstPage() *bool { + if o == nil { + return nil + } + return o.IsFirstPage +} + +func (o *BulkIndexEmployeesRequest) GetIsLastPage() *bool { + if o == nil { + return nil + } + return o.IsLastPage +} + +func (o *BulkIndexEmployeesRequest) GetForceRestartUpload() *bool { + if o == nil { + return nil + } + return o.ForceRestartUpload +} + +func (o *BulkIndexEmployeesRequest) GetEmployees() []EmployeeInfoDefinition { + if o == nil { + return []EmployeeInfoDefinition{} + } + return o.Employees +} + +func (o *BulkIndexEmployeesRequest) GetDisableStaleDataDeletionCheck() *bool { + if o == nil { + return nil + } + return o.DisableStaleDataDeletionCheck +} diff --git a/tests/mockserver/internal/sdk/models/components/bulkindexgroupsrequest.go b/tests/mockserver/internal/sdk/models/components/bulkindexgroupsrequest.go new file mode 100644 index 00000000..b528cd39 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/bulkindexgroupsrequest.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// BulkIndexGroupsRequest - Describes the request body for the /bulkindexgroups API call +type BulkIndexGroupsRequest struct { + // Unique id that must be used for this instance of datasource groups upload + UploadID string `json:"uploadId"` + // true if this is the first page of the upload. Defaults to false + IsFirstPage *bool `json:"isFirstPage,omitempty"` + // true if this is the last page of the upload. Defaults to false + IsLastPage *bool `json:"isLastPage,omitempty"` + // Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + ForceRestartUpload *bool `json:"forceRestartUpload,omitempty"` + // datasource of the groups + Datasource string `json:"datasource"` + // batch of groups for the datasource + Groups []DatasourceGroupDefinition `json:"groups"` + // 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` + DisableStaleDataDeletionCheck *bool `json:"disableStaleDataDeletionCheck,omitempty"` +} + +func (o *BulkIndexGroupsRequest) GetUploadID() string { + if o == nil { + return "" + } + return o.UploadID +} + +func (o *BulkIndexGroupsRequest) GetIsFirstPage() *bool { + if o == nil { + return nil + } + return o.IsFirstPage +} + +func (o *BulkIndexGroupsRequest) GetIsLastPage() *bool { + if o == nil { + return nil + } + return o.IsLastPage +} + +func (o *BulkIndexGroupsRequest) GetForceRestartUpload() *bool { + if o == nil { + return nil + } + return o.ForceRestartUpload +} + +func (o *BulkIndexGroupsRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *BulkIndexGroupsRequest) GetGroups() []DatasourceGroupDefinition { + if o == nil { + return []DatasourceGroupDefinition{} + } + return o.Groups +} + +func (o *BulkIndexGroupsRequest) GetDisableStaleDataDeletionCheck() *bool { + if o == nil { + return nil + } + return o.DisableStaleDataDeletionCheck +} diff --git a/tests/mockserver/internal/sdk/models/components/bulkindexmembershipsrequest.go b/tests/mockserver/internal/sdk/models/components/bulkindexmembershipsrequest.go new file mode 100644 index 00000000..3132cb23 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/bulkindexmembershipsrequest.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// BulkIndexMembershipsRequest - Describes the request body for the /bulkindexmemberships API call +type BulkIndexMembershipsRequest struct { + // Unique id that must be used for this instance of datasource group memberships upload + UploadID string `json:"uploadId"` + // true if this is the first page of the upload. Defaults to false + IsFirstPage *bool `json:"isFirstPage,omitempty"` + // true if this is the last page of the upload. Defaults to false + IsLastPage *bool `json:"isLastPage,omitempty"` + // Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + ForceRestartUpload *bool `json:"forceRestartUpload,omitempty"` + // datasource of the memberships + Datasource string `json:"datasource"` + // group who's memberships are specified + Group *string `json:"group,omitempty"` + // batch of memberships for the group + Memberships []DatasourceBulkMembershipDefinition `json:"memberships"` +} + +func (o *BulkIndexMembershipsRequest) GetUploadID() string { + if o == nil { + return "" + } + return o.UploadID +} + +func (o *BulkIndexMembershipsRequest) GetIsFirstPage() *bool { + if o == nil { + return nil + } + return o.IsFirstPage +} + +func (o *BulkIndexMembershipsRequest) GetIsLastPage() *bool { + if o == nil { + return nil + } + return o.IsLastPage +} + +func (o *BulkIndexMembershipsRequest) GetForceRestartUpload() *bool { + if o == nil { + return nil + } + return o.ForceRestartUpload +} + +func (o *BulkIndexMembershipsRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *BulkIndexMembershipsRequest) GetGroup() *string { + if o == nil { + return nil + } + return o.Group +} + +func (o *BulkIndexMembershipsRequest) GetMemberships() []DatasourceBulkMembershipDefinition { + if o == nil { + return []DatasourceBulkMembershipDefinition{} + } + return o.Memberships +} diff --git a/tests/mockserver/internal/sdk/models/components/bulkindexshortcutsrequest.go b/tests/mockserver/internal/sdk/models/components/bulkindexshortcutsrequest.go new file mode 100644 index 00000000..6a4ab205 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/bulkindexshortcutsrequest.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// BulkIndexShortcutsRequest - Describes the request body of the /bulkindexshortcuts API call +type BulkIndexShortcutsRequest struct { + // Unique id that must be used for this bulk upload instance + UploadID string `json:"uploadId"` + // true if this is the first page of the upload. Defaults to false + IsFirstPage *bool `json:"isFirstPage,omitempty"` + // true if this is the last page of the upload. Defaults to false + IsLastPage *bool `json:"isLastPage,omitempty"` + // Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + ForceRestartUpload *bool `json:"forceRestartUpload,omitempty"` + // Batch of shortcuts information + Shortcuts []ExternalShortcut `json:"shortcuts"` +} + +func (o *BulkIndexShortcutsRequest) GetUploadID() string { + if o == nil { + return "" + } + return o.UploadID +} + +func (o *BulkIndexShortcutsRequest) GetIsFirstPage() *bool { + if o == nil { + return nil + } + return o.IsFirstPage +} + +func (o *BulkIndexShortcutsRequest) GetIsLastPage() *bool { + if o == nil { + return nil + } + return o.IsLastPage +} + +func (o *BulkIndexShortcutsRequest) GetForceRestartUpload() *bool { + if o == nil { + return nil + } + return o.ForceRestartUpload +} + +func (o *BulkIndexShortcutsRequest) GetShortcuts() []ExternalShortcut { + if o == nil { + return []ExternalShortcut{} + } + return o.Shortcuts +} diff --git a/tests/mockserver/internal/sdk/models/components/bulkindexteamsrequest.go b/tests/mockserver/internal/sdk/models/components/bulkindexteamsrequest.go new file mode 100644 index 00000000..0acb6475 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/bulkindexteamsrequest.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// BulkIndexTeamsRequest - Describes the request body of the /bulkindexteams API call +type BulkIndexTeamsRequest struct { + // Unique id that must be used for this bulk upload instance + UploadID string `json:"uploadId"` + // true if this is the first page of the upload. Defaults to false + IsFirstPage *bool `json:"isFirstPage,omitempty"` + // true if this is the last page of the upload. Defaults to false + IsLastPage *bool `json:"isLastPage,omitempty"` + // Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + ForceRestartUpload *bool `json:"forceRestartUpload,omitempty"` + // Batch of team information + Teams []TeamInfoDefinition `json:"teams"` +} + +func (o *BulkIndexTeamsRequest) GetUploadID() string { + if o == nil { + return "" + } + return o.UploadID +} + +func (o *BulkIndexTeamsRequest) GetIsFirstPage() *bool { + if o == nil { + return nil + } + return o.IsFirstPage +} + +func (o *BulkIndexTeamsRequest) GetIsLastPage() *bool { + if o == nil { + return nil + } + return o.IsLastPage +} + +func (o *BulkIndexTeamsRequest) GetForceRestartUpload() *bool { + if o == nil { + return nil + } + return o.ForceRestartUpload +} + +func (o *BulkIndexTeamsRequest) GetTeams() []TeamInfoDefinition { + if o == nil { + return []TeamInfoDefinition{} + } + return o.Teams +} diff --git a/tests/mockserver/internal/sdk/models/components/bulkindexusersrequest.go b/tests/mockserver/internal/sdk/models/components/bulkindexusersrequest.go new file mode 100644 index 00000000..c94ddd90 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/bulkindexusersrequest.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// BulkIndexUsersRequest - Describes the request body for the /bulkindexusers API call +type BulkIndexUsersRequest struct { + // Unique id that must be used for this instance of datasource users upload + UploadID string `json:"uploadId"` + // true if this is the first page of the upload. Defaults to false + IsFirstPage *bool `json:"isFirstPage,omitempty"` + // true if this is the last page of the upload. Defaults to false + IsLastPage *bool `json:"isLastPage,omitempty"` + // Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + ForceRestartUpload *bool `json:"forceRestartUpload,omitempty"` + // datasource of the users + Datasource string `json:"datasource"` + // batch of users for the datasource + Users []DatasourceUserDefinition `json:"users"` + // 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` + DisableStaleDataDeletionCheck *bool `json:"disableStaleDataDeletionCheck,omitempty"` +} + +func (o *BulkIndexUsersRequest) GetUploadID() string { + if o == nil { + return "" + } + return o.UploadID +} + +func (o *BulkIndexUsersRequest) GetIsFirstPage() *bool { + if o == nil { + return nil + } + return o.IsFirstPage +} + +func (o *BulkIndexUsersRequest) GetIsLastPage() *bool { + if o == nil { + return nil + } + return o.IsLastPage +} + +func (o *BulkIndexUsersRequest) GetForceRestartUpload() *bool { + if o == nil { + return nil + } + return o.ForceRestartUpload +} + +func (o *BulkIndexUsersRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *BulkIndexUsersRequest) GetUsers() []DatasourceUserDefinition { + if o == nil { + return []DatasourceUserDefinition{} + } + return o.Users +} + +func (o *BulkIndexUsersRequest) GetDisableStaleDataDeletionCheck() *bool { + if o == nil { + return nil + } + return o.DisableStaleDataDeletionCheck +} diff --git a/tests/mockserver/internal/sdk/models/components/bulkuploadhistoryevent.go b/tests/mockserver/internal/sdk/models/components/bulkuploadhistoryevent.go new file mode 100644 index 00000000..9f7711f3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/bulkuploadhistoryevent.go @@ -0,0 +1,123 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// BulkUploadHistoryEventStatus - The status of the upload, an enum of ACTIVE, SUCCESSFUL +type BulkUploadHistoryEventStatus string + +const ( + BulkUploadHistoryEventStatusActive BulkUploadHistoryEventStatus = "ACTIVE" + BulkUploadHistoryEventStatusSuccessful BulkUploadHistoryEventStatus = "SUCCESSFUL" +) + +func (e BulkUploadHistoryEventStatus) ToPointer() *BulkUploadHistoryEventStatus { + return &e +} +func (e *BulkUploadHistoryEventStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ACTIVE": + fallthrough + case "SUCCESSFUL": + *e = BulkUploadHistoryEventStatus(v) + return nil + default: + return fmt.Errorf("invalid value for BulkUploadHistoryEventStatus: %v", v) + } +} + +// ProcessingState - The current state of the upload, an enum of UNAVAILABLE, UPLOAD STARTED, UPLOAD IN PROGRESS, UPLOAD COMPLETED, DELETION PAUSED, INDEXING COMPLETED +type ProcessingState string + +const ( + ProcessingStateUnavailable ProcessingState = "UNAVAILABLE" + ProcessingStateUploadStarted ProcessingState = "UPLOAD STARTED" + ProcessingStateUploadInProgress ProcessingState = "UPLOAD IN PROGRESS" + ProcessingStateUploadCompleted ProcessingState = "UPLOAD COMPLETED" + ProcessingStateDeletionPaused ProcessingState = "DELETION PAUSED" + ProcessingStateIndexingCompleted ProcessingState = "INDEXING COMPLETED" +) + +func (e ProcessingState) ToPointer() *ProcessingState { + return &e +} +func (e *ProcessingState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "UNAVAILABLE": + fallthrough + case "UPLOAD STARTED": + fallthrough + case "UPLOAD IN PROGRESS": + fallthrough + case "UPLOAD COMPLETED": + fallthrough + case "DELETION PAUSED": + fallthrough + case "INDEXING COMPLETED": + *e = ProcessingState(v) + return nil + default: + return fmt.Errorf("invalid value for ProcessingState: %v", v) + } +} + +// BulkUploadHistoryEvent - Information about a successful bulk upload +type BulkUploadHistoryEvent struct { + // The unique ID of the upload + UploadID *string `json:"uploadId,omitempty"` + // The start time of the upload in ISO 8601 format + StartTime *string `json:"startTime,omitempty"` + // The end time of the upload in ISO 8601 format, 'NA' if the upload is still active + EndTime *string `json:"endTime,omitempty"` + // The status of the upload, an enum of ACTIVE, SUCCESSFUL + Status *BulkUploadHistoryEventStatus `json:"status,omitempty"` + // The current state of the upload, an enum of UNAVAILABLE, UPLOAD STARTED, UPLOAD IN PROGRESS, UPLOAD COMPLETED, DELETION PAUSED, INDEXING COMPLETED + ProcessingState *ProcessingState `json:"processingState,omitempty"` +} + +func (o *BulkUploadHistoryEvent) GetUploadID() *string { + if o == nil { + return nil + } + return o.UploadID +} + +func (o *BulkUploadHistoryEvent) GetStartTime() *string { + if o == nil { + return nil + } + return o.StartTime +} + +func (o *BulkUploadHistoryEvent) GetEndTime() *string { + if o == nil { + return nil + } + return o.EndTime +} + +func (o *BulkUploadHistoryEvent) GetStatus() *BulkUploadHistoryEventStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *BulkUploadHistoryEvent) GetProcessingState() *ProcessingState { + if o == nil { + return nil + } + return o.ProcessingState +} diff --git a/tests/mockserver/internal/sdk/models/components/calendarattendee.go b/tests/mockserver/internal/sdk/models/components/calendarattendee.go new file mode 100644 index 00000000..01825957 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/calendarattendee.go @@ -0,0 +1,86 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type ResponseStatus string + +const ( + ResponseStatusAccepted ResponseStatus = "ACCEPTED" + ResponseStatusDeclined ResponseStatus = "DECLINED" + ResponseStatusNoResponse ResponseStatus = "NO_RESPONSE" + ResponseStatusTentative ResponseStatus = "TENTATIVE" +) + +func (e ResponseStatus) ToPointer() *ResponseStatus { + return &e +} +func (e *ResponseStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ACCEPTED": + fallthrough + case "DECLINED": + fallthrough + case "NO_RESPONSE": + fallthrough + case "TENTATIVE": + *e = ResponseStatus(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseStatus: %v", v) + } +} + +type CalendarAttendee struct { + // Whether or not this attendee is an organizer. + IsOrganizer *bool `json:"isOrganizer,omitempty"` + // Whether or not this attendee is in a group. Needed temporarily at least to support both flat attendees and tree for compatibility. + IsInGroup *bool `json:"isInGroup,omitempty"` + Person Person `json:"person"` + // If this attendee is a group, represents the list of individual attendees in the group. + GroupAttendees []CalendarAttendee `json:"groupAttendees,omitempty"` + ResponseStatus *ResponseStatus `json:"responseStatus,omitempty"` +} + +func (o *CalendarAttendee) GetIsOrganizer() *bool { + if o == nil { + return nil + } + return o.IsOrganizer +} + +func (o *CalendarAttendee) GetIsInGroup() *bool { + if o == nil { + return nil + } + return o.IsInGroup +} + +func (o *CalendarAttendee) GetPerson() Person { + if o == nil { + return Person{} + } + return o.Person +} + +func (o *CalendarAttendee) GetGroupAttendees() []CalendarAttendee { + if o == nil { + return nil + } + return o.GroupAttendees +} + +func (o *CalendarAttendee) GetResponseStatus() *ResponseStatus { + if o == nil { + return nil + } + return o.ResponseStatus +} diff --git a/tests/mockserver/internal/sdk/models/components/calendarattendees.go b/tests/mockserver/internal/sdk/models/components/calendarattendees.go new file mode 100644 index 00000000..a0cfc7ad --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/calendarattendees.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CalendarAttendees struct { + // Full details of some of the attendees of this event + People []CalendarAttendee `json:"people,omitempty"` + // Whether the total count of the people returned is at the retrieval limit. + IsLimit *bool `json:"isLimit,omitempty"` + // Total number of attendees in this event. + Total *int64 `json:"total,omitempty"` + // Total number of attendees who have accepted this event. + NumAccepted *int64 `json:"numAccepted,omitempty"` + // Total number of attendees who have declined this event. + NumDeclined *int64 `json:"numDeclined,omitempty"` + // Total number of attendees who have not responded to this event. + NumNoResponse *int64 `json:"numNoResponse,omitempty"` + // Total number of attendees who have responded tentatively (i.e. responded maybe) to this event. + NumTentative *int64 `json:"numTentative,omitempty"` +} + +func (o *CalendarAttendees) GetPeople() []CalendarAttendee { + if o == nil { + return nil + } + return o.People +} + +func (o *CalendarAttendees) GetIsLimit() *bool { + if o == nil { + return nil + } + return o.IsLimit +} + +func (o *CalendarAttendees) GetTotal() *int64 { + if o == nil { + return nil + } + return o.Total +} + +func (o *CalendarAttendees) GetNumAccepted() *int64 { + if o == nil { + return nil + } + return o.NumAccepted +} + +func (o *CalendarAttendees) GetNumDeclined() *int64 { + if o == nil { + return nil + } + return o.NumDeclined +} + +func (o *CalendarAttendees) GetNumNoResponse() *int64 { + if o == nil { + return nil + } + return o.NumNoResponse +} + +func (o *CalendarAttendees) GetNumTentative() *int64 { + if o == nil { + return nil + } + return o.NumTentative +} diff --git a/tests/mockserver/internal/sdk/models/components/calendarevent.go b/tests/mockserver/internal/sdk/models/components/calendarevent.go new file mode 100644 index 00000000..33ac7433 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/calendarevent.go @@ -0,0 +1,151 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// CalendarEventEventType - The nature of the event, for example "out of office". +type CalendarEventEventType string + +const ( + CalendarEventEventTypeDefault CalendarEventEventType = "DEFAULT" + CalendarEventEventTypeOutOfOffice CalendarEventEventType = "OUT_OF_OFFICE" +) + +func (e CalendarEventEventType) ToPointer() *CalendarEventEventType { + return &e +} +func (e *CalendarEventEventType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DEFAULT": + fallthrough + case "OUT_OF_OFFICE": + *e = CalendarEventEventType(v) + return nil + default: + return fmt.Errorf("invalid value for CalendarEventEventType: %v", v) + } +} + +// CalendarEvent - A generic, light-weight calendar event. +type CalendarEvent struct { + Time *TimeInterval `json:"time,omitempty"` + // The nature of the event, for example "out of office". + EventType *CalendarEventEventType `json:"eventType,omitempty"` + // The calendar event id + ID string `json:"id"` + // A permalink for this calendar event + URL string `json:"url"` + Attendees *CalendarAttendees `json:"attendees,omitempty"` + // The location that this event is taking place at. + Location *string `json:"location,omitempty"` + ConferenceData *ConferenceData `json:"conferenceData,omitempty"` + // The HTML description of the event. + Description *string `json:"description,omitempty"` + // The app or other repository type from which the event was extracted + Datasource *string `json:"datasource,omitempty"` + // The event has a transcript associated with it enabling features like summarization + HasTranscript *bool `json:"hasTranscript,omitempty"` + // A link to the transcript of the event + TranscriptURL *string `json:"transcriptUrl,omitempty"` + Classifications []EventClassification `json:"classifications,omitempty"` + GeneratedAttachments []GeneratedAttachment `json:"generatedAttachments,omitempty"` +} + +func (o *CalendarEvent) GetTime() *TimeInterval { + if o == nil { + return nil + } + return o.Time +} + +func (o *CalendarEvent) GetEventType() *CalendarEventEventType { + if o == nil { + return nil + } + return o.EventType +} + +func (o *CalendarEvent) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CalendarEvent) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *CalendarEvent) GetAttendees() *CalendarAttendees { + if o == nil { + return nil + } + return o.Attendees +} + +func (o *CalendarEvent) GetLocation() *string { + if o == nil { + return nil + } + return o.Location +} + +func (o *CalendarEvent) GetConferenceData() *ConferenceData { + if o == nil { + return nil + } + return o.ConferenceData +} + +func (o *CalendarEvent) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *CalendarEvent) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *CalendarEvent) GetHasTranscript() *bool { + if o == nil { + return nil + } + return o.HasTranscript +} + +func (o *CalendarEvent) GetTranscriptURL() *string { + if o == nil { + return nil + } + return o.TranscriptURL +} + +func (o *CalendarEvent) GetClassifications() []EventClassification { + if o == nil { + return nil + } + return o.Classifications +} + +func (o *CalendarEvent) GetGeneratedAttachments() []GeneratedAttachment { + if o == nil { + return nil + } + return o.GeneratedAttachments +} diff --git a/tests/mockserver/internal/sdk/models/components/canonicalizingregextype.go b/tests/mockserver/internal/sdk/models/components/canonicalizingregextype.go new file mode 100644 index 00000000..76692d38 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/canonicalizingregextype.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// CanonicalizingRegexType - Regular expression to apply to an arbitrary string to transform it into a canonical string. +type CanonicalizingRegexType struct { + // Regular expression to match to an arbitrary string. + MatchRegex *string `json:"matchRegex,omitempty"` + // Regular expression to transform into a canonical string. + RewriteRegex *string `json:"rewriteRegex,omitempty"` +} + +func (o *CanonicalizingRegexType) GetMatchRegex() *string { + if o == nil { + return nil + } + return o.MatchRegex +} + +func (o *CanonicalizingRegexType) GetRewriteRegex() *string { + if o == nil { + return nil + } + return o.RewriteRegex +} diff --git a/tests/mockserver/internal/sdk/models/components/channelinviteinfo.go b/tests/mockserver/internal/sdk/models/components/channelinviteinfo.go new file mode 100644 index 00000000..099ff0bb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/channelinviteinfo.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +// ChannelInviteInfo - Information regarding the invite status of a person for a particular channel. +type ChannelInviteInfo struct { + Channel *CommunicationChannel `json:"channel,omitempty"` + // Bit that tracks if this invite was automatically sent or user-sent + IsAutoInvite *bool `json:"isAutoInvite,omitempty"` + Inviter *Person `json:"inviter,omitempty"` + // The time this person was invited in ISO format (ISO 8601). + InviteTime *time.Time `json:"inviteTime,omitempty"` + // The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. + ReminderTime *time.Time `json:"reminderTime,omitempty"` +} + +func (c ChannelInviteInfo) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *ChannelInviteInfo) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ChannelInviteInfo) GetChannel() *CommunicationChannel { + if o == nil { + return nil + } + return o.Channel +} + +func (o *ChannelInviteInfo) GetIsAutoInvite() *bool { + if o == nil { + return nil + } + return o.IsAutoInvite +} + +func (o *ChannelInviteInfo) GetInviter() *Person { + if o == nil { + return nil + } + return o.Inviter +} + +func (o *ChannelInviteInfo) GetInviteTime() *time.Time { + if o == nil { + return nil + } + return o.InviteTime +} + +func (o *ChannelInviteInfo) GetReminderTime() *time.Time { + if o == nil { + return nil + } + return o.ReminderTime +} diff --git a/tests/mockserver/internal/sdk/models/components/chat.go b/tests/mockserver/internal/sdk/models/components/chat.go new file mode 100644 index 00000000..316d4889 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chat.go @@ -0,0 +1,87 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// Chat - A historical representation of a series of chat messages a user had with Glean Assistant. +type Chat struct { + // The opaque id of the Chat. + ID *string `json:"id,omitempty"` + // Server Unix timestamp of the creation time (in seconds since epoch UTC). + CreateTime *int64 `json:"createTime,omitempty"` + CreatedBy *Person `json:"createdBy,omitempty"` + // Server Unix timestamp of the update time (in seconds since epoch UTC). + UpdateTime *int64 `json:"updateTime,omitempty"` + // The name of the Chat. + Name *string `json:"name,omitempty"` + // The ID of the AI App that this Chat is associated to. + ApplicationID *string `json:"applicationId,omitempty"` + // The display name of the AI App that this Chat is associated to. + ApplicationName *string `json:"applicationName,omitempty"` + // Defines how to render an icon + Icon *IconConfig `json:"icon,omitempty"` + // The chat messages within a Chat. + Messages []ChatMessage `json:"messages,omitempty"` +} + +func (o *Chat) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Chat) GetCreateTime() *int64 { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *Chat) GetCreatedBy() *Person { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *Chat) GetUpdateTime() *int64 { + if o == nil { + return nil + } + return o.UpdateTime +} + +func (o *Chat) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *Chat) GetApplicationID() *string { + if o == nil { + return nil + } + return o.ApplicationID +} + +func (o *Chat) GetApplicationName() *string { + if o == nil { + return nil + } + return o.ApplicationName +} + +func (o *Chat) GetIcon() *IconConfig { + if o == nil { + return nil + } + return o.Icon +} + +func (o *Chat) GetMessages() []ChatMessage { + if o == nil { + return nil + } + return o.Messages +} diff --git a/tests/mockserver/internal/sdk/models/components/chatfile.go b/tests/mockserver/internal/sdk/models/components/chatfile.go new file mode 100644 index 00000000..7ea76ec3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatfile.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ChatFile - Structure for file uploaded by a user for Chat. +type ChatFile struct { + // Unique identifier of the file. + ID *string `json:"id,omitempty"` + // Url of the file. + URL *string `json:"url,omitempty"` + // Name of the uploaded file. + Name *string `json:"name,omitempty"` + // Metadata of a file uploaded by a user for Chat. + Metadata *ChatFileMetadata `json:"metadata,omitempty"` +} + +func (o *ChatFile) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *ChatFile) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *ChatFile) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *ChatFile) GetMetadata() *ChatFileMetadata { + if o == nil { + return nil + } + return o.Metadata +} diff --git a/tests/mockserver/internal/sdk/models/components/chatfilefailurereason.go b/tests/mockserver/internal/sdk/models/components/chatfilefailurereason.go new file mode 100644 index 00000000..a5a23627 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatfilefailurereason.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ChatFileFailureReason - Reason for failed status. +type ChatFileFailureReason string + +const ( + ChatFileFailureReasonParseFailed ChatFileFailureReason = "PARSE_FAILED" + ChatFileFailureReasonAvScanFailed ChatFileFailureReason = "AV_SCAN_FAILED" + ChatFileFailureReasonFileTooSmall ChatFileFailureReason = "FILE_TOO_SMALL" + ChatFileFailureReasonFileTooLarge ChatFileFailureReason = "FILE_TOO_LARGE" + ChatFileFailureReasonFileExtensionUnsupported ChatFileFailureReason = "FILE_EXTENSION_UNSUPPORTED" + ChatFileFailureReasonFileMetadataValidationFail ChatFileFailureReason = "FILE_METADATA_VALIDATION_FAIL" + ChatFileFailureReasonFileProcessingTimedOut ChatFileFailureReason = "FILE_PROCESSING_TIMED_OUT" +) + +func (e ChatFileFailureReason) ToPointer() *ChatFileFailureReason { + return &e +} +func (e *ChatFileFailureReason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PARSE_FAILED": + fallthrough + case "AV_SCAN_FAILED": + fallthrough + case "FILE_TOO_SMALL": + fallthrough + case "FILE_TOO_LARGE": + fallthrough + case "FILE_EXTENSION_UNSUPPORTED": + fallthrough + case "FILE_METADATA_VALIDATION_FAIL": + fallthrough + case "FILE_PROCESSING_TIMED_OUT": + *e = ChatFileFailureReason(v) + return nil + default: + return fmt.Errorf("invalid value for ChatFileFailureReason: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/chatfilemetadata.go b/tests/mockserver/internal/sdk/models/components/chatfilemetadata.go new file mode 100644 index 00000000..55c746ec --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatfilemetadata.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ChatFileMetadata - Metadata of a file uploaded by a user for Chat. +type ChatFileMetadata struct { + // Current status of the file. + Status *ChatFileStatus `json:"status,omitempty"` + // Upload time, in epoch seconds. + UploadTime *int64 `json:"uploadTime,omitempty"` + // Size of the processed file in bytes. + ProcessedSize *int64 `json:"processedSize,omitempty"` + // Reason for failed status. + FailureReason *ChatFileFailureReason `json:"failureReason,omitempty"` + // MIME type of the file. + MimeType *string `json:"mimeType,omitempty"` +} + +func (o *ChatFileMetadata) GetStatus() *ChatFileStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *ChatFileMetadata) GetUploadTime() *int64 { + if o == nil { + return nil + } + return o.UploadTime +} + +func (o *ChatFileMetadata) GetProcessedSize() *int64 { + if o == nil { + return nil + } + return o.ProcessedSize +} + +func (o *ChatFileMetadata) GetFailureReason() *ChatFileFailureReason { + if o == nil { + return nil + } + return o.FailureReason +} + +func (o *ChatFileMetadata) GetMimeType() *string { + if o == nil { + return nil + } + return o.MimeType +} diff --git a/tests/mockserver/internal/sdk/models/components/chatfilestatus.go b/tests/mockserver/internal/sdk/models/components/chatfilestatus.go new file mode 100644 index 00000000..7f192a89 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatfilestatus.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ChatFileStatus - Current status of the file. +type ChatFileStatus string + +const ( + ChatFileStatusProcessing ChatFileStatus = "PROCESSING" + ChatFileStatusProcessed ChatFileStatus = "PROCESSED" + ChatFileStatusFailed ChatFileStatus = "FAILED" + ChatFileStatusDeleted ChatFileStatus = "DELETED" +) + +func (e ChatFileStatus) ToPointer() *ChatFileStatus { + return &e +} +func (e *ChatFileStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PROCESSING": + fallthrough + case "PROCESSED": + fallthrough + case "FAILED": + fallthrough + case "DELETED": + *e = ChatFileStatus(v) + return nil + default: + return fmt.Errorf("invalid value for ChatFileStatus: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/chatmessage.go b/tests/mockserver/internal/sdk/models/components/chatmessage.go new file mode 100644 index 00000000..01c82979 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatmessage.go @@ -0,0 +1,186 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" +) + +type Author string + +const ( + AuthorUser Author = "USER" + AuthorGleanAi Author = "GLEAN_AI" +) + +func (e Author) ToPointer() *Author { + return &e +} +func (e *Author) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "USER": + fallthrough + case "GLEAN_AI": + *e = Author(v) + return nil + default: + return fmt.Errorf("invalid value for Author: %v", v) + } +} + +// MessageType - 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. +type MessageType string + +const ( + MessageTypeUpdate MessageType = "UPDATE" + MessageTypeContent MessageType = "CONTENT" + MessageTypeContext MessageType = "CONTEXT" + MessageTypeDebug MessageType = "DEBUG" + MessageTypeDebugExternal MessageType = "DEBUG_EXTERNAL" + MessageTypeError MessageType = "ERROR" + MessageTypeHeading MessageType = "HEADING" + MessageTypeWarning MessageType = "WARNING" +) + +func (e MessageType) ToPointer() *MessageType { + return &e +} +func (e *MessageType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "UPDATE": + fallthrough + case "CONTENT": + fallthrough + case "CONTEXT": + fallthrough + case "DEBUG": + fallthrough + case "DEBUG_EXTERNAL": + fallthrough + case "ERROR": + fallthrough + case "HEADING": + fallthrough + case "WARNING": + *e = MessageType(v) + return nil + default: + return fmt.Errorf("invalid value for MessageType: %v", v) + } +} + +// ChatMessage - A message that is rendered as one coherent unit with one given sender. +type ChatMessage struct { + // Describes the agent that executes the request. + AgentConfig *AgentConfig `json:"agentConfig,omitempty"` + Author *Author `default:"USER" json:"author"` + // A list of Citations that were used to generate the response. + Citations []ChatMessageCitation `json:"citations,omitempty"` + // IDs of files uploaded in the message that are referenced to generate the answer. + UploadedFileIds []string `json:"uploadedFileIds,omitempty"` + // 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. + Fragments []ChatMessageFragment `json:"fragments,omitempty"` + // Response timestamp of the message. + Ts *string `json:"ts,omitempty"` + // A unique server-side generated ID used to identify a message, automatically populated for any USER authored messages. + MessageID *string `json:"messageId,omitempty"` + // Opaque tracking token generated server-side. + MessageTrackingToken *string `json:"messageTrackingToken,omitempty"` + // 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. + MessageType *MessageType `default:"CONTENT" json:"messageType"` + // Signals there are additional response fragments incoming. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + HasMoreFragments *bool `json:"hasMoreFragments,omitempty"` +} + +func (c ChatMessage) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *ChatMessage) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ChatMessage) GetAgentConfig() *AgentConfig { + if o == nil { + return nil + } + return o.AgentConfig +} + +func (o *ChatMessage) GetAuthor() *Author { + if o == nil { + return nil + } + return o.Author +} + +func (o *ChatMessage) GetCitations() []ChatMessageCitation { + if o == nil { + return nil + } + return o.Citations +} + +func (o *ChatMessage) GetUploadedFileIds() []string { + if o == nil { + return nil + } + return o.UploadedFileIds +} + +func (o *ChatMessage) GetFragments() []ChatMessageFragment { + if o == nil { + return nil + } + return o.Fragments +} + +func (o *ChatMessage) GetTs() *string { + if o == nil { + return nil + } + return o.Ts +} + +func (o *ChatMessage) GetMessageID() *string { + if o == nil { + return nil + } + return o.MessageID +} + +func (o *ChatMessage) GetMessageTrackingToken() *string { + if o == nil { + return nil + } + return o.MessageTrackingToken +} + +func (o *ChatMessage) GetMessageType() *MessageType { + if o == nil { + return nil + } + return o.MessageType +} + +func (o *ChatMessage) GetHasMoreFragments() *bool { + if o == nil { + return nil + } + return o.HasMoreFragments +} diff --git a/tests/mockserver/internal/sdk/models/components/chatmessagecitation.go b/tests/mockserver/internal/sdk/models/components/chatmessagecitation.go new file mode 100644 index 00000000..fd3e6a32 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatmessagecitation.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ChatMessageCitation - Information about the source for a ChatMessage. +type ChatMessageCitation struct { + // An opaque token that represents this particular result in this particular ChatMessage. To be used for /feedback reporting. + TrackingToken *string `json:"trackingToken,omitempty"` + SourceDocument *Document `json:"sourceDocument,omitempty"` + // Structure for file uploaded by a user for Chat. + SourceFile *ChatFile `json:"sourceFile,omitempty"` + SourcePerson *Person `json:"sourcePerson,omitempty"` + // Each reference range and its corresponding snippets + ReferenceRanges []ReferenceRange `json:"referenceRanges,omitempty"` +} + +func (o *ChatMessageCitation) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *ChatMessageCitation) GetSourceDocument() *Document { + if o == nil { + return nil + } + return o.SourceDocument +} + +func (o *ChatMessageCitation) GetSourceFile() *ChatFile { + if o == nil { + return nil + } + return o.SourceFile +} + +func (o *ChatMessageCitation) GetSourcePerson() *Person { + if o == nil { + return nil + } + return o.SourcePerson +} + +func (o *ChatMessageCitation) GetReferenceRanges() []ReferenceRange { + if o == nil { + return nil + } + return o.ReferenceRanges +} diff --git a/tests/mockserver/internal/sdk/models/components/chatmessagefragment.go b/tests/mockserver/internal/sdk/models/components/chatmessagefragment.go new file mode 100644 index 00000000..e164fc2d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatmessagefragment.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ChatMessageFragment - 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. +type ChatMessageFragment struct { + // An array of entities in the work graph retrieved via a data request. + StructuredResults []StructuredResult `json:"structuredResults,omitempty"` + // An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. + TrackingToken *string `json:"trackingToken,omitempty"` + Text *string `json:"text,omitempty"` + QuerySuggestion *QuerySuggestion `json:"querySuggestion,omitempty"` + // Structure for file uploaded by a user for Chat. + File *ChatFile `json:"file,omitempty"` + Action *ToolInfo `json:"action,omitempty"` +} + +func (o *ChatMessageFragment) GetStructuredResults() []StructuredResult { + if o == nil { + return nil + } + return o.StructuredResults +} + +func (o *ChatMessageFragment) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *ChatMessageFragment) GetText() *string { + if o == nil { + return nil + } + return o.Text +} + +func (o *ChatMessageFragment) GetQuerySuggestion() *QuerySuggestion { + if o == nil { + return nil + } + return o.QuerySuggestion +} + +func (o *ChatMessageFragment) GetFile() *ChatFile { + if o == nil { + return nil + } + return o.File +} + +func (o *ChatMessageFragment) GetAction() *ToolInfo { + if o == nil { + return nil + } + return o.Action +} diff --git a/tests/mockserver/internal/sdk/models/components/chatmetadata.go b/tests/mockserver/internal/sdk/models/components/chatmetadata.go new file mode 100644 index 00000000..b2b298bf --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatmetadata.go @@ -0,0 +1,78 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ChatMetadata - Metadata of a Chat a user had with Glean Assistant. This contains no actual conversational content. +type ChatMetadata struct { + // The opaque id of the Chat. + ID *string `json:"id,omitempty"` + // Server Unix timestamp of the creation time (in seconds since epoch UTC). + CreateTime *int64 `json:"createTime,omitempty"` + CreatedBy *Person `json:"createdBy,omitempty"` + // Server Unix timestamp of the update time (in seconds since epoch UTC). + UpdateTime *int64 `json:"updateTime,omitempty"` + // The name of the Chat. + Name *string `json:"name,omitempty"` + // The ID of the AI App that this Chat is associated to. + ApplicationID *string `json:"applicationId,omitempty"` + // The display name of the AI App that this Chat is associated to. + ApplicationName *string `json:"applicationName,omitempty"` + // Defines how to render an icon + Icon *IconConfig `json:"icon,omitempty"` +} + +func (o *ChatMetadata) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *ChatMetadata) GetCreateTime() *int64 { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *ChatMetadata) GetCreatedBy() *Person { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *ChatMetadata) GetUpdateTime() *int64 { + if o == nil { + return nil + } + return o.UpdateTime +} + +func (o *ChatMetadata) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *ChatMetadata) GetApplicationID() *string { + if o == nil { + return nil + } + return o.ApplicationID +} + +func (o *ChatMetadata) GetApplicationName() *string { + if o == nil { + return nil + } + return o.ApplicationName +} + +func (o *ChatMetadata) GetIcon() *IconConfig { + if o == nil { + return nil + } + return o.Icon +} diff --git a/tests/mockserver/internal/sdk/models/components/chatmetadataresult.go b/tests/mockserver/internal/sdk/models/components/chatmetadataresult.go new file mode 100644 index 00000000..74a43305 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatmetadataresult.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ChatMetadataResult struct { + // Metadata of a Chat a user had with Glean Assistant. This contains no actual conversational content. + Chat *ChatMetadata `json:"chat,omitempty"` + // An opaque token that represents this particular Chat. To be used for `/feedback` reporting. + TrackingToken *string `json:"trackingToken,omitempty"` +} + +func (o *ChatMetadataResult) GetChat() *ChatMetadata { + if o == nil { + return nil + } + return o.Chat +} + +func (o *ChatMetadataResult) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} diff --git a/tests/mockserver/internal/sdk/models/components/chatrequest.go b/tests/mockserver/internal/sdk/models/components/chatrequest.go new file mode 100644 index 00000000..28474404 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatrequest.go @@ -0,0 +1,102 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ChatRequest struct { + // Save the current interaction as a Chat for the user to access and potentially continue later. + SaveChat *bool `json:"saveChat,omitempty"` + // 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. + ChatID *string `json:"chatId,omitempty"` + // 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. + Messages []ChatMessage `json:"messages"` + // Describes the agent that executes the request. + AgentConfig *AgentConfig `json:"agentConfig,omitempty"` + Inclusions *ChatRestrictionFilters `json:"inclusions,omitempty"` + Exclusions *ChatRestrictionFilters `json:"exclusions,omitempty"` + // Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. + TimeoutMillis *int64 `json:"timeoutMillis,omitempty"` + SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` + // 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. + ApplicationID *string `json:"applicationId,omitempty"` + // 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. + AgentID *string `json:"agentId,omitempty"` + // 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. + Stream *bool `json:"stream,omitempty"` +} + +func (o *ChatRequest) GetSaveChat() *bool { + if o == nil { + return nil + } + return o.SaveChat +} + +func (o *ChatRequest) GetChatID() *string { + if o == nil { + return nil + } + return o.ChatID +} + +func (o *ChatRequest) GetMessages() []ChatMessage { + if o == nil { + return []ChatMessage{} + } + return o.Messages +} + +func (o *ChatRequest) GetAgentConfig() *AgentConfig { + if o == nil { + return nil + } + return o.AgentConfig +} + +func (o *ChatRequest) GetInclusions() *ChatRestrictionFilters { + if o == nil { + return nil + } + return o.Inclusions +} + +func (o *ChatRequest) GetExclusions() *ChatRestrictionFilters { + if o == nil { + return nil + } + return o.Exclusions +} + +func (o *ChatRequest) GetTimeoutMillis() *int64 { + if o == nil { + return nil + } + return o.TimeoutMillis +} + +func (o *ChatRequest) GetSessionInfo() *SessionInfo { + if o == nil { + return nil + } + return o.SessionInfo +} + +func (o *ChatRequest) GetApplicationID() *string { + if o == nil { + return nil + } + return o.ApplicationID +} + +func (o *ChatRequest) GetAgentID() *string { + if o == nil { + return nil + } + return o.AgentID +} + +func (o *ChatRequest) GetStream() *bool { + if o == nil { + return nil + } + return o.Stream +} diff --git a/tests/mockserver/internal/sdk/models/components/chatresponse.go b/tests/mockserver/internal/sdk/models/components/chatresponse.go new file mode 100644 index 00000000..a6f51d28 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatresponse.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ChatResponse - A single response from the /chat backend. +type ChatResponse struct { + Messages []ChatMessage `json:"messages,omitempty"` + // The id of the associated Chat the messages belong to, if one exists. + ChatID *string `json:"chatId,omitempty"` + // Follow-up prompts for the user to potentially use + FollowUpPrompts []string `json:"followUpPrompts,omitempty"` + // Time in milliseconds the backend took to respond to the request. + BackendTimeMillis *int64 `json:"backendTimeMillis,omitempty"` + // A token that is used to track the session. + ChatSessionTrackingToken *string `json:"chatSessionTrackingToken,omitempty"` +} + +func (o *ChatResponse) GetMessages() []ChatMessage { + if o == nil { + return nil + } + return o.Messages +} + +func (o *ChatResponse) GetChatID() *string { + if o == nil { + return nil + } + return o.ChatID +} + +func (o *ChatResponse) GetFollowUpPrompts() []string { + if o == nil { + return nil + } + return o.FollowUpPrompts +} + +func (o *ChatResponse) GetBackendTimeMillis() *int64 { + if o == nil { + return nil + } + return o.BackendTimeMillis +} + +func (o *ChatResponse) GetChatSessionTrackingToken() *string { + if o == nil { + return nil + } + return o.ChatSessionTrackingToken +} diff --git a/tests/mockserver/internal/sdk/models/components/chatrestrictionfilters.go b/tests/mockserver/internal/sdk/models/components/chatrestrictionfilters.go new file mode 100644 index 00000000..0be4fc51 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatrestrictionfilters.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ChatRestrictionFilters struct { + // 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. + ContainerSpecs []DocumentSpecUnion `json:"containerSpecs,omitempty"` + DocumentSpecs []DocumentSpecUnion `json:"documentSpecs,omitempty"` + DatasourceInstances []string `json:"datasourceInstances,omitempty"` +} + +func (o *ChatRestrictionFilters) GetContainerSpecs() []DocumentSpecUnion { + if o == nil { + return nil + } + return o.ContainerSpecs +} + +func (o *ChatRestrictionFilters) GetDocumentSpecs() []DocumentSpecUnion { + if o == nil { + return nil + } + return o.DocumentSpecs +} + +func (o *ChatRestrictionFilters) GetDatasourceInstances() []string { + if o == nil { + return nil + } + return o.DatasourceInstances +} diff --git a/tests/mockserver/internal/sdk/models/components/chatresult.go b/tests/mockserver/internal/sdk/models/components/chatresult.go new file mode 100644 index 00000000..ca043f8a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatresult.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ChatResult struct { + // A historical representation of a series of chat messages a user had with Glean Assistant. + Chat *Chat `json:"chat,omitempty"` + // An opaque token that represents this particular Chat. To be used for `/feedback` reporting. + TrackingToken *string `json:"trackingToken,omitempty"` +} + +func (o *ChatResult) GetChat() *Chat { + if o == nil { + return nil + } + return o.Chat +} + +func (o *ChatResult) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} diff --git a/tests/mockserver/internal/sdk/models/components/chatzerostatesuggestionoptions.go b/tests/mockserver/internal/sdk/models/components/chatzerostatesuggestionoptions.go new file mode 100644 index 00000000..9c7c788a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/chatzerostatesuggestionoptions.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ChatZeroStateSuggestionOptions struct { + // The Chat Application ID this feed request should be scoped to. Empty means there is no Chat Application ID.. + ApplicationID *string `json:"applicationId,omitempty"` +} + +func (o *ChatZeroStateSuggestionOptions) GetApplicationID() *string { + if o == nil { + return nil + } + return o.ApplicationID +} diff --git a/tests/mockserver/internal/sdk/models/components/checkdocumentaccessrequest.go b/tests/mockserver/internal/sdk/models/components/checkdocumentaccessrequest.go new file mode 100644 index 00000000..29131d83 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/checkdocumentaccessrequest.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// CheckDocumentAccessRequest - Describes the request body of the /checkdocumentaccess API call +type CheckDocumentAccessRequest struct { + // Datasource of document to check access for. + Datasource string `json:"datasource"` + // Object type of document to check access for. + ObjectType string `json:"objectType"` + // Glean Document ID to check access for. + DocID string `json:"docId"` + // Email of user to check access for. + UserEmail string `json:"userEmail"` +} + +func (o *CheckDocumentAccessRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *CheckDocumentAccessRequest) GetObjectType() string { + if o == nil { + return "" + } + return o.ObjectType +} + +func (o *CheckDocumentAccessRequest) GetDocID() string { + if o == nil { + return "" + } + return o.DocID +} + +func (o *CheckDocumentAccessRequest) GetUserEmail() string { + if o == nil { + return "" + } + return o.UserEmail +} diff --git a/tests/mockserver/internal/sdk/models/components/checkdocumentaccessresponse.go b/tests/mockserver/internal/sdk/models/components/checkdocumentaccessresponse.go new file mode 100644 index 00000000..26a4aa74 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/checkdocumentaccessresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// CheckDocumentAccessResponse - Describes the response body of the /checkdocumentaccess API call +type CheckDocumentAccessResponse struct { + // If true, user has access to document for search + HasAccess *bool `json:"hasAccess,omitempty"` +} + +func (o *CheckDocumentAccessResponse) GetHasAccess() *bool { + if o == nil { + return nil + } + return o.HasAccess +} diff --git a/tests/mockserver/internal/sdk/models/components/clustergroup.go b/tests/mockserver/internal/sdk/models/components/clustergroup.go new file mode 100644 index 00000000..d25ab42d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/clustergroup.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ClusterGroup struct { + // A list of results that should be displayed as associated with this result. + ClusteredResults []SearchResult `json:"clusteredResults,omitempty"` + // The reason for inclusion of clusteredResults. + ClusterType *ClusterTypeEnum `json:"clusterType,omitempty"` + // The default number of results to display before truncating and showing a "see more" link + VisibleCountHint int64 `json:"visibleCountHint"` +} + +func (o *ClusterGroup) GetClusteredResults() []SearchResult { + if o == nil { + return nil + } + return o.ClusteredResults +} + +func (o *ClusterGroup) GetClusterType() *ClusterTypeEnum { + if o == nil { + return nil + } + return o.ClusterType +} + +func (o *ClusterGroup) GetVisibleCountHint() int64 { + if o == nil { + return 0 + } + return o.VisibleCountHint +} diff --git a/tests/mockserver/internal/sdk/models/components/clustertypeenum.go b/tests/mockserver/internal/sdk/models/components/clustertypeenum.go new file mode 100644 index 00000000..de30c732 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/clustertypeenum.go @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ClusterTypeEnum - The reason for inclusion of clusteredResults. +type ClusterTypeEnum string + +const ( + ClusterTypeEnumSimilar ClusterTypeEnum = "SIMILAR" + ClusterTypeEnumFreshness ClusterTypeEnum = "FRESHNESS" + ClusterTypeEnumTitle ClusterTypeEnum = "TITLE" + ClusterTypeEnumContent ClusterTypeEnum = "CONTENT" + ClusterTypeEnumNone ClusterTypeEnum = "NONE" + ClusterTypeEnumThreadReply ClusterTypeEnum = "THREAD_REPLY" + ClusterTypeEnumThreadRoot ClusterTypeEnum = "THREAD_ROOT" + ClusterTypeEnumPrefix ClusterTypeEnum = "PREFIX" + ClusterTypeEnumSuffix ClusterTypeEnum = "SUFFIX" +) + +func (e ClusterTypeEnum) ToPointer() *ClusterTypeEnum { + return &e +} +func (e *ClusterTypeEnum) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "SIMILAR": + fallthrough + case "FRESHNESS": + fallthrough + case "TITLE": + fallthrough + case "CONTENT": + fallthrough + case "NONE": + fallthrough + case "THREAD_REPLY": + fallthrough + case "THREAD_ROOT": + fallthrough + case "PREFIX": + fallthrough + case "SUFFIX": + *e = ClusterTypeEnum(v) + return nil + default: + return fmt.Errorf("invalid value for ClusterTypeEnum: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/code.go b/tests/mockserver/internal/sdk/models/components/code.go new file mode 100644 index 00000000..724015e1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/code.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Code struct { + RepoName *string `json:"repoName,omitempty"` + FileName *string `json:"fileName,omitempty"` + FileURL *string `json:"fileUrl,omitempty"` + Lines []CodeLine `json:"lines,omitempty"` + // Last file match for a repo + IsLastMatch *bool `json:"isLastMatch,omitempty"` +} + +func (o *Code) GetRepoName() *string { + if o == nil { + return nil + } + return o.RepoName +} + +func (o *Code) GetFileName() *string { + if o == nil { + return nil + } + return o.FileName +} + +func (o *Code) GetFileURL() *string { + if o == nil { + return nil + } + return o.FileURL +} + +func (o *Code) GetLines() []CodeLine { + if o == nil { + return nil + } + return o.Lines +} + +func (o *Code) GetIsLastMatch() *bool { + if o == nil { + return nil + } + return o.IsLastMatch +} diff --git a/tests/mockserver/internal/sdk/models/components/codeline.go b/tests/mockserver/internal/sdk/models/components/codeline.go new file mode 100644 index 00000000..a0646fda --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/codeline.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CodeLine struct { + LineNumber *int64 `json:"lineNumber,omitempty"` + Content *string `json:"content,omitempty"` + // Index ranges depicting matched sections of the line + Ranges []TextRange `json:"ranges,omitempty"` +} + +func (o *CodeLine) GetLineNumber() *int64 { + if o == nil { + return nil + } + return o.LineNumber +} + +func (o *CodeLine) GetContent() *string { + if o == nil { + return nil + } + return o.Content +} + +func (o *CodeLine) GetRanges() []TextRange { + if o == nil { + return nil + } + return o.Ranges +} diff --git a/tests/mockserver/internal/sdk/models/components/collection.go b/tests/mockserver/internal/sdk/models/components/collection.go new file mode 100644 index 00000000..9740ad80 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/collection.go @@ -0,0 +1,222 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type Collection struct { + // The unique name of the Collection. + Name string `json:"name"` + // A brief summary of the Collection's contents. + Description string `json:"description"` + // A list of added user roles for the Collection. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of removed user roles for the Collection. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` + // Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // The emoji icon of this Collection. + Icon *string `json:"icon,omitempty"` + // Indicates whether edits are allowed for everyone or only admins. + AdminLocked *bool `json:"adminLocked,omitempty"` + // The parent of this Collection, or 0 if it's a top-level Collection. + ParentID *int64 `json:"parentId,omitempty"` + Thumbnail *Thumbnail `json:"thumbnail,omitempty"` + // The datasource type this Collection can hold. + AllowedDatasource *string `json:"allowedDatasource,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + // The unique ID of the Collection. + ID int64 `json:"id"` + CreateTime *time.Time `json:"createTime,omitempty"` + UpdateTime *time.Time `json:"updateTime,omitempty"` + Creator *Person `json:"creator,omitempty"` + UpdatedBy *Person `json:"updatedBy,omitempty"` + // The number of items currently in the Collection. Separated from the actual items so we can grab the count without items. + ItemCount *int64 `json:"itemCount,omitempty"` + // The number of children Collections. Separated from the actual children so we can grab the count without children. + ChildCount *int64 `json:"childCount,omitempty"` + // The items in this Collection. + Items []CollectionItem `json:"items,omitempty"` + PinMetadata *CollectionPinnedMetadata `json:"pinMetadata,omitempty"` + // The names of the shortcuts (Go Links) that point to this Collection. + Shortcuts []string `json:"shortcuts,omitempty"` + // The children Collections of this Collection. + Children []Collection `json:"children,omitempty"` + // A list of user roles for the Collection. + Roles []UserRoleSpecification `json:"roles,omitempty"` +} + +func (c Collection) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *Collection) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Collection) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Collection) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +func (o *Collection) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *Collection) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} + +func (o *Collection) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *Collection) GetIcon() *string { + if o == nil { + return nil + } + return o.Icon +} + +func (o *Collection) GetAdminLocked() *bool { + if o == nil { + return nil + } + return o.AdminLocked +} + +func (o *Collection) GetParentID() *int64 { + if o == nil { + return nil + } + return o.ParentID +} + +func (o *Collection) GetThumbnail() *Thumbnail { + if o == nil { + return nil + } + return o.Thumbnail +} + +func (o *Collection) GetAllowedDatasource() *string { + if o == nil { + return nil + } + return o.AllowedDatasource +} + +func (o *Collection) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *Collection) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *Collection) GetCreateTime() *time.Time { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *Collection) GetUpdateTime() *time.Time { + if o == nil { + return nil + } + return o.UpdateTime +} + +func (o *Collection) GetCreator() *Person { + if o == nil { + return nil + } + return o.Creator +} + +func (o *Collection) GetUpdatedBy() *Person { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *Collection) GetItemCount() *int64 { + if o == nil { + return nil + } + return o.ItemCount +} + +func (o *Collection) GetChildCount() *int64 { + if o == nil { + return nil + } + return o.ChildCount +} + +func (o *Collection) GetItems() []CollectionItem { + if o == nil { + return nil + } + return o.Items +} + +func (o *Collection) GetPinMetadata() *CollectionPinnedMetadata { + if o == nil { + return nil + } + return o.PinMetadata +} + +func (o *Collection) GetShortcuts() []string { + if o == nil { + return nil + } + return o.Shortcuts +} + +func (o *Collection) GetChildren() []Collection { + if o == nil { + return nil + } + return o.Children +} + +func (o *Collection) GetRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.Roles +} diff --git a/tests/mockserver/internal/sdk/models/components/collectionerror.go b/tests/mockserver/internal/sdk/models/components/collectionerror.go new file mode 100644 index 00000000..79eef1da --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/collectionerror.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type CollectionErrorErrorCode string + +const ( + CollectionErrorErrorCodeNameExists CollectionErrorErrorCode = "NAME_EXISTS" + CollectionErrorErrorCodeNotFound CollectionErrorErrorCode = "NOT_FOUND" + CollectionErrorErrorCodeCollectionPinned CollectionErrorErrorCode = "COLLECTION_PINNED" + CollectionErrorErrorCodeConcurrentHierarchyEdit CollectionErrorErrorCode = "CONCURRENT_HIERARCHY_EDIT" + CollectionErrorErrorCodeHeightViolation CollectionErrorErrorCode = "HEIGHT_VIOLATION" + CollectionErrorErrorCodeWidthViolation CollectionErrorErrorCode = "WIDTH_VIOLATION" + CollectionErrorErrorCodeNoPermissions CollectionErrorErrorCode = "NO_PERMISSIONS" +) + +func (e CollectionErrorErrorCode) ToPointer() *CollectionErrorErrorCode { + return &e +} +func (e *CollectionErrorErrorCode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NAME_EXISTS": + fallthrough + case "NOT_FOUND": + fallthrough + case "COLLECTION_PINNED": + fallthrough + case "CONCURRENT_HIERARCHY_EDIT": + fallthrough + case "HEIGHT_VIOLATION": + fallthrough + case "WIDTH_VIOLATION": + fallthrough + case "NO_PERMISSIONS": + *e = CollectionErrorErrorCode(v) + return nil + default: + return fmt.Errorf("invalid value for CollectionErrorErrorCode: %v", v) + } +} + +type CollectionError struct { + ErrorCode CollectionErrorErrorCode `json:"errorCode"` +} + +func (o *CollectionError) GetErrorCode() CollectionErrorErrorCode { + if o == nil { + return CollectionErrorErrorCode("") + } + return o.ErrorCode +} diff --git a/tests/mockserver/internal/sdk/models/components/collectionitem.go b/tests/mockserver/internal/sdk/models/components/collectionitem.go new file mode 100644 index 00000000..63403db8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/collectionitem.go @@ -0,0 +1,168 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +type CollectionItemItemType string + +const ( + CollectionItemItemTypeDocument CollectionItemItemType = "DOCUMENT" + CollectionItemItemTypeText CollectionItemItemType = "TEXT" + CollectionItemItemTypeURL CollectionItemItemType = "URL" + CollectionItemItemTypeCollection CollectionItemItemType = "COLLECTION" +) + +func (e CollectionItemItemType) ToPointer() *CollectionItemItemType { + return &e +} +func (e *CollectionItemItemType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DOCUMENT": + fallthrough + case "TEXT": + fallthrough + case "URL": + fallthrough + case "COLLECTION": + *e = CollectionItemItemType(v) + return nil + default: + return fmt.Errorf("invalid value for CollectionItemItemType: %v", v) + } +} + +type CollectionItem struct { + // The optional name of the Collection item. + Name *string `json:"name,omitempty"` + // A helpful description of why this CollectionItem is in the Collection that it's in. + Description *string `json:"description,omitempty"` + // The emoji icon for this CollectionItem. Only used for Text type items. + Icon *string `json:"icon,omitempty"` + // The Collection ID of the Collection that this CollectionItem belongs in. + CollectionID int64 `json:"collectionId"` + // If this CollectionItem is indexed, the Glean Document ID of that document. + DocumentID *string `json:"documentId,omitempty"` + // The URL of this CollectionItem. + URL *string `json:"url,omitempty"` + // Unique identifier for the item within the Collection it belongs to. + ItemID *string `json:"itemId,omitempty"` + CreatedBy *Person `json:"createdBy,omitempty"` + // Unix timestamp for when the item was first added (in seconds since epoch UTC). + CreatedAt *time.Time `json:"createdAt,omitempty"` + Document *Document `json:"document,omitempty"` + Shortcut *Shortcut `json:"shortcut,omitempty"` + Collection *Collection `json:"collection,omitempty"` + ItemType CollectionItemItemType `json:"itemType"` +} + +func (c CollectionItem) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *CollectionItem) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *CollectionItem) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *CollectionItem) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *CollectionItem) GetIcon() *string { + if o == nil { + return nil + } + return o.Icon +} + +func (o *CollectionItem) GetCollectionID() int64 { + if o == nil { + return 0 + } + return o.CollectionID +} + +func (o *CollectionItem) GetDocumentID() *string { + if o == nil { + return nil + } + return o.DocumentID +} + +func (o *CollectionItem) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *CollectionItem) GetItemID() *string { + if o == nil { + return nil + } + return o.ItemID +} + +func (o *CollectionItem) GetCreatedBy() *Person { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *CollectionItem) GetCreatedAt() *time.Time { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CollectionItem) GetDocument() *Document { + if o == nil { + return nil + } + return o.Document +} + +func (o *CollectionItem) GetShortcut() *Shortcut { + if o == nil { + return nil + } + return o.Shortcut +} + +func (o *CollectionItem) GetCollection() *Collection { + if o == nil { + return nil + } + return o.Collection +} + +func (o *CollectionItem) GetItemType() CollectionItemItemType { + if o == nil { + return CollectionItemItemType("") + } + return o.ItemType +} diff --git a/tests/mockserver/internal/sdk/models/components/collectionitemdescriptor.go b/tests/mockserver/internal/sdk/models/components/collectionitemdescriptor.go new file mode 100644 index 00000000..c52451d3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/collectionitemdescriptor.go @@ -0,0 +1,102 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type CollectionItemDescriptorItemType string + +const ( + CollectionItemDescriptorItemTypeDocument CollectionItemDescriptorItemType = "DOCUMENT" + CollectionItemDescriptorItemTypeText CollectionItemDescriptorItemType = "TEXT" + CollectionItemDescriptorItemTypeURL CollectionItemDescriptorItemType = "URL" +) + +func (e CollectionItemDescriptorItemType) ToPointer() *CollectionItemDescriptorItemType { + return &e +} +func (e *CollectionItemDescriptorItemType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DOCUMENT": + fallthrough + case "TEXT": + fallthrough + case "URL": + *e = CollectionItemDescriptorItemType(v) + return nil + default: + return fmt.Errorf("invalid value for CollectionItemDescriptorItemType: %v", v) + } +} + +type CollectionItemDescriptor struct { + // The optional name of the Collection item. + Name *string `json:"name,omitempty"` + // A helpful description of why this CollectionItem is in the Collection that it's in. + Description *string `json:"description,omitempty"` + // The emoji icon for this CollectionItem. Only used for Text type items. + Icon *string `json:"icon,omitempty"` + // The URL of the item being added. + URL *string `json:"url,omitempty"` + // The Glean Document ID of the item being added if it's an indexed document. + DocumentID *string `json:"documentId,omitempty"` + // The (optional) ItemId of the next CollectionItem in sequence. If omitted, will be added to the end of the Collection + NewNextItemID *string `json:"newNextItemId,omitempty"` + ItemType *CollectionItemDescriptorItemType `json:"itemType,omitempty"` +} + +func (o *CollectionItemDescriptor) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *CollectionItemDescriptor) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *CollectionItemDescriptor) GetIcon() *string { + if o == nil { + return nil + } + return o.Icon +} + +func (o *CollectionItemDescriptor) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *CollectionItemDescriptor) GetDocumentID() *string { + if o == nil { + return nil + } + return o.DocumentID +} + +func (o *CollectionItemDescriptor) GetNewNextItemID() *string { + if o == nil { + return nil + } + return o.NewNextItemID +} + +func (o *CollectionItemDescriptor) GetItemType() *CollectionItemDescriptorItemType { + if o == nil { + return nil + } + return o.ItemType +} diff --git a/tests/mockserver/internal/sdk/models/components/collectionpinmetadata.go b/tests/mockserver/internal/sdk/models/components/collectionpinmetadata.go new file mode 100644 index 00000000..5c03cbf9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/collectionpinmetadata.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CollectionPinMetadata struct { + // The ID of the Collection. + ID int64 `json:"id"` + Target CollectionPinTarget `json:"target"` +} + +func (o *CollectionPinMetadata) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *CollectionPinMetadata) GetTarget() CollectionPinTarget { + if o == nil { + return CollectionPinTarget{} + } + return o.Target +} diff --git a/tests/mockserver/internal/sdk/models/components/collectionpinnablecategories.go b/tests/mockserver/internal/sdk/models/components/collectionpinnablecategories.go new file mode 100644 index 00000000..8679fde6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/collectionpinnablecategories.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// CollectionPinnableCategories - Categories a Collection can be pinned to. +type CollectionPinnableCategories string + +const ( + CollectionPinnableCategoriesCompanyResource CollectionPinnableCategories = "COMPANY_RESOURCE" + CollectionPinnableCategoriesDepartmentResource CollectionPinnableCategories = "DEPARTMENT_RESOURCE" + CollectionPinnableCategoriesTeamResource CollectionPinnableCategories = "TEAM_RESOURCE" +) + +func (e CollectionPinnableCategories) ToPointer() *CollectionPinnableCategories { + return &e +} +func (e *CollectionPinnableCategories) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "COMPANY_RESOURCE": + fallthrough + case "DEPARTMENT_RESOURCE": + fallthrough + case "TEAM_RESOURCE": + *e = CollectionPinnableCategories(v) + return nil + default: + return fmt.Errorf("invalid value for CollectionPinnableCategories: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/collectionpinnabletargets.go b/tests/mockserver/internal/sdk/models/components/collectionpinnabletargets.go new file mode 100644 index 00000000..fdcec773 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/collectionpinnabletargets.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// CollectionPinnableTargets - What targets can a Collection be pinned to. +type CollectionPinnableTargets string + +const ( + CollectionPinnableTargetsResourceCard CollectionPinnableTargets = "RESOURCE_CARD" + CollectionPinnableTargetsTeamProfilePage CollectionPinnableTargets = "TEAM_PROFILE_PAGE" +) + +func (e CollectionPinnableTargets) ToPointer() *CollectionPinnableTargets { + return &e +} +func (e *CollectionPinnableTargets) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "RESOURCE_CARD": + fallthrough + case "TEAM_PROFILE_PAGE": + *e = CollectionPinnableTargets(v) + return nil + default: + return fmt.Errorf("invalid value for CollectionPinnableTargets: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/collectionpinnedmetadata.go b/tests/mockserver/internal/sdk/models/components/collectionpinnedmetadata.go new file mode 100644 index 00000000..540bda90 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/collectionpinnedmetadata.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CollectionPinnedMetadata struct { + // List of targets this Collection is pinned to. + ExistingPins []CollectionPinTarget `json:"existingPins,omitempty"` + // 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. + EligiblePins []CollectionPinMetadata `json:"eligiblePins,omitempty"` +} + +func (o *CollectionPinnedMetadata) GetExistingPins() []CollectionPinTarget { + if o == nil { + return nil + } + return o.ExistingPins +} + +func (o *CollectionPinnedMetadata) GetEligiblePins() []CollectionPinMetadata { + if o == nil { + return nil + } + return o.EligiblePins +} diff --git a/tests/mockserver/internal/sdk/models/components/collectionpintarget.go b/tests/mockserver/internal/sdk/models/components/collectionpintarget.go new file mode 100644 index 00000000..dc05e1a2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/collectionpintarget.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CollectionPinTarget struct { + // Categories a Collection can be pinned to. + Category CollectionPinnableCategories `json:"category"` + // 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. + Value *string `json:"value,omitempty"` + // What targets can a Collection be pinned to. + Target *CollectionPinnableTargets `json:"target,omitempty"` +} + +func (o *CollectionPinTarget) GetCategory() CollectionPinnableCategories { + if o == nil { + return CollectionPinnableCategories("") + } + return o.Category +} + +func (o *CollectionPinTarget) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *CollectionPinTarget) GetTarget() *CollectionPinnableTargets { + if o == nil { + return nil + } + return o.Target +} diff --git a/tests/mockserver/internal/sdk/models/components/commentdefinition.go b/tests/mockserver/internal/sdk/models/components/commentdefinition.go new file mode 100644 index 00000000..ecdc8f11 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/commentdefinition.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// CommentDefinition - Describes a comment on a document +type CommentDefinition struct { + // The document specific id for the comment. This field is case insensitive and should not be more than 200 characters in length. + ID string `json:"id"` + // Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. + Author *UserReferenceDefinition `json:"author,omitempty"` + // Describes text content or base64 encoded binary content + Content *ContentDefinition `json:"content,omitempty"` + // The creation time, in epoch seconds. + CreatedAt *int64 `json:"createdAt,omitempty"` + // The last updated time, in epoch seconds. + UpdatedAt *int64 `json:"updatedAt,omitempty"` + // Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. + UpdatedBy *UserReferenceDefinition `json:"updatedBy,omitempty"` +} + +func (o *CommentDefinition) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *CommentDefinition) GetAuthor() *UserReferenceDefinition { + if o == nil { + return nil + } + return o.Author +} + +func (o *CommentDefinition) GetContent() *ContentDefinition { + if o == nil { + return nil + } + return o.Content +} + +func (o *CommentDefinition) GetCreatedAt() *int64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *CommentDefinition) GetUpdatedAt() *int64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *CommentDefinition) GetUpdatedBy() *UserReferenceDefinition { + if o == nil { + return nil + } + return o.UpdatedBy +} diff --git a/tests/mockserver/internal/sdk/models/components/communicationchannel.go b/tests/mockserver/internal/sdk/models/components/communicationchannel.go new file mode 100644 index 00000000..63f9dfdb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/communicationchannel.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type CommunicationChannel string + +const ( + CommunicationChannelCommunicationChannelEmail CommunicationChannel = "COMMUNICATION_CHANNEL_EMAIL" + CommunicationChannelCommunicationChannelSlack CommunicationChannel = "COMMUNICATION_CHANNEL_SLACK" +) + +func (e CommunicationChannel) ToPointer() *CommunicationChannel { + return &e +} +func (e *CommunicationChannel) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "COMMUNICATION_CHANNEL_EMAIL": + fallthrough + case "COMMUNICATION_CHANNEL_SLACK": + *e = CommunicationChannel(v) + return nil + default: + return fmt.Errorf("invalid value for CommunicationChannel: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/company.go b/tests/mockserver/internal/sdk/models/components/company.go new file mode 100644 index 00000000..046ab6cb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/company.go @@ -0,0 +1,139 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" +) + +type Company struct { + // User-friendly display name. + Name string `json:"name"` + // Link to internal company company profile. + ProfileURL *string `json:"profileUrl,omitempty"` + // Link to company's associated websites. + WebsiteUrls []string `json:"websiteUrls,omitempty"` + // The URL of the company's logo. Public, Glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). + LogoURL *string `json:"logoUrl,omitempty"` + // User facing string representing the company's location. + Location *string `json:"location,omitempty"` + // Phone number as a number string. + Phone *string `json:"phone,omitempty"` + // Fax number as a number string. + Fax *string `json:"fax,omitempty"` + // User facing string representing the company's industry. + Industry *string `json:"industry,omitempty"` + // Average company's annual revenue for reference. + AnnualRevenue *float64 `json:"annualRevenue,omitempty"` + // Average company's number of employees for reference. + NumberOfEmployees *int64 `json:"numberOfEmployees,omitempty"` + // Company's stock symbol if company is public. + StockSymbol *string `json:"stockSymbol,omitempty"` + // The date when the company was founded. + FoundedDate *types.Date `json:"foundedDate,omitempty"` + // User facing description of company. + About *string `json:"about,omitempty"` +} + +func (c Company) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *Company) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Company) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Company) GetProfileURL() *string { + if o == nil { + return nil + } + return o.ProfileURL +} + +func (o *Company) GetWebsiteUrls() []string { + if o == nil { + return nil + } + return o.WebsiteUrls +} + +func (o *Company) GetLogoURL() *string { + if o == nil { + return nil + } + return o.LogoURL +} + +func (o *Company) GetLocation() *string { + if o == nil { + return nil + } + return o.Location +} + +func (o *Company) GetPhone() *string { + if o == nil { + return nil + } + return o.Phone +} + +func (o *Company) GetFax() *string { + if o == nil { + return nil + } + return o.Fax +} + +func (o *Company) GetIndustry() *string { + if o == nil { + return nil + } + return o.Industry +} + +func (o *Company) GetAnnualRevenue() *float64 { + if o == nil { + return nil + } + return o.AnnualRevenue +} + +func (o *Company) GetNumberOfEmployees() *int64 { + if o == nil { + return nil + } + return o.NumberOfEmployees +} + +func (o *Company) GetStockSymbol() *string { + if o == nil { + return nil + } + return o.StockSymbol +} + +func (o *Company) GetFoundedDate() *types.Date { + if o == nil { + return nil + } + return o.FoundedDate +} + +func (o *Company) GetAbout() *string { + if o == nil { + return nil + } + return o.About +} diff --git a/tests/mockserver/internal/sdk/models/components/conferencedata.go b/tests/mockserver/internal/sdk/models/components/conferencedata.go new file mode 100644 index 00000000..04b08de5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/conferencedata.go @@ -0,0 +1,91 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type Provider string + +const ( + ProviderZoom Provider = "ZOOM" + ProviderHangouts Provider = "HANGOUTS" +) + +func (e Provider) ToPointer() *Provider { + return &e +} +func (e *Provider) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ZOOM": + fallthrough + case "HANGOUTS": + *e = Provider(v) + return nil + default: + return fmt.Errorf("invalid value for Provider: %v", v) + } +} + +type ConferenceDataSource string + +const ( + ConferenceDataSourceNativeConference ConferenceDataSource = "NATIVE_CONFERENCE" + ConferenceDataSourceLocation ConferenceDataSource = "LOCATION" + ConferenceDataSourceDescription ConferenceDataSource = "DESCRIPTION" +) + +func (e ConferenceDataSource) ToPointer() *ConferenceDataSource { + return &e +} +func (e *ConferenceDataSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NATIVE_CONFERENCE": + fallthrough + case "LOCATION": + fallthrough + case "DESCRIPTION": + *e = ConferenceDataSource(v) + return nil + default: + return fmt.Errorf("invalid value for ConferenceDataSource: %v", v) + } +} + +type ConferenceData struct { + Provider Provider `json:"provider"` + // A permalink for the conference. + URI string `json:"uri"` + Source *ConferenceDataSource `json:"source,omitempty"` +} + +func (o *ConferenceData) GetProvider() Provider { + if o == nil { + return Provider("") + } + return o.Provider +} + +func (o *ConferenceData) GetURI() string { + if o == nil { + return "" + } + return o.URI +} + +func (o *ConferenceData) GetSource() *ConferenceDataSource { + if o == nil { + return nil + } + return o.Source +} diff --git a/tests/mockserver/internal/sdk/models/components/connectortype.go b/tests/mockserver/internal/sdk/models/components/connectortype.go new file mode 100644 index 00000000..fcf165bb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/connectortype.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ConnectorType - The source from which document content was pulled, e.g. an API crawl or browser history +type ConnectorType string + +const ( + ConnectorTypeAPICrawl ConnectorType = "API_CRAWL" + ConnectorTypeBrowserCrawl ConnectorType = "BROWSER_CRAWL" + ConnectorTypeBrowserHistory ConnectorType = "BROWSER_HISTORY" + ConnectorTypeBuiltin ConnectorType = "BUILTIN" + ConnectorTypeFederatedSearch ConnectorType = "FEDERATED_SEARCH" + ConnectorTypePushAPI ConnectorType = "PUSH_API" + ConnectorTypeWebCrawl ConnectorType = "WEB_CRAWL" + ConnectorTypeNativeHistory ConnectorType = "NATIVE_HISTORY" +) + +func (e ConnectorType) ToPointer() *ConnectorType { + return &e +} +func (e *ConnectorType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "API_CRAWL": + fallthrough + case "BROWSER_CRAWL": + fallthrough + case "BROWSER_HISTORY": + fallthrough + case "BUILTIN": + fallthrough + case "FEDERATED_SEARCH": + fallthrough + case "PUSH_API": + fallthrough + case "WEB_CRAWL": + fallthrough + case "NATIVE_HISTORY": + *e = ConnectorType(v) + return nil + default: + return fmt.Errorf("invalid value for ConnectorType: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/contentdefinition.go b/tests/mockserver/internal/sdk/models/components/contentdefinition.go new file mode 100644 index 00000000..7be15567 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/contentdefinition.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ContentDefinition - Describes text content or base64 encoded binary content +type ContentDefinition struct { + MimeType string `json:"mimeType"` + // text content. Only one of textContent or binary content can be specified + TextContent *string `json:"textContent,omitempty"` + // base64 encoded binary content. Only one of textContent or binary content can be specified + BinaryContent *string `json:"binaryContent,omitempty"` +} + +func (o *ContentDefinition) GetMimeType() string { + if o == nil { + return "" + } + return o.MimeType +} + +func (o *ContentDefinition) GetTextContent() *string { + if o == nil { + return nil + } + return o.TextContent +} + +func (o *ContentDefinition) GetBinaryContent() *string { + if o == nil { + return nil + } + return o.BinaryContent +} diff --git a/tests/mockserver/internal/sdk/models/components/contentinsightsresponse.go b/tests/mockserver/internal/sdk/models/components/contentinsightsresponse.go new file mode 100644 index 00000000..e417efa7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/contentinsightsresponse.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ContentInsightsResponse struct { + // Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). + LastLogTimestamp *int64 `json:"lastLogTimestamp,omitempty"` + // Insights for documents. + DocumentInsights []DocumentInsight `json:"documentInsights,omitempty"` + // list of departments applicable for contents tab. + Departments []string `json:"departments,omitempty"` + // Min threshold in size of departments while populating results, otherwise 0. + MinDepartmentSizeThreshold *int64 `json:"minDepartmentSizeThreshold,omitempty"` + // Minimum number of visitors to a document required to be included in insights. + MinVisitorThreshold *int64 `json:"minVisitorThreshold,omitempty"` +} + +func (o *ContentInsightsResponse) GetLastLogTimestamp() *int64 { + if o == nil { + return nil + } + return o.LastLogTimestamp +} + +func (o *ContentInsightsResponse) GetDocumentInsights() []DocumentInsight { + if o == nil { + return nil + } + return o.DocumentInsights +} + +func (o *ContentInsightsResponse) GetDepartments() []string { + if o == nil { + return nil + } + return o.Departments +} + +func (o *ContentInsightsResponse) GetMinDepartmentSizeThreshold() *int64 { + if o == nil { + return nil + } + return o.MinDepartmentSizeThreshold +} + +func (o *ContentInsightsResponse) GetMinVisitorThreshold() *int64 { + if o == nil { + return nil + } + return o.MinVisitorThreshold +} diff --git a/tests/mockserver/internal/sdk/models/components/contenttype.go b/tests/mockserver/internal/sdk/models/components/contenttype.go new file mode 100644 index 00000000..6740b4e6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/contenttype.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type ContentType string + +const ( + ContentTypeText ContentType = "text" +) + +func (e ContentType) ToPointer() *ContentType { + return &e +} +func (e *ContentType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "text": + *e = ContentType(v) + return nil + default: + return fmt.Errorf("invalid value for ContentType: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/countinfo.go b/tests/mockserver/internal/sdk/models/components/countinfo.go new file mode 100644 index 00000000..69513d56 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/countinfo.go @@ -0,0 +1,32 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CountInfo struct { + // The counter value + Count int64 `json:"count"` + Period *Period `json:"period,omitempty"` + // The unit of organization over which we did the count aggregation, e.g. org (department) or company + Org *string `json:"org,omitempty"` +} + +func (o *CountInfo) GetCount() int64 { + if o == nil { + return 0 + } + return o.Count +} + +func (o *CountInfo) GetPeriod() *Period { + if o == nil { + return nil + } + return o.Period +} + +func (o *CountInfo) GetOrg() *string { + if o == nil { + return nil + } + return o.Org +} diff --git a/tests/mockserver/internal/sdk/models/components/createannouncementrequest.go b/tests/mockserver/internal/sdk/models/components/createannouncementrequest.go new file mode 100644 index 00000000..0b4ba354 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/createannouncementrequest.go @@ -0,0 +1,201 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +// CreateAnnouncementRequestChannel - This determines whether this is a Social Feed post or a regular announcement. +type CreateAnnouncementRequestChannel string + +const ( + CreateAnnouncementRequestChannelMain CreateAnnouncementRequestChannel = "MAIN" + CreateAnnouncementRequestChannelSocialFeed CreateAnnouncementRequestChannel = "SOCIAL_FEED" +) + +func (e CreateAnnouncementRequestChannel) ToPointer() *CreateAnnouncementRequestChannel { + return &e +} +func (e *CreateAnnouncementRequestChannel) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "MAIN": + fallthrough + case "SOCIAL_FEED": + *e = CreateAnnouncementRequestChannel(v) + return nil + default: + return fmt.Errorf("invalid value for CreateAnnouncementRequestChannel: %v", v) + } +} + +// CreateAnnouncementRequestPostType - 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. +type CreateAnnouncementRequestPostType string + +const ( + CreateAnnouncementRequestPostTypeText CreateAnnouncementRequestPostType = "TEXT" + CreateAnnouncementRequestPostTypeLink CreateAnnouncementRequestPostType = "LINK" +) + +func (e CreateAnnouncementRequestPostType) ToPointer() *CreateAnnouncementRequestPostType { + return &e +} +func (e *CreateAnnouncementRequestPostType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "TEXT": + fallthrough + case "LINK": + *e = CreateAnnouncementRequestPostType(v) + return nil + default: + return fmt.Errorf("invalid value for CreateAnnouncementRequestPostType: %v", v) + } +} + +type CreateAnnouncementRequest struct { + // The date and time at which the announcement becomes active. + StartTime time.Time `json:"startTime"` + // The date and time at which the announcement expires. + EndTime time.Time `json:"endTime"` + // The headline of the announcement. + Title string `json:"title"` + Body *StructuredText `json:"body,omitempty"` + // An emoji used to indicate the nature of the announcement. + Emoji *string `json:"emoji,omitempty"` + Thumbnail *Thumbnail `json:"thumbnail,omitempty"` + Banner *Thumbnail `json:"banner,omitempty"` + // Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread). + SourceDocumentID *string `json:"sourceDocumentId,omitempty"` + // Whether or not to hide an author attribution. + HideAttribution *bool `json:"hideAttribution,omitempty"` + // This determines whether this is a Social Feed post or a regular announcement. + Channel *CreateAnnouncementRequestChannel `json:"channel,omitempty"` + // 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. + PostType *CreateAnnouncementRequestPostType `json:"postType,omitempty"` + // Used by the Social Feed to pin posts to the front of the feed. + IsPrioritized *bool `json:"isPrioritized,omitempty"` + // 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". + ViewURL *string `json:"viewUrl,omitempty"` +} + +func (c CreateAnnouncementRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *CreateAnnouncementRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *CreateAnnouncementRequest) GetStartTime() time.Time { + if o == nil { + return time.Time{} + } + return o.StartTime +} + +func (o *CreateAnnouncementRequest) GetEndTime() time.Time { + if o == nil { + return time.Time{} + } + return o.EndTime +} + +func (o *CreateAnnouncementRequest) GetTitle() string { + if o == nil { + return "" + } + return o.Title +} + +func (o *CreateAnnouncementRequest) GetBody() *StructuredText { + if o == nil { + return nil + } + return o.Body +} + +func (o *CreateAnnouncementRequest) GetEmoji() *string { + if o == nil { + return nil + } + return o.Emoji +} + +func (o *CreateAnnouncementRequest) GetThumbnail() *Thumbnail { + if o == nil { + return nil + } + return o.Thumbnail +} + +func (o *CreateAnnouncementRequest) GetBanner() *Thumbnail { + if o == nil { + return nil + } + return o.Banner +} + +func (o *CreateAnnouncementRequest) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *CreateAnnouncementRequest) GetSourceDocumentID() *string { + if o == nil { + return nil + } + return o.SourceDocumentID +} + +func (o *CreateAnnouncementRequest) GetHideAttribution() *bool { + if o == nil { + return nil + } + return o.HideAttribution +} + +func (o *CreateAnnouncementRequest) GetChannel() *CreateAnnouncementRequestChannel { + if o == nil { + return nil + } + return o.Channel +} + +func (o *CreateAnnouncementRequest) GetPostType() *CreateAnnouncementRequestPostType { + if o == nil { + return nil + } + return o.PostType +} + +func (o *CreateAnnouncementRequest) GetIsPrioritized() *bool { + if o == nil { + return nil + } + return o.IsPrioritized +} + +func (o *CreateAnnouncementRequest) GetViewURL() *string { + if o == nil { + return nil + } + return o.ViewURL +} diff --git a/tests/mockserver/internal/sdk/models/components/createanswerrequest.go b/tests/mockserver/internal/sdk/models/components/createanswerrequest.go new file mode 100644 index 00000000..e15c5837 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/createanswerrequest.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CreateAnswerRequest struct { + Data AnswerCreationData `json:"data"` +} + +func (o *CreateAnswerRequest) GetData() AnswerCreationData { + if o == nil { + return AnswerCreationData{} + } + return o.Data +} diff --git a/tests/mockserver/internal/sdk/models/components/createauthtokenresponse.go b/tests/mockserver/internal/sdk/models/components/createauthtokenresponse.go new file mode 100644 index 00000000..eaf8d515 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/createauthtokenresponse.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CreateAuthTokenResponse struct { + // An authentication token that can be passed to any endpoint via Bearer Authentication + Token string `json:"token"` + // Unix timestamp for when this token expires (in seconds since epoch UTC). + ExpirationTime int64 `json:"expirationTime"` +} + +func (o *CreateAuthTokenResponse) GetToken() string { + if o == nil { + return "" + } + return o.Token +} + +func (o *CreateAuthTokenResponse) GetExpirationTime() int64 { + if o == nil { + return 0 + } + return o.ExpirationTime +} diff --git a/tests/mockserver/internal/sdk/models/components/createcollectionrequest.go b/tests/mockserver/internal/sdk/models/components/createcollectionrequest.go new file mode 100644 index 00000000..0c58401f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/createcollectionrequest.go @@ -0,0 +1,104 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CreateCollectionRequest struct { + // The unique name of the Collection. + Name string `json:"name"` + // A brief summary of the Collection's contents. + Description *string `json:"description,omitempty"` + // A list of added user roles for the Collection. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of removed user roles for the Collection. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` + // Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // The emoji icon of this Collection. + Icon *string `json:"icon,omitempty"` + // Indicates whether edits are allowed for everyone or only admins. + AdminLocked *bool `json:"adminLocked,omitempty"` + // The parent of this Collection, or 0 if it's a top-level Collection. + ParentID *int64 `json:"parentId,omitempty"` + Thumbnail *Thumbnail `json:"thumbnail,omitempty"` + // The datasource type this Collection can hold. + AllowedDatasource *string `json:"allowedDatasource,omitempty"` + // 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. + NewNextItemID *string `json:"newNextItemId,omitempty"` +} + +func (o *CreateCollectionRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateCollectionRequest) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *CreateCollectionRequest) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *CreateCollectionRequest) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} + +func (o *CreateCollectionRequest) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *CreateCollectionRequest) GetIcon() *string { + if o == nil { + return nil + } + return o.Icon +} + +func (o *CreateCollectionRequest) GetAdminLocked() *bool { + if o == nil { + return nil + } + return o.AdminLocked +} + +func (o *CreateCollectionRequest) GetParentID() *int64 { + if o == nil { + return nil + } + return o.ParentID +} + +func (o *CreateCollectionRequest) GetThumbnail() *Thumbnail { + if o == nil { + return nil + } + return o.Thumbnail +} + +func (o *CreateCollectionRequest) GetAllowedDatasource() *string { + if o == nil { + return nil + } + return o.AllowedDatasource +} + +func (o *CreateCollectionRequest) GetNewNextItemID() *string { + if o == nil { + return nil + } + return o.NewNextItemID +} diff --git a/tests/mockserver/internal/sdk/models/components/createcollectionresponse.go b/tests/mockserver/internal/sdk/models/components/createcollectionresponse.go new file mode 100644 index 00000000..17efbef4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/createcollectionresponse.go @@ -0,0 +1,289 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +type CreateCollectionResponseErrorCode string + +const ( + CreateCollectionResponseErrorCodeNameExists CreateCollectionResponseErrorCode = "NAME_EXISTS" + CreateCollectionResponseErrorCodeNotFound CreateCollectionResponseErrorCode = "NOT_FOUND" + CreateCollectionResponseErrorCodeCollectionPinned CreateCollectionResponseErrorCode = "COLLECTION_PINNED" + CreateCollectionResponseErrorCodeConcurrentHierarchyEdit CreateCollectionResponseErrorCode = "CONCURRENT_HIERARCHY_EDIT" + CreateCollectionResponseErrorCodeHeightViolation CreateCollectionResponseErrorCode = "HEIGHT_VIOLATION" + CreateCollectionResponseErrorCodeWidthViolation CreateCollectionResponseErrorCode = "WIDTH_VIOLATION" + CreateCollectionResponseErrorCodeNoPermissions CreateCollectionResponseErrorCode = "NO_PERMISSIONS" +) + +func (e CreateCollectionResponseErrorCode) ToPointer() *CreateCollectionResponseErrorCode { + return &e +} +func (e *CreateCollectionResponseErrorCode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NAME_EXISTS": + fallthrough + case "NOT_FOUND": + fallthrough + case "COLLECTION_PINNED": + fallthrough + case "CONCURRENT_HIERARCHY_EDIT": + fallthrough + case "HEIGHT_VIOLATION": + fallthrough + case "WIDTH_VIOLATION": + fallthrough + case "NO_PERMISSIONS": + *e = CreateCollectionResponseErrorCode(v) + return nil + default: + return fmt.Errorf("invalid value for CreateCollectionResponseErrorCode: %v", v) + } +} + +type CreateCollectionResponse struct { + // The unique name of the Collection. + Name string `json:"name"` + // A brief summary of the Collection's contents. + Description string `json:"description"` + // A list of added user roles for the Collection. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of removed user roles for the Collection. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` + // Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // The emoji icon of this Collection. + Icon *string `json:"icon,omitempty"` + // Indicates whether edits are allowed for everyone or only admins. + AdminLocked *bool `json:"adminLocked,omitempty"` + // The parent of this Collection, or 0 if it's a top-level Collection. + ParentID *int64 `json:"parentId,omitempty"` + Thumbnail *Thumbnail `json:"thumbnail,omitempty"` + // The datasource type this Collection can hold. + AllowedDatasource *string `json:"allowedDatasource,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + // The unique ID of the Collection. + ID int64 `json:"id"` + CreateTime *time.Time `json:"createTime,omitempty"` + UpdateTime *time.Time `json:"updateTime,omitempty"` + Creator *Person `json:"creator,omitempty"` + UpdatedBy *Person `json:"updatedBy,omitempty"` + // The number of items currently in the Collection. Separated from the actual items so we can grab the count without items. + ItemCount *int64 `json:"itemCount,omitempty"` + // The number of children Collections. Separated from the actual children so we can grab the count without children. + ChildCount *int64 `json:"childCount,omitempty"` + // The items in this Collection. + Items []CollectionItem `json:"items,omitempty"` + PinMetadata *CollectionPinnedMetadata `json:"pinMetadata,omitempty"` + // The names of the shortcuts (Go Links) that point to this Collection. + Shortcuts []string `json:"shortcuts,omitempty"` + // The children Collections of this Collection. + Children []Collection `json:"children,omitempty"` + // A list of user roles for the Collection. + Roles []UserRoleSpecification `json:"roles,omitempty"` + ErrorCode CreateCollectionResponseErrorCode `json:"errorCode"` + Collection *Collection `json:"collection,omitempty"` + Error *CollectionError `json:"error,omitempty"` +} + +func (c CreateCollectionResponse) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *CreateCollectionResponse) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *CreateCollectionResponse) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CreateCollectionResponse) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +func (o *CreateCollectionResponse) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *CreateCollectionResponse) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} + +func (o *CreateCollectionResponse) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *CreateCollectionResponse) GetIcon() *string { + if o == nil { + return nil + } + return o.Icon +} + +func (o *CreateCollectionResponse) GetAdminLocked() *bool { + if o == nil { + return nil + } + return o.AdminLocked +} + +func (o *CreateCollectionResponse) GetParentID() *int64 { + if o == nil { + return nil + } + return o.ParentID +} + +func (o *CreateCollectionResponse) GetThumbnail() *Thumbnail { + if o == nil { + return nil + } + return o.Thumbnail +} + +func (o *CreateCollectionResponse) GetAllowedDatasource() *string { + if o == nil { + return nil + } + return o.AllowedDatasource +} + +func (o *CreateCollectionResponse) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *CreateCollectionResponse) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *CreateCollectionResponse) GetCreateTime() *time.Time { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *CreateCollectionResponse) GetUpdateTime() *time.Time { + if o == nil { + return nil + } + return o.UpdateTime +} + +func (o *CreateCollectionResponse) GetCreator() *Person { + if o == nil { + return nil + } + return o.Creator +} + +func (o *CreateCollectionResponse) GetUpdatedBy() *Person { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *CreateCollectionResponse) GetItemCount() *int64 { + if o == nil { + return nil + } + return o.ItemCount +} + +func (o *CreateCollectionResponse) GetChildCount() *int64 { + if o == nil { + return nil + } + return o.ChildCount +} + +func (o *CreateCollectionResponse) GetItems() []CollectionItem { + if o == nil { + return nil + } + return o.Items +} + +func (o *CreateCollectionResponse) GetPinMetadata() *CollectionPinnedMetadata { + if o == nil { + return nil + } + return o.PinMetadata +} + +func (o *CreateCollectionResponse) GetShortcuts() []string { + if o == nil { + return nil + } + return o.Shortcuts +} + +func (o *CreateCollectionResponse) GetChildren() []Collection { + if o == nil { + return nil + } + return o.Children +} + +func (o *CreateCollectionResponse) GetRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.Roles +} + +func (o *CreateCollectionResponse) GetErrorCode() CreateCollectionResponseErrorCode { + if o == nil { + return CreateCollectionResponseErrorCode("") + } + return o.ErrorCode +} + +func (o *CreateCollectionResponse) GetCollection() *Collection { + if o == nil { + return nil + } + return o.Collection +} + +func (o *CreateCollectionResponse) GetError() *CollectionError { + if o == nil { + return nil + } + return o.Error +} diff --git a/tests/mockserver/internal/sdk/models/components/createdlpreportrequest.go b/tests/mockserver/internal/sdk/models/components/createdlpreportrequest.go new file mode 100644 index 00000000..099d075e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/createdlpreportrequest.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CreateDlpReportRequest struct { + // Name of the policy being created. + Name *string `json:"name,omitempty"` + // Detailed configuration of what documents and sensitive content will be scanned. + Config *DlpConfig `json:"config,omitempty"` + // Interval between scans. DAILY is deprecated. + Frequency *DlpFrequency `json:"frequency,omitempty"` + // Controls whether the policy should hide documents with violations. + AutoHideDocs *bool `json:"autoHideDocs,omitempty"` +} + +func (o *CreateDlpReportRequest) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *CreateDlpReportRequest) GetConfig() *DlpConfig { + if o == nil { + return nil + } + return o.Config +} + +func (o *CreateDlpReportRequest) GetFrequency() *DlpFrequency { + if o == nil { + return nil + } + return o.Frequency +} + +func (o *CreateDlpReportRequest) GetAutoHideDocs() *bool { + if o == nil { + return nil + } + return o.AutoHideDocs +} diff --git a/tests/mockserver/internal/sdk/models/components/createdlpreportresponse.go b/tests/mockserver/internal/sdk/models/components/createdlpreportresponse.go new file mode 100644 index 00000000..9c9030bd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/createdlpreportresponse.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CreateDlpReportResponse struct { + // Full policy information that will be used for scans. + Report *DlpReport `json:"report,omitempty"` +} + +func (o *CreateDlpReportResponse) GetReport() *DlpReport { + if o == nil { + return nil + } + return o.Report +} diff --git a/tests/mockserver/internal/sdk/models/components/createshortcutrequest.go b/tests/mockserver/internal/sdk/models/components/createshortcutrequest.go new file mode 100644 index 00000000..f2502a18 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/createshortcutrequest.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CreateShortcutRequest struct { + Data ShortcutMutableProperties `json:"data"` +} + +func (o *CreateShortcutRequest) GetData() ShortcutMutableProperties { + if o == nil { + return ShortcutMutableProperties{} + } + return o.Data +} diff --git a/tests/mockserver/internal/sdk/models/components/createshortcutresponse.go b/tests/mockserver/internal/sdk/models/components/createshortcutresponse.go new file mode 100644 index 00000000..df363e8a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/createshortcutresponse.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CreateShortcutResponse struct { + Shortcut *Shortcut `json:"shortcut,omitempty"` + Error *ShortcutError `json:"error,omitempty"` +} + +func (o *CreateShortcutResponse) GetShortcut() *Shortcut { + if o == nil { + return nil + } + return o.Shortcut +} + +func (o *CreateShortcutResponse) GetError() *ShortcutError { + if o == nil { + return nil + } + return o.Error +} diff --git a/tests/mockserver/internal/sdk/models/components/customdatasourceconfig.go b/tests/mockserver/internal/sdk/models/components/customdatasourceconfig.go new file mode 100644 index 00000000..3214d4ac --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customdatasourceconfig.go @@ -0,0 +1,415 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" +) + +// DatasourceCategory - 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. +type DatasourceCategory string + +const ( + DatasourceCategoryUncategorized DatasourceCategory = "UNCATEGORIZED" + DatasourceCategoryTickets DatasourceCategory = "TICKETS" + DatasourceCategoryCrm DatasourceCategory = "CRM" + DatasourceCategoryPublishedContent DatasourceCategory = "PUBLISHED_CONTENT" + DatasourceCategoryCollaborativeContent DatasourceCategory = "COLLABORATIVE_CONTENT" + DatasourceCategoryQuestionAnswer DatasourceCategory = "QUESTION_ANSWER" + DatasourceCategoryMessaging DatasourceCategory = "MESSAGING" + DatasourceCategoryCodeRepository DatasourceCategory = "CODE_REPOSITORY" + DatasourceCategoryChangeManagement DatasourceCategory = "CHANGE_MANAGEMENT" + DatasourceCategoryPeople DatasourceCategory = "PEOPLE" + DatasourceCategoryEmail DatasourceCategory = "EMAIL" + DatasourceCategorySso DatasourceCategory = "SSO" + DatasourceCategoryAts DatasourceCategory = "ATS" + DatasourceCategoryKnowledgeHub DatasourceCategory = "KNOWLEDGE_HUB" + DatasourceCategoryExternalShortcut DatasourceCategory = "EXTERNAL_SHORTCUT" + DatasourceCategoryEntity DatasourceCategory = "ENTITY" + DatasourceCategoryCalendar DatasourceCategory = "CALENDAR" +) + +func (e DatasourceCategory) ToPointer() *DatasourceCategory { + return &e +} +func (e *DatasourceCategory) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "UNCATEGORIZED": + fallthrough + case "TICKETS": + fallthrough + case "CRM": + fallthrough + case "PUBLISHED_CONTENT": + fallthrough + case "COLLABORATIVE_CONTENT": + fallthrough + case "QUESTION_ANSWER": + fallthrough + case "MESSAGING": + fallthrough + case "CODE_REPOSITORY": + fallthrough + case "CHANGE_MANAGEMENT": + fallthrough + case "PEOPLE": + fallthrough + case "EMAIL": + fallthrough + case "SSO": + fallthrough + case "ATS": + fallthrough + case "KNOWLEDGE_HUB": + fallthrough + case "EXTERNAL_SHORTCUT": + fallthrough + case "ENTITY": + fallthrough + case "CALENDAR": + *e = DatasourceCategory(v) + return nil + default: + return fmt.Errorf("invalid value for DatasourceCategory: %v", v) + } +} + +type HideBuiltInFacet string + +const ( + HideBuiltInFacetType HideBuiltInFacet = "TYPE" + HideBuiltInFacetTag HideBuiltInFacet = "TAG" + HideBuiltInFacetAuthor HideBuiltInFacet = "AUTHOR" + HideBuiltInFacetOwner HideBuiltInFacet = "OWNER" +) + +func (e HideBuiltInFacet) ToPointer() *HideBuiltInFacet { + return &e +} +func (e *HideBuiltInFacet) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "TYPE": + fallthrough + case "TAG": + fallthrough + case "AUTHOR": + fallthrough + case "OWNER": + *e = HideBuiltInFacet(v) + return nil + default: + return fmt.Errorf("invalid value for HideBuiltInFacet: %v", v) + } +} + +// CustomDatasourceConfigConnectorType - The source from which document content was pulled, e.g. an API crawl or browser history +type CustomDatasourceConfigConnectorType string + +const ( + CustomDatasourceConfigConnectorTypeAPICrawl CustomDatasourceConfigConnectorType = "API_CRAWL" + CustomDatasourceConfigConnectorTypeBrowserCrawl CustomDatasourceConfigConnectorType = "BROWSER_CRAWL" + CustomDatasourceConfigConnectorTypeBrowserHistory CustomDatasourceConfigConnectorType = "BROWSER_HISTORY" + CustomDatasourceConfigConnectorTypeBuiltin CustomDatasourceConfigConnectorType = "BUILTIN" + CustomDatasourceConfigConnectorTypeFederatedSearch CustomDatasourceConfigConnectorType = "FEDERATED_SEARCH" + CustomDatasourceConfigConnectorTypePushAPI CustomDatasourceConfigConnectorType = "PUSH_API" + CustomDatasourceConfigConnectorTypeWebCrawl CustomDatasourceConfigConnectorType = "WEB_CRAWL" + CustomDatasourceConfigConnectorTypeNativeHistory CustomDatasourceConfigConnectorType = "NATIVE_HISTORY" +) + +func (e CustomDatasourceConfigConnectorType) ToPointer() *CustomDatasourceConfigConnectorType { + return &e +} +func (e *CustomDatasourceConfigConnectorType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "API_CRAWL": + fallthrough + case "BROWSER_CRAWL": + fallthrough + case "BROWSER_HISTORY": + fallthrough + case "BUILTIN": + fallthrough + case "FEDERATED_SEARCH": + fallthrough + case "PUSH_API": + fallthrough + case "WEB_CRAWL": + fallthrough + case "NATIVE_HISTORY": + *e = CustomDatasourceConfigConnectorType(v) + return nil + default: + return fmt.Errorf("invalid value for CustomDatasourceConfigConnectorType: %v", v) + } +} + +// CustomDatasourceConfig - Structure describing config properties of a custom datasource +type CustomDatasourceConfig struct { + // Unique identifier of datasource instance to which this config applies. + Name string `json:"name"` + // The user-friendly instance label to display. If omitted, falls back to the title-cased `name`. + DisplayName *string `json:"displayName,omitempty"` + // 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. + DatasourceCategory *DatasourceCategory `default:"UNCATEGORIZED" json:"datasourceCategory"` + // 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.** + URLRegex *string `json:"urlRegex,omitempty"` + // 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). + IconURL *string `json:"iconUrl,omitempty"` + // The list of top-level `objectType`s for the datasource. + ObjectDefinitions []ObjectDefinition `json:"objectDefinitions,omitempty"` + // Example text for what to search for in this datasource + SuggestionText *string `json:"suggestionText,omitempty"` + // The URL of the landing page for this datasource instance. Should point to the most useful page for users, not the company marketing page. + HomeURL *string `json:"homeUrl,omitempty"` + // This only applies to WEB_CRAWL and BROWSER_CRAWL datasources. Defines the seed URLs for crawling. + CrawlerSeedUrls []string `json:"crawlerSeedUrls,omitempty"` + // 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). + IconDarkURL *string `json:"iconDarkUrl,omitempty"` + // List of built-in facet types that should be hidden for the datasource. + HideBuiltInFacets []HideBuiltInFacet `json:"hideBuiltInFacets,omitempty"` + // 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. + CanonicalizingURLRegex []CanonicalizingRegexType `json:"canonicalizingURLRegex,omitempty"` + // A list of regular expressions to apply to an arbitrary title to transform it into a title that will be displayed in the search results + CanonicalizingTitleRegex []CanonicalizingRegexType `json:"canonicalizingTitleRegex,omitempty"` + // A regex that identifies titles that should not be indexed + RedlistTitleRegex *string `json:"redlistTitleRegex,omitempty"` + ConnectorType *CustomDatasourceConfigConnectorType `json:"connectorType,omitempty"` + // List of actions for this datasource instance that will show up in autocomplete and app card, e.g. "Create new issue" for jira + Quicklinks []Quicklink `json:"quicklinks,omitempty"` + // 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 + RenderConfigPreset *string `json:"renderConfigPreset,omitempty"` + // Aliases that can be used as `app` operator-values. + Aliases []string `json:"aliases,omitempty"` + // Whether or not this datasource is hosted on-premise. + IsOnPrem *bool `json:"isOnPrem,omitempty"` + // 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. + TrustURLRegexForViewActivity *bool `default:"true" json:"trustUrlRegexForViewActivity"` + // If true, a utm_source query param will be added to outbound links to this datasource within Glean. + IncludeUtmSource *bool `json:"includeUtmSource,omitempty"` + // If true, the fragment part of the URL will be stripped when converting to a canonical url. + StripFragmentInCanonicalURL *bool `default:"true" json:"stripFragmentInCanonicalUrl"` + // If the datasource uses another datasource for identity info, then the name of the datasource. The identity datasource must exist already. + IdentityDatasourceName *string `json:"identityDatasourceName,omitempty"` + // If the datasource uses a specific product access group, then the name of that group. + ProductAccessGroup *string `json:"productAccessGroup,omitempty"` + // whether email is used to reference users in document ACLs and in group memberships. + IsUserReferencedByEmail *bool `json:"isUserReferencedByEmail,omitempty"` + // True if this datasource is used to push custom entities. + IsEntityDatasource *bool `default:"false" json:"isEntityDatasource"` + // True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings. + IsTestDatasource *bool `default:"false" json:"isTestDatasource"` +} + +func (c CustomDatasourceConfig) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *CustomDatasourceConfig) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *CustomDatasourceConfig) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *CustomDatasourceConfig) GetDisplayName() *string { + if o == nil { + return nil + } + return o.DisplayName +} + +func (o *CustomDatasourceConfig) GetDatasourceCategory() *DatasourceCategory { + if o == nil { + return nil + } + return o.DatasourceCategory +} + +func (o *CustomDatasourceConfig) GetURLRegex() *string { + if o == nil { + return nil + } + return o.URLRegex +} + +func (o *CustomDatasourceConfig) GetIconURL() *string { + if o == nil { + return nil + } + return o.IconURL +} + +func (o *CustomDatasourceConfig) GetObjectDefinitions() []ObjectDefinition { + if o == nil { + return nil + } + return o.ObjectDefinitions +} + +func (o *CustomDatasourceConfig) GetSuggestionText() *string { + if o == nil { + return nil + } + return o.SuggestionText +} + +func (o *CustomDatasourceConfig) GetHomeURL() *string { + if o == nil { + return nil + } + return o.HomeURL +} + +func (o *CustomDatasourceConfig) GetCrawlerSeedUrls() []string { + if o == nil { + return nil + } + return o.CrawlerSeedUrls +} + +func (o *CustomDatasourceConfig) GetIconDarkURL() *string { + if o == nil { + return nil + } + return o.IconDarkURL +} + +func (o *CustomDatasourceConfig) GetHideBuiltInFacets() []HideBuiltInFacet { + if o == nil { + return nil + } + return o.HideBuiltInFacets +} + +func (o *CustomDatasourceConfig) GetCanonicalizingURLRegex() []CanonicalizingRegexType { + if o == nil { + return nil + } + return o.CanonicalizingURLRegex +} + +func (o *CustomDatasourceConfig) GetCanonicalizingTitleRegex() []CanonicalizingRegexType { + if o == nil { + return nil + } + return o.CanonicalizingTitleRegex +} + +func (o *CustomDatasourceConfig) GetRedlistTitleRegex() *string { + if o == nil { + return nil + } + return o.RedlistTitleRegex +} + +func (o *CustomDatasourceConfig) GetConnectorType() *CustomDatasourceConfigConnectorType { + if o == nil { + return nil + } + return o.ConnectorType +} + +func (o *CustomDatasourceConfig) GetQuicklinks() []Quicklink { + if o == nil { + return nil + } + return o.Quicklinks +} + +func (o *CustomDatasourceConfig) GetRenderConfigPreset() *string { + if o == nil { + return nil + } + return o.RenderConfigPreset +} + +func (o *CustomDatasourceConfig) GetAliases() []string { + if o == nil { + return nil + } + return o.Aliases +} + +func (o *CustomDatasourceConfig) GetIsOnPrem() *bool { + if o == nil { + return nil + } + return o.IsOnPrem +} + +func (o *CustomDatasourceConfig) GetTrustURLRegexForViewActivity() *bool { + if o == nil { + return nil + } + return o.TrustURLRegexForViewActivity +} + +func (o *CustomDatasourceConfig) GetIncludeUtmSource() *bool { + if o == nil { + return nil + } + return o.IncludeUtmSource +} + +func (o *CustomDatasourceConfig) GetStripFragmentInCanonicalURL() *bool { + if o == nil { + return nil + } + return o.StripFragmentInCanonicalURL +} + +func (o *CustomDatasourceConfig) GetIdentityDatasourceName() *string { + if o == nil { + return nil + } + return o.IdentityDatasourceName +} + +func (o *CustomDatasourceConfig) GetProductAccessGroup() *string { + if o == nil { + return nil + } + return o.ProductAccessGroup +} + +func (o *CustomDatasourceConfig) GetIsUserReferencedByEmail() *bool { + if o == nil { + return nil + } + return o.IsUserReferencedByEmail +} + +func (o *CustomDatasourceConfig) GetIsEntityDatasource() *bool { + if o == nil { + return nil + } + return o.IsEntityDatasource +} + +func (o *CustomDatasourceConfig) GetIsTestDatasource() *bool { + if o == nil { + return nil + } + return o.IsTestDatasource +} diff --git a/tests/mockserver/internal/sdk/models/components/customdatavalue.go b/tests/mockserver/internal/sdk/models/components/customdatavalue.go new file mode 100644 index 00000000..caf1db00 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customdatavalue.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CustomDataValue struct { + DisplayLabel *string `json:"displayLabel,omitempty"` + StringValue *string `json:"stringValue,omitempty"` + // list of strings for multi-value properties + StringListValue []string `json:"stringListValue,omitempty"` + NumberValue *float64 `json:"numberValue,omitempty"` + BooleanValue *bool `json:"booleanValue,omitempty"` +} + +func (o *CustomDataValue) GetDisplayLabel() *string { + if o == nil { + return nil + } + return o.DisplayLabel +} + +func (o *CustomDataValue) GetStringValue() *string { + if o == nil { + return nil + } + return o.StringValue +} + +func (o *CustomDataValue) GetStringListValue() []string { + if o == nil { + return nil + } + return o.StringListValue +} + +func (o *CustomDataValue) GetNumberValue() *float64 { + if o == nil { + return nil + } + return o.NumberValue +} + +func (o *CustomDataValue) GetBooleanValue() *bool { + if o == nil { + return nil + } + return o.BooleanValue +} diff --git a/tests/mockserver/internal/sdk/models/components/customentity.go b/tests/mockserver/internal/sdk/models/components/customentity.go new file mode 100644 index 00000000..5335d758 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customentity.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CustomEntity struct { + Permissions *ObjectPermissions `json:"permissions,omitempty"` + // Unique identifier. + ID *string `json:"id,omitempty"` + // Title or name of the custom entity. + Title *string `json:"title,omitempty"` + // The datasource the custom entity is from. + Datasource *string `json:"datasource,omitempty"` + // The type of the entity. Interpretation is specific to each datasource + ObjectType *string `json:"objectType,omitempty"` + Metadata *CustomEntityMetadata `json:"metadata,omitempty"` + // A list of user roles for the custom entity explicitly granted by the owner. + Roles []UserRoleSpecification `json:"roles,omitempty"` +} + +func (o *CustomEntity) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *CustomEntity) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *CustomEntity) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *CustomEntity) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *CustomEntity) GetObjectType() *string { + if o == nil { + return nil + } + return o.ObjectType +} + +func (o *CustomEntity) GetMetadata() *CustomEntityMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *CustomEntity) GetRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.Roles +} diff --git a/tests/mockserver/internal/sdk/models/components/customentitymetadata.go b/tests/mockserver/internal/sdk/models/components/customentitymetadata.go new file mode 100644 index 00000000..0425d0df --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customentitymetadata.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CustomEntityMetadata struct { + // Custom fields specific to individual datasources + CustomData map[string]CustomDataValue `json:"customData,omitempty"` +} + +func (o *CustomEntityMetadata) GetCustomData() map[string]CustomDataValue { + if o == nil { + return nil + } + return o.CustomData +} diff --git a/tests/mockserver/internal/sdk/models/components/customer.go b/tests/mockserver/internal/sdk/models/components/customer.go new file mode 100644 index 00000000..970097f4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customer.go @@ -0,0 +1,110 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" +) + +type Customer struct { + // Unique identifier. + ID string `json:"id"` + // Link to company's associated website domains. + Domains []string `json:"domains,omitempty"` + Company Company `json:"company"` + // A map of {string, int} pairs representing counts of each document type associated with this customer. + DocumentCounts map[string]int64 `json:"documentCounts,omitempty"` + // A list of POC for company. + Poc []Person `json:"poc,omitempty"` + Metadata *CustomerMetadata `json:"metadata,omitempty"` + // A list of Customers. + MergedCustomers []Customer `json:"mergedCustomers,omitempty"` + // The date when the interaction with customer started. + StartDate *types.Date `json:"startDate,omitempty"` + // Average contract annual revenue with that customer. + ContractAnnualRevenue *float64 `json:"contractAnnualRevenue,omitempty"` + // User facing (potentially generated) notes about company. + Notes *string `json:"notes,omitempty"` +} + +func (c Customer) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *Customer) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Customer) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Customer) GetDomains() []string { + if o == nil { + return nil + } + return o.Domains +} + +func (o *Customer) GetCompany() Company { + if o == nil { + return Company{} + } + return o.Company +} + +func (o *Customer) GetDocumentCounts() map[string]int64 { + if o == nil { + return nil + } + return o.DocumentCounts +} + +func (o *Customer) GetPoc() []Person { + if o == nil { + return nil + } + return o.Poc +} + +func (o *Customer) GetMetadata() *CustomerMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *Customer) GetMergedCustomers() []Customer { + if o == nil { + return nil + } + return o.MergedCustomers +} + +func (o *Customer) GetStartDate() *types.Date { + if o == nil { + return nil + } + return o.StartDate +} + +func (o *Customer) GetContractAnnualRevenue() *float64 { + if o == nil { + return nil + } + return o.ContractAnnualRevenue +} + +func (o *Customer) GetNotes() *string { + if o == nil { + return nil + } + return o.Notes +} diff --git a/tests/mockserver/internal/sdk/models/components/customermetadata.go b/tests/mockserver/internal/sdk/models/components/customermetadata.go new file mode 100644 index 00000000..4353ed64 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customermetadata.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CustomerMetadata struct { + // The user visible id of the salesforce customer account. + DatasourceID *string `json:"datasourceId,omitempty"` + // Custom fields specific to individual datasources + CustomData map[string]CustomDataValue `json:"customData,omitempty"` +} + +func (o *CustomerMetadata) GetDatasourceID() *string { + if o == nil { + return nil + } + return o.DatasourceID +} + +func (o *CustomerMetadata) GetCustomData() map[string]CustomDataValue { + if o == nil { + return nil + } + return o.CustomData +} diff --git a/tests/mockserver/internal/sdk/models/components/customfielddata.go b/tests/mockserver/internal/sdk/models/components/customfielddata.go new file mode 100644 index 00000000..465208a5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customfielddata.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" +) + +type CustomFieldData struct { + // A user-facing label for this field. + Label string `json:"label"` + Values []CustomFieldValue `json:"values"` + // Determines whether the client should display this custom field + Displayable *bool `default:"true" json:"displayable"` +} + +func (c CustomFieldData) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *CustomFieldData) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { + return err + } + return nil +} + +func (o *CustomFieldData) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *CustomFieldData) GetValues() []CustomFieldValue { + if o == nil { + return []CustomFieldValue{} + } + return o.Values +} + +func (o *CustomFieldData) GetDisplayable() *bool { + if o == nil { + return nil + } + return o.Displayable +} diff --git a/tests/mockserver/internal/sdk/models/components/customfieldvalue.go b/tests/mockserver/internal/sdk/models/components/customfieldvalue.go new file mode 100644 index 00000000..7797de4b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customfieldvalue.go @@ -0,0 +1,94 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/utils" +) + +type CustomFieldValueType string + +const ( + CustomFieldValueTypeCustomFieldValueStr CustomFieldValueType = "CustomFieldValueStr" + CustomFieldValueTypeCustomFieldValueHyperlink CustomFieldValueType = "CustomFieldValueHyperlink" + CustomFieldValueTypeCustomFieldValuePerson CustomFieldValueType = "CustomFieldValuePerson" +) + +type CustomFieldValue struct { + CustomFieldValueStr *CustomFieldValueStr + CustomFieldValueHyperlink *CustomFieldValueHyperlink + CustomFieldValuePerson *CustomFieldValuePerson + + Type CustomFieldValueType +} + +func CreateCustomFieldValueCustomFieldValueStr(customFieldValueStr CustomFieldValueStr) CustomFieldValue { + typ := CustomFieldValueTypeCustomFieldValueStr + + return CustomFieldValue{ + CustomFieldValueStr: &customFieldValueStr, + Type: typ, + } +} + +func CreateCustomFieldValueCustomFieldValueHyperlink(customFieldValueHyperlink CustomFieldValueHyperlink) CustomFieldValue { + typ := CustomFieldValueTypeCustomFieldValueHyperlink + + return CustomFieldValue{ + CustomFieldValueHyperlink: &customFieldValueHyperlink, + Type: typ, + } +} + +func CreateCustomFieldValueCustomFieldValuePerson(customFieldValuePerson CustomFieldValuePerson) CustomFieldValue { + typ := CustomFieldValueTypeCustomFieldValuePerson + + return CustomFieldValue{ + CustomFieldValuePerson: &customFieldValuePerson, + Type: typ, + } +} + +func (u *CustomFieldValue) UnmarshalJSON(data []byte) error { + + var customFieldValueStr CustomFieldValueStr = CustomFieldValueStr{} + if err := utils.UnmarshalJSON(data, &customFieldValueStr, "", true, true); err == nil { + u.CustomFieldValueStr = &customFieldValueStr + u.Type = CustomFieldValueTypeCustomFieldValueStr + return nil + } + + var customFieldValuePerson CustomFieldValuePerson = CustomFieldValuePerson{} + if err := utils.UnmarshalJSON(data, &customFieldValuePerson, "", true, true); err == nil { + u.CustomFieldValuePerson = &customFieldValuePerson + u.Type = CustomFieldValueTypeCustomFieldValuePerson + return nil + } + + var customFieldValueHyperlink CustomFieldValueHyperlink = CustomFieldValueHyperlink{} + if err := utils.UnmarshalJSON(data, &customFieldValueHyperlink, "", true, true); err == nil { + u.CustomFieldValueHyperlink = &customFieldValueHyperlink + u.Type = CustomFieldValueTypeCustomFieldValueHyperlink + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CustomFieldValue", string(data)) +} + +func (u CustomFieldValue) MarshalJSON() ([]byte, error) { + if u.CustomFieldValueStr != nil { + return utils.MarshalJSON(u.CustomFieldValueStr, "", true) + } + + if u.CustomFieldValueHyperlink != nil { + return utils.MarshalJSON(u.CustomFieldValueHyperlink, "", true) + } + + if u.CustomFieldValuePerson != nil { + return utils.MarshalJSON(u.CustomFieldValuePerson, "", true) + } + + return nil, errors.New("could not marshal union type CustomFieldValue: all fields are null") +} diff --git a/tests/mockserver/internal/sdk/models/components/customfieldvaluehyperlink.go b/tests/mockserver/internal/sdk/models/components/customfieldvaluehyperlink.go new file mode 100644 index 00000000..1fb0ff1e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customfieldvaluehyperlink.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CustomFieldValueHyperlink struct { + // Anchor text for hyperlink. + URLAnchor *string `json:"urlAnchor,omitempty"` + // Link for this URL. + URLLink *string `json:"urlLink,omitempty"` +} + +func (o *CustomFieldValueHyperlink) GetURLAnchor() *string { + if o == nil { + return nil + } + return o.URLAnchor +} + +func (o *CustomFieldValueHyperlink) GetURLLink() *string { + if o == nil { + return nil + } + return o.URLLink +} diff --git a/tests/mockserver/internal/sdk/models/components/customfieldvalueperson.go b/tests/mockserver/internal/sdk/models/components/customfieldvalueperson.go new file mode 100644 index 00000000..ce5cb139 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customfieldvalueperson.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CustomFieldValuePerson struct { + Person *Person `json:"person,omitempty"` +} + +func (o *CustomFieldValuePerson) GetPerson() *Person { + if o == nil { + return nil + } + return o.Person +} diff --git a/tests/mockserver/internal/sdk/models/components/customfieldvaluestr.go b/tests/mockserver/internal/sdk/models/components/customfieldvaluestr.go new file mode 100644 index 00000000..b05cc925 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customfieldvaluestr.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CustomFieldValueStr struct { + // Text field for string value. + StrText *string `json:"strText,omitempty"` +} + +func (o *CustomFieldValueStr) GetStrText() *string { + if o == nil { + return nil + } + return o.StrText +} diff --git a/tests/mockserver/internal/sdk/models/components/customproperty.go b/tests/mockserver/internal/sdk/models/components/customproperty.go new file mode 100644 index 00000000..8b4884e4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/customproperty.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// CustomProperty - Describes the custom properties of the object. +type CustomProperty struct { + Name *string `json:"name,omitempty"` + // 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. + Value any `json:"value,omitempty"` +} + +func (o *CustomProperty) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *CustomProperty) GetValue() any { + if o == nil { + return nil + } + return o.Value +} diff --git a/tests/mockserver/internal/sdk/models/components/datasourcebulkmembershipdefinition.go b/tests/mockserver/internal/sdk/models/components/datasourcebulkmembershipdefinition.go new file mode 100644 index 00000000..e7ccc6fd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/datasourcebulkmembershipdefinition.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DatasourceBulkMembershipDefinition - describes the membership row of a group in the bulk uploaded. Only one of memberUserId and memberGroupName can be specified. +type DatasourceBulkMembershipDefinition struct { + // If the member is a user, then the email or datasource id for the user + MemberUserID *string `json:"memberUserId,omitempty"` + // If the member is a group, then the name of the member group + MemberGroupName *string `json:"memberGroupName,omitempty"` +} + +func (o *DatasourceBulkMembershipDefinition) GetMemberUserID() *string { + if o == nil { + return nil + } + return o.MemberUserID +} + +func (o *DatasourceBulkMembershipDefinition) GetMemberGroupName() *string { + if o == nil { + return nil + } + return o.MemberGroupName +} diff --git a/tests/mockserver/internal/sdk/models/components/datasourcegroupdefinition.go b/tests/mockserver/internal/sdk/models/components/datasourcegroupdefinition.go new file mode 100644 index 00000000..cb959e6e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/datasourcegroupdefinition.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DatasourceGroupDefinition - describes a group in the datasource +type DatasourceGroupDefinition struct { + // name of the group. Should be unique among all groups for the datasource, and cannot have spaces. + Name string `json:"name"` +} + +func (o *DatasourceGroupDefinition) GetName() string { + if o == nil { + return "" + } + return o.Name +} diff --git a/tests/mockserver/internal/sdk/models/components/datasourcemembershipdefinition.go b/tests/mockserver/internal/sdk/models/components/datasourcemembershipdefinition.go new file mode 100644 index 00000000..9965fe61 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/datasourcemembershipdefinition.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DatasourceMembershipDefinition - describes the membership row of a group. Only one of memberUserId and memberGroupName can be specified. +type DatasourceMembershipDefinition struct { + // The group for which the membership is specified + GroupName string `json:"groupName"` + // If the member is a user, then the email or datasource id for the user + MemberUserID *string `json:"memberUserId,omitempty"` + // If the member is a group, then the name of the member group + MemberGroupName *string `json:"memberGroupName,omitempty"` +} + +func (o *DatasourceMembershipDefinition) GetGroupName() string { + if o == nil { + return "" + } + return o.GroupName +} + +func (o *DatasourceMembershipDefinition) GetMemberUserID() *string { + if o == nil { + return nil + } + return o.MemberUserID +} + +func (o *DatasourceMembershipDefinition) GetMemberGroupName() *string { + if o == nil { + return nil + } + return o.MemberGroupName +} diff --git a/tests/mockserver/internal/sdk/models/components/datasourceobjecttypedocumentcountentry.go b/tests/mockserver/internal/sdk/models/components/datasourceobjecttypedocumentcountentry.go new file mode 100644 index 00000000..19bdf977 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/datasourceobjecttypedocumentcountentry.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DatasourceObjectTypeDocumentCountEntry struct { + // The object type of the document + ObjectType *string `json:"objectType,omitempty"` + // The number of documents of the corresponding objectType + Count *int64 `json:"count,omitempty"` +} + +func (o *DatasourceObjectTypeDocumentCountEntry) GetObjectType() *string { + if o == nil { + return nil + } + return o.ObjectType +} + +func (o *DatasourceObjectTypeDocumentCountEntry) GetCount() *int64 { + if o == nil { + return nil + } + return o.Count +} diff --git a/tests/mockserver/internal/sdk/models/components/datasourceprofile.go b/tests/mockserver/internal/sdk/models/components/datasourceprofile.go new file mode 100644 index 00000000..e3e5c141 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/datasourceprofile.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DatasourceProfile struct { + // The datasource the profile is of. + Datasource string `json:"datasource"` + // The display name of the entity in the given datasource. + Handle string `json:"handle"` + // URL to view the entity's profile. + URL *string `json:"url,omitempty"` + // A deep link, if available, into the datasource's native application for the entity's platform (i.e. slack://...). + NativeAppURL *string `json:"nativeAppUrl,omitempty"` + // 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) + IsUserGenerated *bool `json:"isUserGenerated,omitempty"` +} + +func (o *DatasourceProfile) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *DatasourceProfile) GetHandle() string { + if o == nil { + return "" + } + return o.Handle +} + +func (o *DatasourceProfile) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *DatasourceProfile) GetNativeAppURL() *string { + if o == nil { + return nil + } + return o.NativeAppURL +} + +func (o *DatasourceProfile) GetIsUserGenerated() *bool { + if o == nil { + return nil + } + return o.IsUserGenerated +} diff --git a/tests/mockserver/internal/sdk/models/components/datasourceuserdefinition.go b/tests/mockserver/internal/sdk/models/components/datasourceuserdefinition.go new file mode 100644 index 00000000..d1431db7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/datasourceuserdefinition.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DatasourceUserDefinition - describes a user in the datasource +type DatasourceUserDefinition struct { + Email string `json:"email"` + // To be supplied if the user id in the datasource is not the email + UserID *string `json:"userId,omitempty"` + Name string `json:"name"` + // set to false if the user is a former employee or a bot + IsActive *bool `json:"isActive,omitempty"` +} + +func (o *DatasourceUserDefinition) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *DatasourceUserDefinition) GetUserID() *string { + if o == nil { + return nil + } + return o.UserID +} + +func (o *DatasourceUserDefinition) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *DatasourceUserDefinition) GetIsActive() *bool { + if o == nil { + return nil + } + return o.IsActive +} diff --git a/tests/mockserver/internal/sdk/models/components/debugdatasourcestatusidentityresponsecomponent.go b/tests/mockserver/internal/sdk/models/components/debugdatasourcestatusidentityresponsecomponent.go new file mode 100644 index 00000000..1eeda8b6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/debugdatasourcestatusidentityresponsecomponent.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DebugDatasourceStatusIdentityResponseComponentCounts struct { + // The number of users/groups/memberships uploaded + Uploaded *int64 `json:"uploaded,omitempty"` +} + +func (o *DebugDatasourceStatusIdentityResponseComponentCounts) GetUploaded() *int64 { + if o == nil { + return nil + } + return o.Uploaded +} + +type DebugDatasourceStatusIdentityResponseComponent struct { + // Information about active and recent successful uploads for the datasource + BulkUploadHistory []BulkUploadHistoryEvent `json:"bulkUploadHistory,omitempty"` + Counts *DebugDatasourceStatusIdentityResponseComponentCounts `json:"counts,omitempty"` +} + +func (o *DebugDatasourceStatusIdentityResponseComponent) GetBulkUploadHistory() []BulkUploadHistoryEvent { + if o == nil { + return nil + } + return o.BulkUploadHistory +} + +func (o *DebugDatasourceStatusIdentityResponseComponent) GetCounts() *DebugDatasourceStatusIdentityResponseComponentCounts { + if o == nil { + return nil + } + return o.Counts +} diff --git a/tests/mockserver/internal/sdk/models/components/debugdatasourcestatusresponse.go b/tests/mockserver/internal/sdk/models/components/debugdatasourcestatusresponse.go new file mode 100644 index 00000000..fe777e9b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/debugdatasourcestatusresponse.go @@ -0,0 +1,153 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type DebugDatasourceStatusResponseCounts struct { + // A list of object types and corresponding upload counts + Uploaded []DatasourceObjectTypeDocumentCountEntry `json:"uploaded,omitempty"` + // The number of documents indexed, grouped by objectType + Indexed []DatasourceObjectTypeDocumentCountEntry `json:"indexed,omitempty"` +} + +func (o *DebugDatasourceStatusResponseCounts) GetUploaded() []DatasourceObjectTypeDocumentCountEntry { + if o == nil { + return nil + } + return o.Uploaded +} + +func (o *DebugDatasourceStatusResponseCounts) GetIndexed() []DatasourceObjectTypeDocumentCountEntry { + if o == nil { + return nil + } + return o.Indexed +} + +type Documents struct { + // Information about active and recent successful uploads for the datasource + BulkUploadHistory []BulkUploadHistoryEvent `json:"bulkUploadHistory,omitempty"` + Counts *DebugDatasourceStatusResponseCounts `json:"counts,omitempty"` + // Information about processing history for the datasource + ProcessingHistory []ProcessingHistoryEvent `json:"processingHistory,omitempty"` +} + +func (o *Documents) GetBulkUploadHistory() []BulkUploadHistoryEvent { + if o == nil { + return nil + } + return o.BulkUploadHistory +} + +func (o *Documents) GetCounts() *DebugDatasourceStatusResponseCounts { + if o == nil { + return nil + } + return o.Counts +} + +func (o *Documents) GetProcessingHistory() []ProcessingHistoryEvent { + if o == nil { + return nil + } + return o.ProcessingHistory +} + +type Identity struct { + // Information about processing history for the datasource + ProcessingHistory []ProcessingHistoryEvent `json:"processingHistory,omitempty"` + Users *DebugDatasourceStatusIdentityResponseComponent `json:"users,omitempty"` + Groups *DebugDatasourceStatusIdentityResponseComponent `json:"groups,omitempty"` + Memberships *DebugDatasourceStatusIdentityResponseComponent `json:"memberships,omitempty"` +} + +func (o *Identity) GetProcessingHistory() []ProcessingHistoryEvent { + if o == nil { + return nil + } + return o.ProcessingHistory +} + +func (o *Identity) GetUsers() *DebugDatasourceStatusIdentityResponseComponent { + if o == nil { + return nil + } + return o.Users +} + +func (o *Identity) GetGroups() *DebugDatasourceStatusIdentityResponseComponent { + if o == nil { + return nil + } + return o.Groups +} + +func (o *Identity) GetMemberships() *DebugDatasourceStatusIdentityResponseComponent { + if o == nil { + return nil + } + return o.Memberships +} + +// DatasourceVisibility - The visibility of the datasource, an enum of VISIBLE_TO_ALL, VISIBLE_TO_TEST_GROUP, NOT_VISIBLE +type DatasourceVisibility string + +const ( + DatasourceVisibilityEnabledForAll DatasourceVisibility = "ENABLED_FOR_ALL" + DatasourceVisibilityEnabledForTestGroup DatasourceVisibility = "ENABLED_FOR_TEST_GROUP" + DatasourceVisibilityNotEnabled DatasourceVisibility = "NOT_ENABLED" +) + +func (e DatasourceVisibility) ToPointer() *DatasourceVisibility { + return &e +} +func (e *DatasourceVisibility) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ENABLED_FOR_ALL": + fallthrough + case "ENABLED_FOR_TEST_GROUP": + fallthrough + case "NOT_ENABLED": + *e = DatasourceVisibility(v) + return nil + default: + return fmt.Errorf("invalid value for DatasourceVisibility: %v", v) + } +} + +// DebugDatasourceStatusResponse - Describes the response body of the /debug/{datasource}/status API call +type DebugDatasourceStatusResponse struct { + Documents *Documents `json:"documents,omitempty"` + Identity *Identity `json:"identity,omitempty"` + // The visibility of the datasource, an enum of VISIBLE_TO_ALL, VISIBLE_TO_TEST_GROUP, NOT_VISIBLE + DatasourceVisibility *DatasourceVisibility `json:"datasourceVisibility,omitempty"` +} + +func (o *DebugDatasourceStatusResponse) GetDocuments() *Documents { + if o == nil { + return nil + } + return o.Documents +} + +func (o *DebugDatasourceStatusResponse) GetIdentity() *Identity { + if o == nil { + return nil + } + return o.Identity +} + +func (o *DebugDatasourceStatusResponse) GetDatasourceVisibility() *DatasourceVisibility { + if o == nil { + return nil + } + return o.DatasourceVisibility +} diff --git a/tests/mockserver/internal/sdk/models/components/debugdocumentrequest.go b/tests/mockserver/internal/sdk/models/components/debugdocumentrequest.go new file mode 100644 index 00000000..2ccad29a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/debugdocumentrequest.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DebugDocumentRequest - Describes the request body of the /debug/{datasource}/document API call. +type DebugDocumentRequest struct { + // Object type of the document to get the status for. + ObjectType string `json:"objectType"` + // Glean Document ID within the datasource to get the status for. + DocID string `json:"docId"` +} + +func (o *DebugDocumentRequest) GetObjectType() string { + if o == nil { + return "" + } + return o.ObjectType +} + +func (o *DebugDocumentRequest) GetDocID() string { + if o == nil { + return "" + } + return o.DocID +} diff --git a/tests/mockserver/internal/sdk/models/components/debugdocumentresponse.go b/tests/mockserver/internal/sdk/models/components/debugdocumentresponse.go new file mode 100644 index 00000000..12fcd5cd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/debugdocumentresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DebugDocumentResponse - Describes the response body of the /debug/{datasource}/document API call +type DebugDocumentResponse struct { + // Describes the document status response body + Status *DocumentStatusResponse `json:"status,omitempty"` + // describes the access control details of the document + UploadedPermissions *DocumentPermissionsDefinition `json:"uploadedPermissions,omitempty"` +} + +func (o *DebugDocumentResponse) GetStatus() *DocumentStatusResponse { + if o == nil { + return nil + } + return o.Status +} + +func (o *DebugDocumentResponse) GetUploadedPermissions() *DocumentPermissionsDefinition { + if o == nil { + return nil + } + return o.UploadedPermissions +} diff --git a/tests/mockserver/internal/sdk/models/components/debugdocumentsrequest.go b/tests/mockserver/internal/sdk/models/components/debugdocumentsrequest.go new file mode 100644 index 00000000..545ba853 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/debugdocumentsrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DebugDocumentsRequest - Describes the request body of the /debug/{datasource}/documents API call. +type DebugDocumentsRequest struct { + // Documents to fetch debug information for + DebugDocuments []DebugDocumentRequest `json:"debugDocuments"` +} + +func (o *DebugDocumentsRequest) GetDebugDocuments() []DebugDocumentRequest { + if o == nil { + return []DebugDocumentRequest{} + } + return o.DebugDocuments +} diff --git a/tests/mockserver/internal/sdk/models/components/debugdocumentsresponse.go b/tests/mockserver/internal/sdk/models/components/debugdocumentsresponse.go new file mode 100644 index 00000000..b813fdd3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/debugdocumentsresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DebugDocumentsResponse - Describes the response body of a single document in the /debug/{datasource}/documents API call +type DebugDocumentsResponse struct { + // List of document ids/urls and their debug information + DocumentStatuses []DebugDocumentsResponseItem `json:"documentStatuses,omitempty"` +} + +func (o *DebugDocumentsResponse) GetDocumentStatuses() []DebugDocumentsResponseItem { + if o == nil { + return nil + } + return o.DocumentStatuses +} diff --git a/tests/mockserver/internal/sdk/models/components/debugdocumentsresponseitem.go b/tests/mockserver/internal/sdk/models/components/debugdocumentsresponseitem.go new file mode 100644 index 00000000..47e26f94 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/debugdocumentsresponseitem.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DebugDocumentsResponseItem - Describes the response body of a single document in the /debug/{datasource}/documents API call +type DebugDocumentsResponseItem struct { + // Id of the document + DocID *string `json:"docId,omitempty"` + // objectType of the document + ObjectType *string `json:"objectType,omitempty"` + // Describes the response body of the /debug/{datasource}/document API call + DebugInfo *DebugDocumentResponse `json:"debugInfo,omitempty"` +} + +func (o *DebugDocumentsResponseItem) GetDocID() *string { + if o == nil { + return nil + } + return o.DocID +} + +func (o *DebugDocumentsResponseItem) GetObjectType() *string { + if o == nil { + return nil + } + return o.ObjectType +} + +func (o *DebugDocumentsResponseItem) GetDebugInfo() *DebugDocumentResponse { + if o == nil { + return nil + } + return o.DebugInfo +} diff --git a/tests/mockserver/internal/sdk/models/components/debuguserrequest.go b/tests/mockserver/internal/sdk/models/components/debuguserrequest.go new file mode 100644 index 00000000..fe3f914a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/debuguserrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DebugUserRequest - Describes the request body of the /debug/{datasource}/user API call +type DebugUserRequest struct { + // Email ID of the user to get the status for + Email string `json:"email"` +} + +func (o *DebugUserRequest) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} diff --git a/tests/mockserver/internal/sdk/models/components/debuguserresponse.go b/tests/mockserver/internal/sdk/models/components/debuguserresponse.go new file mode 100644 index 00000000..3f6cca7c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/debuguserresponse.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DebugUserResponse - Describes the response body of the /debug/{datasource}/user API call +type DebugUserResponse struct { + // Describes the user status response body + Status *UserStatusResponse `json:"status,omitempty"` + // List of groups the user is a member of, as uploaded via permissions API. + UploadedGroups []DatasourceGroupDefinition `json:"uploadedGroups,omitempty"` +} + +func (o *DebugUserResponse) GetStatus() *UserStatusResponse { + if o == nil { + return nil + } + return o.Status +} + +func (o *DebugUserResponse) GetUploadedGroups() []DatasourceGroupDefinition { + if o == nil { + return nil + } + return o.UploadedGroups +} diff --git a/tests/mockserver/internal/sdk/models/components/deleteannouncementrequest.go b/tests/mockserver/internal/sdk/models/components/deleteannouncementrequest.go new file mode 100644 index 00000000..15d931ea --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deleteannouncementrequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DeleteAnnouncementRequest struct { + // The opaque id of the announcement to be deleted. + ID int64 `json:"id"` +} + +func (o *DeleteAnnouncementRequest) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/deleteanswerrequest.go b/tests/mockserver/internal/sdk/models/components/deleteanswerrequest.go new file mode 100644 index 00000000..0ee5ee69 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deleteanswerrequest.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DeleteAnswerRequest struct { + // The opaque ID of the Answer. + ID int64 `json:"id"` + // 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. + DocID *string `json:"docId,omitempty"` +} + +func (o *DeleteAnswerRequest) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *DeleteAnswerRequest) GetDocID() *string { + if o == nil { + return nil + } + return o.DocID +} diff --git a/tests/mockserver/internal/sdk/models/components/deletechatfilesrequest.go b/tests/mockserver/internal/sdk/models/components/deletechatfilesrequest.go new file mode 100644 index 00000000..e955ca76 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deletechatfilesrequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DeleteChatFilesRequest struct { + // IDs of files to delete. + FileIds []string `json:"fileIds"` +} + +func (o *DeleteChatFilesRequest) GetFileIds() []string { + if o == nil { + return []string{} + } + return o.FileIds +} diff --git a/tests/mockserver/internal/sdk/models/components/deletechatsrequest.go b/tests/mockserver/internal/sdk/models/components/deletechatsrequest.go new file mode 100644 index 00000000..2f0acbf3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deletechatsrequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DeleteChatsRequest struct { + // A non-empty list of ids of the Chats to be deleted. + Ids []string `json:"ids"` +} + +func (o *DeleteChatsRequest) GetIds() []string { + if o == nil { + return []string{} + } + return o.Ids +} diff --git a/tests/mockserver/internal/sdk/models/components/deletecollectionitemrequest.go b/tests/mockserver/internal/sdk/models/components/deletecollectionitemrequest.go new file mode 100644 index 00000000..768919fc --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deletecollectionitemrequest.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DeleteCollectionItemRequest struct { + // The ID of the Collection to remove an item in. + CollectionID float64 `json:"collectionId"` + // The item ID of the CollectionItem to remove from this Collection. + ItemID string `json:"itemId"` + // The (optional) Glean Document ID of the CollectionItem to remove from this Collection if this is an indexed document. + DocumentID *string `json:"documentId,omitempty"` +} + +func (o *DeleteCollectionItemRequest) GetCollectionID() float64 { + if o == nil { + return 0.0 + } + return o.CollectionID +} + +func (o *DeleteCollectionItemRequest) GetItemID() string { + if o == nil { + return "" + } + return o.ItemID +} + +func (o *DeleteCollectionItemRequest) GetDocumentID() *string { + if o == nil { + return nil + } + return o.DocumentID +} diff --git a/tests/mockserver/internal/sdk/models/components/deletecollectionitemresponse.go b/tests/mockserver/internal/sdk/models/components/deletecollectionitemresponse.go new file mode 100644 index 00000000..94f10397 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deletecollectionitemresponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DeleteCollectionItemResponse struct { + Collection *Collection `json:"collection,omitempty"` +} + +func (o *DeleteCollectionItemResponse) GetCollection() *Collection { + if o == nil { + return nil + } + return o.Collection +} diff --git a/tests/mockserver/internal/sdk/models/components/deletecollectionrequest.go b/tests/mockserver/internal/sdk/models/components/deletecollectionrequest.go new file mode 100644 index 00000000..a3460a0a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deletecollectionrequest.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DeleteCollectionRequest struct { + // The IDs of the Collections to delete. + Ids []int64 `json:"ids"` + // The datasource allowed in the Collection to be deleted. + AllowedDatasource *string `json:"allowedDatasource,omitempty"` +} + +func (o *DeleteCollectionRequest) GetIds() []int64 { + if o == nil { + return []int64{} + } + return o.Ids +} + +func (o *DeleteCollectionRequest) GetAllowedDatasource() *string { + if o == nil { + return nil + } + return o.AllowedDatasource +} diff --git a/tests/mockserver/internal/sdk/models/components/deletedocumentrequest.go b/tests/mockserver/internal/sdk/models/components/deletedocumentrequest.go new file mode 100644 index 00000000..e103c1c4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deletedocumentrequest.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DeleteDocumentRequest - Describes the request body of the /deletedocument API call +type DeleteDocumentRequest struct { + // Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + Version *int64 `json:"version,omitempty"` + // datasource of the document + Datasource string `json:"datasource"` + // object type of the document + ObjectType string `json:"objectType"` + // The id of the document + ID string `json:"id"` +} + +func (o *DeleteDocumentRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} + +func (o *DeleteDocumentRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *DeleteDocumentRequest) GetObjectType() string { + if o == nil { + return "" + } + return o.ObjectType +} + +func (o *DeleteDocumentRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/deleteemployeerequest.go b/tests/mockserver/internal/sdk/models/components/deleteemployeerequest.go new file mode 100644 index 00000000..0e582507 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deleteemployeerequest.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DeleteEmployeeRequest - Describes the request body of the /deleteemployee API call +type DeleteEmployeeRequest struct { + // Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + Version *int64 `json:"version,omitempty"` + // The deleted employee's email + EmployeeEmail string `json:"employeeEmail"` +} + +func (o *DeleteEmployeeRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} + +func (o *DeleteEmployeeRequest) GetEmployeeEmail() string { + if o == nil { + return "" + } + return o.EmployeeEmail +} diff --git a/tests/mockserver/internal/sdk/models/components/deletegrouprequest.go b/tests/mockserver/internal/sdk/models/components/deletegrouprequest.go new file mode 100644 index 00000000..4c6a7310 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deletegrouprequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DeleteGroupRequest - Describes the request body of the /deletegroup API call +type DeleteGroupRequest struct { + // Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + Version *int64 `json:"version,omitempty"` + // The datasource for which the group is removed + Datasource string `json:"datasource"` + // the name of the group to be deleted + GroupName string `json:"groupName"` +} + +func (o *DeleteGroupRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} + +func (o *DeleteGroupRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *DeleteGroupRequest) GetGroupName() string { + if o == nil { + return "" + } + return o.GroupName +} diff --git a/tests/mockserver/internal/sdk/models/components/deletemembershiprequest.go b/tests/mockserver/internal/sdk/models/components/deletemembershiprequest.go new file mode 100644 index 00000000..ed2ab708 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deletemembershiprequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DeleteMembershipRequest - Describes the request body of the /deletemembership API call +type DeleteMembershipRequest struct { + // Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + Version *int64 `json:"version,omitempty"` + // The datasource for which the membership is removed + Datasource string `json:"datasource"` + // describes the membership row of a group. Only one of memberUserId and memberGroupName can be specified. + Membership DatasourceMembershipDefinition `json:"membership"` +} + +func (o *DeleteMembershipRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} + +func (o *DeleteMembershipRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *DeleteMembershipRequest) GetMembership() DatasourceMembershipDefinition { + if o == nil { + return DatasourceMembershipDefinition{} + } + return o.Membership +} diff --git a/tests/mockserver/internal/sdk/models/components/deleteshortcutrequest.go b/tests/mockserver/internal/sdk/models/components/deleteshortcutrequest.go new file mode 100644 index 00000000..440f2958 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deleteshortcutrequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DeleteShortcutRequest struct { + // The opaque id of the user generated content. + ID int64 `json:"id"` +} + +func (o *DeleteShortcutRequest) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/deleteteamrequest.go b/tests/mockserver/internal/sdk/models/components/deleteteamrequest.go new file mode 100644 index 00000000..7d877567 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deleteteamrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DeleteTeamRequest - Describes the request body of the /deleteteam API call +type DeleteTeamRequest struct { + // The deleted team's id + ID string `json:"id"` +} + +func (o *DeleteTeamRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/deleteuserrequest.go b/tests/mockserver/internal/sdk/models/components/deleteuserrequest.go new file mode 100644 index 00000000..9e434013 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/deleteuserrequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DeleteUserRequest - Describes the request body of the /deleteuser API call +type DeleteUserRequest struct { + // Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + Version *int64 `json:"version,omitempty"` + // The datasource for which the user is removed + Datasource string `json:"datasource"` + // The email of the user to be deleted + Email string `json:"email"` +} + +func (o *DeleteUserRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} + +func (o *DeleteUserRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *DeleteUserRequest) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} diff --git a/tests/mockserver/internal/sdk/models/components/disambiguation.go b/tests/mockserver/internal/sdk/models/components/disambiguation.go new file mode 100644 index 00000000..4809f071 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/disambiguation.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// Disambiguation - A disambiguation between multiple entities with the same name +type Disambiguation struct { + // Name of the ambiguous entity + Name *string `json:"name,omitempty"` + // The unique id of the entity in the knowledge graph + ID *string `json:"id,omitempty"` + // The type of entity. + Type *EntityType `json:"type,omitempty"` +} + +func (o *Disambiguation) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *Disambiguation) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Disambiguation) GetType() *EntityType { + if o == nil { + return nil + } + return o.Type +} diff --git a/tests/mockserver/internal/sdk/models/components/displayablelistitemuiconfig.go b/tests/mockserver/internal/sdk/models/components/displayablelistitemuiconfig.go new file mode 100644 index 00000000..a0e60528 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/displayablelistitemuiconfig.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DisplayableListItemUIConfig - UI configurations for each item of the list +type DisplayableListItemUIConfig struct { + // show a "New" pill next to the item + ShowNewIndicator *bool `json:"showNewIndicator,omitempty"` +} + +func (o *DisplayableListItemUIConfig) GetShowNewIndicator() *bool { + if o == nil { + return nil + } + return o.ShowNewIndicator +} diff --git a/tests/mockserver/internal/sdk/models/components/dlpconfig.go b/tests/mockserver/internal/sdk/models/components/dlpconfig.go new file mode 100644 index 00000000..3502af7b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/dlpconfig.go @@ -0,0 +1,125 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DlpConfig - Detailed configuration of what documents and sensitive content will be scanned. +type DlpConfig struct { + // Synonymous with report/policy id. + Version *int64 `json:"version,omitempty"` + // DEPRECATED - use `sensitiveContentOptions` instead. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + SensitiveInfoTypes []SensitiveInfoType `json:"sensitiveInfoTypes,omitempty"` + // Controls which data-sources and what time-range to include in scans. + InputOptions *InputOptions `json:"inputOptions,omitempty"` + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + ExternalSharingOptions *ExternalSharingOptions `json:"externalSharingOptions,omitempty"` + // Controls how "shared" a document must be to get picked for scans. + BroadSharingOptions *SharingOptions `json:"broadSharingOptions,omitempty"` + // Options for defining sensitive content within scanned documents. + SensitiveContentOptions *SensitiveContentOptions `json:"sensitiveContentOptions,omitempty"` + ReportName *string `json:"reportName,omitempty"` + // Interval between scans. + Frequency *string `json:"frequency,omitempty"` + // Details about the person who created this report/policy. + CreatedBy *DlpPerson `json:"createdBy,omitempty"` + // Timestamp at which this configuration was created. + CreatedAt *string `json:"createdAt,omitempty"` + // redact quote in findings of the report + RedactQuote *bool `json:"redactQuote,omitempty"` + // auto hide documents with findings in the report + AutoHideDocs *bool `json:"autoHideDocs,omitempty"` + // 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. + AllowlistOptions *AllowlistOptions `json:"allowlistOptions,omitempty"` +} + +func (o *DlpConfig) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} + +func (o *DlpConfig) GetSensitiveInfoTypes() []SensitiveInfoType { + if o == nil { + return nil + } + return o.SensitiveInfoTypes +} + +func (o *DlpConfig) GetInputOptions() *InputOptions { + if o == nil { + return nil + } + return o.InputOptions +} + +func (o *DlpConfig) GetExternalSharingOptions() *ExternalSharingOptions { + if o == nil { + return nil + } + return o.ExternalSharingOptions +} + +func (o *DlpConfig) GetBroadSharingOptions() *SharingOptions { + if o == nil { + return nil + } + return o.BroadSharingOptions +} + +func (o *DlpConfig) GetSensitiveContentOptions() *SensitiveContentOptions { + if o == nil { + return nil + } + return o.SensitiveContentOptions +} + +func (o *DlpConfig) GetReportName() *string { + if o == nil { + return nil + } + return o.ReportName +} + +func (o *DlpConfig) GetFrequency() *string { + if o == nil { + return nil + } + return o.Frequency +} + +func (o *DlpConfig) GetCreatedBy() *DlpPerson { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *DlpConfig) GetCreatedAt() *string { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *DlpConfig) GetRedactQuote() *bool { + if o == nil { + return nil + } + return o.RedactQuote +} + +func (o *DlpConfig) GetAutoHideDocs() *bool { + if o == nil { + return nil + } + return o.AutoHideDocs +} + +func (o *DlpConfig) GetAllowlistOptions() *AllowlistOptions { + if o == nil { + return nil + } + return o.AllowlistOptions +} diff --git a/tests/mockserver/internal/sdk/models/components/dlpfrequency.go b/tests/mockserver/internal/sdk/models/components/dlpfrequency.go new file mode 100644 index 00000000..7c8f72b3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/dlpfrequency.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// DlpFrequency - Interval between scans. DAILY is deprecated. +type DlpFrequency string + +const ( + DlpFrequencyOnce DlpFrequency = "ONCE" + DlpFrequencyDaily DlpFrequency = "DAILY" + DlpFrequencyWeekly DlpFrequency = "WEEKLY" + DlpFrequencyContinuous DlpFrequency = "CONTINUOUS" + DlpFrequencyNone DlpFrequency = "NONE" +) + +func (e DlpFrequency) ToPointer() *DlpFrequency { + return &e +} +func (e *DlpFrequency) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ONCE": + fallthrough + case "DAILY": + fallthrough + case "WEEKLY": + fallthrough + case "CONTINUOUS": + fallthrough + case "NONE": + *e = DlpFrequency(v) + return nil + default: + return fmt.Errorf("invalid value for DlpFrequency: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/dlpperson.go b/tests/mockserver/internal/sdk/models/components/dlpperson.go new file mode 100644 index 00000000..1bcd022f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/dlpperson.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DlpPerson - Details about the person who created this report/policy. +type DlpPerson struct { + // The display name. + Name string `json:"name"` + // An opaque identifier that can be used to request metadata for a Person. + ObfuscatedID string `json:"obfuscatedId"` + Metadata *DlpPersonMetadata `json:"metadata,omitempty"` +} + +func (o *DlpPerson) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *DlpPerson) GetObfuscatedID() string { + if o == nil { + return "" + } + return o.ObfuscatedID +} + +func (o *DlpPerson) GetMetadata() *DlpPersonMetadata { + if o == nil { + return nil + } + return o.Metadata +} diff --git a/tests/mockserver/internal/sdk/models/components/dlppersonmetadata.go b/tests/mockserver/internal/sdk/models/components/dlppersonmetadata.go new file mode 100644 index 00000000..5baf03bb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/dlppersonmetadata.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DlpPersonMetadata struct { + // The first name of the person + FirstName *string `json:"firstName,omitempty"` + // The user's primary email address + Email *string `json:"email,omitempty"` +} + +func (o *DlpPersonMetadata) GetFirstName() *string { + if o == nil { + return nil + } + return o.FirstName +} + +func (o *DlpPersonMetadata) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} diff --git a/tests/mockserver/internal/sdk/models/components/dlpreport.go b/tests/mockserver/internal/sdk/models/components/dlpreport.go new file mode 100644 index 00000000..8e6ccffc --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/dlpreport.go @@ -0,0 +1,155 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type LastScanStatus string + +const ( + LastScanStatusPending LastScanStatus = "PENDING" + LastScanStatusSuccess LastScanStatus = "SUCCESS" + LastScanStatusFailure LastScanStatus = "FAILURE" + LastScanStatusCancelled LastScanStatus = "CANCELLED" + LastScanStatusCancelling LastScanStatus = "CANCELLING" + LastScanStatusActive LastScanStatus = "ACTIVE" +) + +func (e LastScanStatus) ToPointer() *LastScanStatus { + return &e +} +func (e *LastScanStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PENDING": + fallthrough + case "SUCCESS": + fallthrough + case "FAILURE": + fallthrough + case "CANCELLED": + fallthrough + case "CANCELLING": + fallthrough + case "ACTIVE": + *e = LastScanStatus(v) + return nil + default: + return fmt.Errorf("invalid value for LastScanStatus: %v", v) + } +} + +// DlpReport - Full policy information that will be used for scans. +type DlpReport struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + // Detailed configuration of what documents and sensitive content will be scanned. + Config *DlpConfig `json:"config,omitempty"` + // Interval between scans. DAILY is deprecated. + Frequency *DlpFrequency `json:"frequency,omitempty"` + // The status of the policy/report. Only ACTIVE status will be picked for scans. + Status *DlpReportStatus `json:"status,omitempty"` + // Details about the person who created this report/policy. + CreatedBy *DlpPerson `json:"createdBy,omitempty"` + // Timestamp at which the policy was created. + CreatedAt *string `json:"createdAt,omitempty"` + // Timestamp at which the policy was last updated. + LastUpdatedAt *string `json:"lastUpdatedAt,omitempty"` + // Auto hide documents with findings in the policy. + AutoHideDocs *bool `json:"autoHideDocs,omitempty"` + LastScanStatus *LastScanStatus `json:"lastScanStatus,omitempty"` + // The timestamp at which the report's last run/scan began. + LastScanStartTime *string `json:"lastScanStartTime,omitempty"` + // Details about the person who created this report/policy. + UpdatedBy *DlpPerson `json:"updatedBy,omitempty"` +} + +func (o *DlpReport) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *DlpReport) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *DlpReport) GetConfig() *DlpConfig { + if o == nil { + return nil + } + return o.Config +} + +func (o *DlpReport) GetFrequency() *DlpFrequency { + if o == nil { + return nil + } + return o.Frequency +} + +func (o *DlpReport) GetStatus() *DlpReportStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *DlpReport) GetCreatedBy() *DlpPerson { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *DlpReport) GetCreatedAt() *string { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *DlpReport) GetLastUpdatedAt() *string { + if o == nil { + return nil + } + return o.LastUpdatedAt +} + +func (o *DlpReport) GetAutoHideDocs() *bool { + if o == nil { + return nil + } + return o.AutoHideDocs +} + +func (o *DlpReport) GetLastScanStatus() *LastScanStatus { + if o == nil { + return nil + } + return o.LastScanStatus +} + +func (o *DlpReport) GetLastScanStartTime() *string { + if o == nil { + return nil + } + return o.LastScanStartTime +} + +func (o *DlpReport) GetUpdatedBy() *DlpPerson { + if o == nil { + return nil + } + return o.UpdatedBy +} diff --git a/tests/mockserver/internal/sdk/models/components/dlpreportstatus.go b/tests/mockserver/internal/sdk/models/components/dlpreportstatus.go new file mode 100644 index 00000000..6c4ea46f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/dlpreportstatus.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// DlpReportStatus - The status of the policy/report. Only ACTIVE status will be picked for scans. +type DlpReportStatus string + +const ( + DlpReportStatusActive DlpReportStatus = "ACTIVE" + DlpReportStatusInactive DlpReportStatus = "INACTIVE" + DlpReportStatusCancelled DlpReportStatus = "CANCELLED" + DlpReportStatusNone DlpReportStatus = "NONE" +) + +func (e DlpReportStatus) ToPointer() *DlpReportStatus { + return &e +} +func (e *DlpReportStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ACTIVE": + fallthrough + case "INACTIVE": + fallthrough + case "CANCELLED": + fallthrough + case "NONE": + *e = DlpReportStatus(v) + return nil + default: + return fmt.Errorf("invalid value for DlpReportStatus: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/dlpsimpleresult.go b/tests/mockserver/internal/sdk/models/components/dlpsimpleresult.go new file mode 100644 index 00000000..f75e7454 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/dlpsimpleresult.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type DlpSimpleResult string + +const ( + DlpSimpleResultSuccess DlpSimpleResult = "SUCCESS" + DlpSimpleResultFailure DlpSimpleResult = "FAILURE" +) + +func (e DlpSimpleResult) ToPointer() *DlpSimpleResult { + return &e +} +func (e *DlpSimpleResult) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "SUCCESS": + fallthrough + case "FAILURE": + *e = DlpSimpleResult(v) + return nil + default: + return fmt.Errorf("invalid value for DlpSimpleResult: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/document.go b/tests/mockserver/internal/sdk/models/components/document.go new file mode 100644 index 00000000..842cd5b2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/document.go @@ -0,0 +1,101 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Document struct { + // The Glean Document ID. + ID *string `json:"id,omitempty"` + // The app or other repository type from which the document was extracted + Datasource *string `json:"datasource,omitempty"` + // The source from which document content was pulled, e.g. an API crawl or browser history + ConnectorType *ConnectorType `json:"connectorType,omitempty"` + // The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). + DocType *string `json:"docType,omitempty"` + Content *DocumentContent `json:"content,omitempty"` + ContainerDocument *Document `json:"containerDocument,omitempty"` + ParentDocument *Document `json:"parentDocument,omitempty"` + // The title of the document. + Title *string `json:"title,omitempty"` + // A permalink for the document. + URL *string `json:"url,omitempty"` + Metadata *DocumentMetadata `json:"metadata,omitempty"` + // A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page. + Sections []DocumentSection `json:"sections,omitempty"` +} + +func (o *Document) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Document) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *Document) GetConnectorType() *ConnectorType { + if o == nil { + return nil + } + return o.ConnectorType +} + +func (o *Document) GetDocType() *string { + if o == nil { + return nil + } + return o.DocType +} + +func (o *Document) GetContent() *DocumentContent { + if o == nil { + return nil + } + return o.Content +} + +func (o *Document) GetContainerDocument() *Document { + if o == nil { + return nil + } + return o.ContainerDocument +} + +func (o *Document) GetParentDocument() *Document { + if o == nil { + return nil + } + return o.ParentDocument +} + +func (o *Document) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *Document) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *Document) GetMetadata() *DocumentMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *Document) GetSections() []DocumentSection { + if o == nil { + return nil + } + return o.Sections +} diff --git a/tests/mockserver/internal/sdk/models/components/documentcontent.go b/tests/mockserver/internal/sdk/models/components/documentcontent.go new file mode 100644 index 00000000..d935b850 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentcontent.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DocumentContent struct { + // The plaintext content of the document. + FullTextList []string `json:"fullTextList,omitempty"` +} + +func (o *DocumentContent) GetFullTextList() []string { + if o == nil { + return nil + } + return o.FullTextList +} diff --git a/tests/mockserver/internal/sdk/models/components/documentdefinition.go b/tests/mockserver/internal/sdk/models/components/documentdefinition.go new file mode 100644 index 00000000..d4e073eb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentdefinition.go @@ -0,0 +1,213 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DocumentDefinition - Indexable document structure +type DocumentDefinition struct { + // Document title, in plain text, if present. If not present, the title would be attempted to be extracted from the content. + Title *string `json:"title,omitempty"` + // 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. + Filename *string `json:"filename,omitempty"` + // The container name for the content (Folder for example for file content). + Container *string `json:"container,omitempty"` + // This represents the datasource sepcific id of the container. + ContainerDatasourceID *string `json:"containerDatasourceId,omitempty"` + // This represents the object type of the container. It cannot have spaces or _ + ContainerObjectType *string `json:"containerObjectType,omitempty"` + Datasource string `json:"datasource"` + // The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _ + ObjectType *string `json:"objectType,omitempty"` + // 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).**' + // + ViewURL *string `json:"viewURL,omitempty"` + // The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length. + ID *string `json:"id,omitempty"` + // Describes text content or base64 encoded binary content + Summary *ContentDefinition `json:"summary,omitempty"` + // Describes text content or base64 encoded binary content + Body *ContentDefinition `json:"body,omitempty"` + // Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. + Author *UserReferenceDefinition `json:"author,omitempty"` + // Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. + Owner *UserReferenceDefinition `json:"owner,omitempty"` + // describes the access control details of the document + Permissions *DocumentPermissionsDefinition `json:"permissions,omitempty"` + // The creation time, in epoch seconds. + CreatedAt *int64 `json:"createdAt,omitempty"` + // The last update time, in epoch seconds. + UpdatedAt *int64 `json:"updatedAt,omitempty"` + // Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. + UpdatedBy *UserReferenceDefinition `json:"updatedBy,omitempty"` + // Labels associated with the document. + Tags []string `json:"tags,omitempty"` + // describes the interactions on the document + Interactions *DocumentInteractionsDefinition `json:"interactions,omitempty"` + Status *string `json:"status,omitempty"` + // Additional variations of the URL that this document points to. + AdditionalUrls []string `json:"additionalUrls,omitempty"` + // Comments associated with the document. + Comments []CommentDefinition `json:"comments,omitempty"` + // Additional metadata properties of the document. These can surface as [facets and operators](https://developers.glean.com/docs/facets_and_operators_for_custom_datasources/). + CustomProperties []CustomProperty `json:"customProperties,omitempty"` +} + +func (o *DocumentDefinition) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *DocumentDefinition) GetFilename() *string { + if o == nil { + return nil + } + return o.Filename +} + +func (o *DocumentDefinition) GetContainer() *string { + if o == nil { + return nil + } + return o.Container +} + +func (o *DocumentDefinition) GetContainerDatasourceID() *string { + if o == nil { + return nil + } + return o.ContainerDatasourceID +} + +func (o *DocumentDefinition) GetContainerObjectType() *string { + if o == nil { + return nil + } + return o.ContainerObjectType +} + +func (o *DocumentDefinition) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *DocumentDefinition) GetObjectType() *string { + if o == nil { + return nil + } + return o.ObjectType +} + +func (o *DocumentDefinition) GetViewURL() *string { + if o == nil { + return nil + } + return o.ViewURL +} + +func (o *DocumentDefinition) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *DocumentDefinition) GetSummary() *ContentDefinition { + if o == nil { + return nil + } + return o.Summary +} + +func (o *DocumentDefinition) GetBody() *ContentDefinition { + if o == nil { + return nil + } + return o.Body +} + +func (o *DocumentDefinition) GetAuthor() *UserReferenceDefinition { + if o == nil { + return nil + } + return o.Author +} + +func (o *DocumentDefinition) GetOwner() *UserReferenceDefinition { + if o == nil { + return nil + } + return o.Owner +} + +func (o *DocumentDefinition) GetPermissions() *DocumentPermissionsDefinition { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *DocumentDefinition) GetCreatedAt() *int64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *DocumentDefinition) GetUpdatedAt() *int64 { + if o == nil { + return nil + } + return o.UpdatedAt +} + +func (o *DocumentDefinition) GetUpdatedBy() *UserReferenceDefinition { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *DocumentDefinition) GetTags() []string { + if o == nil { + return nil + } + return o.Tags +} + +func (o *DocumentDefinition) GetInteractions() *DocumentInteractionsDefinition { + if o == nil { + return nil + } + return o.Interactions +} + +func (o *DocumentDefinition) GetStatus() *string { + if o == nil { + return nil + } + return o.Status +} + +func (o *DocumentDefinition) GetAdditionalUrls() []string { + if o == nil { + return nil + } + return o.AdditionalUrls +} + +func (o *DocumentDefinition) GetComments() []CommentDefinition { + if o == nil { + return nil + } + return o.Comments +} + +func (o *DocumentDefinition) GetCustomProperties() []CustomProperty { + if o == nil { + return nil + } + return o.CustomProperties +} diff --git a/tests/mockserver/internal/sdk/models/components/documentinsight.go b/tests/mockserver/internal/sdk/models/components/documentinsight.go new file mode 100644 index 00000000..3b304aee --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentinsight.go @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DocumentInsight struct { + Document Document `json:"document"` + ViewCount *CountInfo `json:"viewCount,omitempty"` + VisitorCount *CountInfo `json:"visitorCount,omitempty"` +} + +func (o *DocumentInsight) GetDocument() Document { + if o == nil { + return Document{} + } + return o.Document +} + +func (o *DocumentInsight) GetViewCount() *CountInfo { + if o == nil { + return nil + } + return o.ViewCount +} + +func (o *DocumentInsight) GetVisitorCount() *CountInfo { + if o == nil { + return nil + } + return o.VisitorCount +} diff --git a/tests/mockserver/internal/sdk/models/components/documentinteractions.go b/tests/mockserver/internal/sdk/models/components/documentinteractions.go new file mode 100644 index 00000000..81376a14 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentinteractions.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DocumentInteractions struct { + // The count of comments (thread replies in the case of slack). + NumComments *int64 `json:"numComments,omitempty"` + // The count of reactions on the document. + NumReactions *int64 `json:"numReactions,omitempty"` + // To be deprecated in favor of reacts. A (potentially non-exhaustive) list of reactions for the document. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + Reactions []string `json:"reactions,omitempty"` + Reacts []Reaction `json:"reacts,omitempty"` + // Describes instances of someone posting a link to this document in one of our indexed datasources. + Shares []Share `json:"shares,omitempty"` + VisitorCount *CountInfo `json:"visitorCount,omitempty"` +} + +func (o *DocumentInteractions) GetNumComments() *int64 { + if o == nil { + return nil + } + return o.NumComments +} + +func (o *DocumentInteractions) GetNumReactions() *int64 { + if o == nil { + return nil + } + return o.NumReactions +} + +func (o *DocumentInteractions) GetReactions() []string { + if o == nil { + return nil + } + return o.Reactions +} + +func (o *DocumentInteractions) GetReacts() []Reaction { + if o == nil { + return nil + } + return o.Reacts +} + +func (o *DocumentInteractions) GetShares() []Share { + if o == nil { + return nil + } + return o.Shares +} + +func (o *DocumentInteractions) GetVisitorCount() *CountInfo { + if o == nil { + return nil + } + return o.VisitorCount +} diff --git a/tests/mockserver/internal/sdk/models/components/documentinteractionsdefinition.go b/tests/mockserver/internal/sdk/models/components/documentinteractionsdefinition.go new file mode 100644 index 00000000..f49af722 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentinteractionsdefinition.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DocumentInteractionsDefinition - describes the interactions on the document +type DocumentInteractionsDefinition struct { + NumViews *int64 `json:"numViews,omitempty"` + NumLikes *int64 `json:"numLikes,omitempty"` + NumComments *int64 `json:"numComments,omitempty"` +} + +func (o *DocumentInteractionsDefinition) GetNumViews() *int64 { + if o == nil { + return nil + } + return o.NumViews +} + +func (o *DocumentInteractionsDefinition) GetNumLikes() *int64 { + if o == nil { + return nil + } + return o.NumLikes +} + +func (o *DocumentInteractionsDefinition) GetNumComments() *int64 { + if o == nil { + return nil + } + return o.NumComments +} diff --git a/tests/mockserver/internal/sdk/models/components/documentmetadata.go b/tests/mockserver/internal/sdk/models/components/documentmetadata.go new file mode 100644 index 00000000..66a4dafb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentmetadata.go @@ -0,0 +1,366 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type DocumentMetadata struct { + Datasource *string `json:"datasource,omitempty"` + // The datasource instance from which the document was extracted. + DatasourceInstance *string `json:"datasourceInstance,omitempty"` + // 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). + ObjectType *string `json:"objectType,omitempty"` + // 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 + Container *string `json:"container,omitempty"` + // The Glean Document ID of the container. Uniquely identifies the container. + ContainerID *string `json:"containerId,omitempty"` + // 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. + SuperContainerID *string `json:"superContainerId,omitempty"` + // The id of the direct parent of the result. Interpretation is specific to each datasource (e.g. parent issue for Jira). cf. container + ParentID *string `json:"parentId,omitempty"` + MimeType *string `json:"mimeType,omitempty"` + // The index-wide unique identifier. + DocumentID *string `json:"documentId,omitempty"` + // A unique identifier used to represent the document in any logging or feedback requests in place of documentId. + LoggingID *string `json:"loggingId,omitempty"` + // Hash of the Glean Document ID. + DocumentIDHash *string `json:"documentIdHash,omitempty"` + CreateTime *time.Time `json:"createTime,omitempty"` + UpdateTime *time.Time `json:"updateTime,omitempty"` + Author *Person `json:"author,omitempty"` + Owner *Person `json:"owner,omitempty"` + // A list of people mentioned in the document. + MentionedPeople []Person `json:"mentionedPeople,omitempty"` + // The level of visibility of the document as understood by our system. + Visibility *DocumentVisibility `json:"visibility,omitempty"` + // 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).) + Components []string `json:"components,omitempty"` + // 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). + Status *string `json:"status,omitempty"` + // The status category of the result. Meant to be more general than status. Interpretation is specific to each datasource. + StatusCategory *string `json:"statusCategory,omitempty"` + // A list of stars associated with this result. "Pin" is an older name. + Pins []PinDocument `json:"pins,omitempty"` + // The document priority. Interpretation is datasource specific. + Priority *string `json:"priority,omitempty"` + AssignedTo *Person `json:"assignedTo,omitempty"` + UpdatedBy *Person `json:"updatedBy,omitempty"` + // A list of tags for the document. Interpretation is datasource specific. + Labels []string `json:"labels,omitempty"` + // A list of collections that the document belongs to. + Collections []Collection `json:"collections,omitempty"` + // The user-visible datasource specific id (e.g. Salesforce case number for example, GitHub PR number). + DatasourceID *string `json:"datasourceId,omitempty"` + Interactions *DocumentInteractions `json:"interactions,omitempty"` + Verification *Verification `json:"verification,omitempty"` + ViewerInfo *ViewerInfo `json:"viewerInfo,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + VisitCount *CountInfo `json:"visitCount,omitempty"` + // A list of shortcuts of which destination URL is for the document. + Shortcuts []Shortcut `json:"shortcuts,omitempty"` + // For file datasources like onedrive/github etc this has the path to the file + Path *string `json:"path,omitempty"` + // Custom fields specific to individual datasources + CustomData map[string]CustomDataValue `json:"customData,omitempty"` + // The document's document_category(.proto). + DocumentCategory *string `json:"documentCategory,omitempty"` + ContactPerson *Person `json:"contactPerson,omitempty"` + Thumbnail *Thumbnail `json:"thumbnail,omitempty"` + IndexStatus *IndexStatus `json:"indexStatus,omitempty"` + // 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. + Ancestors []Document `json:"ancestors,omitempty"` +} + +func (d DocumentMetadata) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(d, "", false) +} + +func (d *DocumentMetadata) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &d, "", false, false); err != nil { + return err + } + return nil +} + +func (o *DocumentMetadata) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *DocumentMetadata) GetDatasourceInstance() *string { + if o == nil { + return nil + } + return o.DatasourceInstance +} + +func (o *DocumentMetadata) GetObjectType() *string { + if o == nil { + return nil + } + return o.ObjectType +} + +func (o *DocumentMetadata) GetContainer() *string { + if o == nil { + return nil + } + return o.Container +} + +func (o *DocumentMetadata) GetContainerID() *string { + if o == nil { + return nil + } + return o.ContainerID +} + +func (o *DocumentMetadata) GetSuperContainerID() *string { + if o == nil { + return nil + } + return o.SuperContainerID +} + +func (o *DocumentMetadata) GetParentID() *string { + if o == nil { + return nil + } + return o.ParentID +} + +func (o *DocumentMetadata) GetMimeType() *string { + if o == nil { + return nil + } + return o.MimeType +} + +func (o *DocumentMetadata) GetDocumentID() *string { + if o == nil { + return nil + } + return o.DocumentID +} + +func (o *DocumentMetadata) GetLoggingID() *string { + if o == nil { + return nil + } + return o.LoggingID +} + +func (o *DocumentMetadata) GetDocumentIDHash() *string { + if o == nil { + return nil + } + return o.DocumentIDHash +} + +func (o *DocumentMetadata) GetCreateTime() *time.Time { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *DocumentMetadata) GetUpdateTime() *time.Time { + if o == nil { + return nil + } + return o.UpdateTime +} + +func (o *DocumentMetadata) GetAuthor() *Person { + if o == nil { + return nil + } + return o.Author +} + +func (o *DocumentMetadata) GetOwner() *Person { + if o == nil { + return nil + } + return o.Owner +} + +func (o *DocumentMetadata) GetMentionedPeople() []Person { + if o == nil { + return nil + } + return o.MentionedPeople +} + +func (o *DocumentMetadata) GetVisibility() *DocumentVisibility { + if o == nil { + return nil + } + return o.Visibility +} + +func (o *DocumentMetadata) GetComponents() []string { + if o == nil { + return nil + } + return o.Components +} + +func (o *DocumentMetadata) GetStatus() *string { + if o == nil { + return nil + } + return o.Status +} + +func (o *DocumentMetadata) GetStatusCategory() *string { + if o == nil { + return nil + } + return o.StatusCategory +} + +func (o *DocumentMetadata) GetPins() []PinDocument { + if o == nil { + return nil + } + return o.Pins +} + +func (o *DocumentMetadata) GetPriority() *string { + if o == nil { + return nil + } + return o.Priority +} + +func (o *DocumentMetadata) GetAssignedTo() *Person { + if o == nil { + return nil + } + return o.AssignedTo +} + +func (o *DocumentMetadata) GetUpdatedBy() *Person { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *DocumentMetadata) GetLabels() []string { + if o == nil { + return nil + } + return o.Labels +} + +func (o *DocumentMetadata) GetCollections() []Collection { + if o == nil { + return nil + } + return o.Collections +} + +func (o *DocumentMetadata) GetDatasourceID() *string { + if o == nil { + return nil + } + return o.DatasourceID +} + +func (o *DocumentMetadata) GetInteractions() *DocumentInteractions { + if o == nil { + return nil + } + return o.Interactions +} + +func (o *DocumentMetadata) GetVerification() *Verification { + if o == nil { + return nil + } + return o.Verification +} + +func (o *DocumentMetadata) GetViewerInfo() *ViewerInfo { + if o == nil { + return nil + } + return o.ViewerInfo +} + +func (o *DocumentMetadata) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *DocumentMetadata) GetVisitCount() *CountInfo { + if o == nil { + return nil + } + return o.VisitCount +} + +func (o *DocumentMetadata) GetShortcuts() []Shortcut { + if o == nil { + return nil + } + return o.Shortcuts +} + +func (o *DocumentMetadata) GetPath() *string { + if o == nil { + return nil + } + return o.Path +} + +func (o *DocumentMetadata) GetCustomData() map[string]CustomDataValue { + if o == nil { + return nil + } + return o.CustomData +} + +func (o *DocumentMetadata) GetDocumentCategory() *string { + if o == nil { + return nil + } + return o.DocumentCategory +} + +func (o *DocumentMetadata) GetContactPerson() *Person { + if o == nil { + return nil + } + return o.ContactPerson +} + +func (o *DocumentMetadata) GetThumbnail() *Thumbnail { + if o == nil { + return nil + } + return o.Thumbnail +} + +func (o *DocumentMetadata) GetIndexStatus() *IndexStatus { + if o == nil { + return nil + } + return o.IndexStatus +} + +func (o *DocumentMetadata) GetAncestors() []Document { + if o == nil { + return nil + } + return o.Ancestors +} diff --git a/tests/mockserver/internal/sdk/models/components/documentorerrorunion.go b/tests/mockserver/internal/sdk/models/components/documentorerrorunion.go new file mode 100644 index 00000000..9cd9ca11 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentorerrorunion.go @@ -0,0 +1,84 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/utils" +) + +type DocumentOrError struct { + // The text for error, reason. + Error *string `json:"error,omitempty"` +} + +func (o *DocumentOrError) GetError() *string { + if o == nil { + return nil + } + return o.Error +} + +type DocumentOrErrorUnionType string + +const ( + DocumentOrErrorUnionTypeDocument DocumentOrErrorUnionType = "Document" + DocumentOrErrorUnionTypeDocumentOrError DocumentOrErrorUnionType = "DocumentOrError" +) + +type DocumentOrErrorUnion struct { + Document *Document + DocumentOrError *DocumentOrError + + Type DocumentOrErrorUnionType +} + +func CreateDocumentOrErrorUnionDocument(document Document) DocumentOrErrorUnion { + typ := DocumentOrErrorUnionTypeDocument + + return DocumentOrErrorUnion{ + Document: &document, + Type: typ, + } +} + +func CreateDocumentOrErrorUnionDocumentOrError(documentOrError DocumentOrError) DocumentOrErrorUnion { + typ := DocumentOrErrorUnionTypeDocumentOrError + + return DocumentOrErrorUnion{ + DocumentOrError: &documentOrError, + Type: typ, + } +} + +func (u *DocumentOrErrorUnion) UnmarshalJSON(data []byte) error { + + var documentOrError DocumentOrError = DocumentOrError{} + if err := utils.UnmarshalJSON(data, &documentOrError, "", true, true); err == nil { + u.DocumentOrError = &documentOrError + u.Type = DocumentOrErrorUnionTypeDocumentOrError + return nil + } + + var document Document = Document{} + if err := utils.UnmarshalJSON(data, &document, "", true, true); err == nil { + u.Document = &document + u.Type = DocumentOrErrorUnionTypeDocument + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for DocumentOrErrorUnion", string(data)) +} + +func (u DocumentOrErrorUnion) MarshalJSON() ([]byte, error) { + if u.Document != nil { + return utils.MarshalJSON(u.Document, "", true) + } + + if u.DocumentOrError != nil { + return utils.MarshalJSON(u.DocumentOrError, "", true) + } + + return nil, errors.New("could not marshal union type DocumentOrErrorUnion: all fields are null") +} diff --git a/tests/mockserver/internal/sdk/models/components/documentpermissionsdefinition.go b/tests/mockserver/internal/sdk/models/components/documentpermissionsdefinition.go new file mode 100644 index 00000000..75459197 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentpermissionsdefinition.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DocumentPermissionsDefinition - describes the access control details of the document +type DocumentPermissionsDefinition struct { + // List of users who can view the document + AllowedUsers []UserReferenceDefinition `json:"allowedUsers,omitempty"` + // List of groups that can view the document + AllowedGroups []string `json:"allowedGroups,omitempty"` + // List of allowed group intersections. This describes a permissions constraint of the form ((GroupA AND GroupB AND GroupC) OR (GroupX AND GroupY) OR ... + AllowedGroupIntersections []PermissionsGroupIntersectionDefinition `json:"allowedGroupIntersections,omitempty"` + // If true, then any Glean user can view the document + AllowAnonymousAccess *bool `json:"allowAnonymousAccess,omitempty"` + // If true, then any user who has an account in the datasource can view the document. + AllowAllDatasourceUsersAccess *bool `json:"allowAllDatasourceUsersAccess,omitempty"` +} + +func (o *DocumentPermissionsDefinition) GetAllowedUsers() []UserReferenceDefinition { + if o == nil { + return nil + } + return o.AllowedUsers +} + +func (o *DocumentPermissionsDefinition) GetAllowedGroups() []string { + if o == nil { + return nil + } + return o.AllowedGroups +} + +func (o *DocumentPermissionsDefinition) GetAllowedGroupIntersections() []PermissionsGroupIntersectionDefinition { + if o == nil { + return nil + } + return o.AllowedGroupIntersections +} + +func (o *DocumentPermissionsDefinition) GetAllowAnonymousAccess() *bool { + if o == nil { + return nil + } + return o.AllowAnonymousAccess +} + +func (o *DocumentPermissionsDefinition) GetAllowAllDatasourceUsersAccess() *bool { + if o == nil { + return nil + } + return o.AllowAllDatasourceUsersAccess +} diff --git a/tests/mockserver/internal/sdk/models/components/documentsection.go b/tests/mockserver/internal/sdk/models/components/documentsection.go new file mode 100644 index 00000000..8c229694 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentsection.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type DocumentSection struct { + // The title of the document section (e.g. the section header). + Title *string `json:"title,omitempty"` + // The permalink of the document section. + URL *string `json:"url,omitempty"` +} + +func (o *DocumentSection) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *DocumentSection) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} diff --git a/tests/mockserver/internal/sdk/models/components/documentspecunion.go b/tests/mockserver/internal/sdk/models/components/documentspecunion.go new file mode 100644 index 00000000..13cf76b7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentspecunion.go @@ -0,0 +1,182 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "errors" + "fmt" + "mockserver/internal/sdk/utils" +) + +// DocumentSpecUgcType - The type of the user generated content (UGC datasource). +type DocumentSpecUgcType string + +const ( + DocumentSpecUgcTypeAnnouncements DocumentSpecUgcType = "ANNOUNCEMENTS" + DocumentSpecUgcTypeAnswers DocumentSpecUgcType = "ANSWERS" + DocumentSpecUgcTypeCollections DocumentSpecUgcType = "COLLECTIONS" + DocumentSpecUgcTypeShortcuts DocumentSpecUgcType = "SHORTCUTS" +) + +func (e DocumentSpecUgcType) ToPointer() *DocumentSpecUgcType { + return &e +} +func (e *DocumentSpecUgcType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ANNOUNCEMENTS": + fallthrough + case "ANSWERS": + fallthrough + case "COLLECTIONS": + fallthrough + case "SHORTCUTS": + *e = DocumentSpecUgcType(v) + return nil + default: + return fmt.Errorf("invalid value for DocumentSpecUgcType: %v", v) + } +} + +type DocumentSpec3 struct { + // The type of the user generated content (UGC datasource). + UgcType *DocumentSpecUgcType `json:"ugcType,omitempty"` + // The id for user generated content. + ContentID *int64 `json:"contentId,omitempty"` + // The specific type of the user generated content type. + DocType *string `json:"docType,omitempty"` +} + +func (o *DocumentSpec3) GetUgcType() *DocumentSpecUgcType { + if o == nil { + return nil + } + return o.UgcType +} + +func (o *DocumentSpec3) GetContentID() *int64 { + if o == nil { + return nil + } + return o.ContentID +} + +func (o *DocumentSpec3) GetDocType() *string { + if o == nil { + return nil + } + return o.DocType +} + +type DocumentSpec2 struct { + // The ID of the document. + ID *string `json:"id,omitempty"` +} + +func (o *DocumentSpec2) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +type DocumentSpec1 struct { + // The URL of the document. + URL *string `json:"url,omitempty"` +} + +func (o *DocumentSpec1) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +type DocumentSpecUnionType string + +const ( + DocumentSpecUnionTypeDocumentSpec1 DocumentSpecUnionType = "DocumentSpec_1" + DocumentSpecUnionTypeDocumentSpec2 DocumentSpecUnionType = "DocumentSpec_2" + DocumentSpecUnionTypeDocumentSpec3 DocumentSpecUnionType = "DocumentSpec_3" +) + +type DocumentSpecUnion struct { + DocumentSpec1 *DocumentSpec1 + DocumentSpec2 *DocumentSpec2 + DocumentSpec3 *DocumentSpec3 + + Type DocumentSpecUnionType +} + +func CreateDocumentSpecUnionDocumentSpec1(documentSpec1 DocumentSpec1) DocumentSpecUnion { + typ := DocumentSpecUnionTypeDocumentSpec1 + + return DocumentSpecUnion{ + DocumentSpec1: &documentSpec1, + Type: typ, + } +} + +func CreateDocumentSpecUnionDocumentSpec2(documentSpec2 DocumentSpec2) DocumentSpecUnion { + typ := DocumentSpecUnionTypeDocumentSpec2 + + return DocumentSpecUnion{ + DocumentSpec2: &documentSpec2, + Type: typ, + } +} + +func CreateDocumentSpecUnionDocumentSpec3(documentSpec3 DocumentSpec3) DocumentSpecUnion { + typ := DocumentSpecUnionTypeDocumentSpec3 + + return DocumentSpecUnion{ + DocumentSpec3: &documentSpec3, + Type: typ, + } +} + +func (u *DocumentSpecUnion) UnmarshalJSON(data []byte) error { + + var documentSpec1 DocumentSpec1 = DocumentSpec1{} + if err := utils.UnmarshalJSON(data, &documentSpec1, "", true, true); err == nil { + u.DocumentSpec1 = &documentSpec1 + u.Type = DocumentSpecUnionTypeDocumentSpec1 + return nil + } + + var documentSpec2 DocumentSpec2 = DocumentSpec2{} + if err := utils.UnmarshalJSON(data, &documentSpec2, "", true, true); err == nil { + u.DocumentSpec2 = &documentSpec2 + u.Type = DocumentSpecUnionTypeDocumentSpec2 + return nil + } + + var documentSpec3 DocumentSpec3 = DocumentSpec3{} + if err := utils.UnmarshalJSON(data, &documentSpec3, "", true, true); err == nil { + u.DocumentSpec3 = &documentSpec3 + u.Type = DocumentSpecUnionTypeDocumentSpec3 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for DocumentSpecUnion", string(data)) +} + +func (u DocumentSpecUnion) MarshalJSON() ([]byte, error) { + if u.DocumentSpec1 != nil { + return utils.MarshalJSON(u.DocumentSpec1, "", true) + } + + if u.DocumentSpec2 != nil { + return utils.MarshalJSON(u.DocumentSpec2, "", true) + } + + if u.DocumentSpec3 != nil { + return utils.MarshalJSON(u.DocumentSpec3, "", true) + } + + return nil, errors.New("could not marshal union type DocumentSpecUnion: all fields are null") +} diff --git a/tests/mockserver/internal/sdk/models/components/documentstatusresponse.go b/tests/mockserver/internal/sdk/models/components/documentstatusresponse.go new file mode 100644 index 00000000..72007844 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentstatusresponse.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DocumentStatusResponse - Describes the document status response body +type DocumentStatusResponse struct { + // Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN + UploadStatus *string `json:"uploadStatus,omitempty"` + // Time of last successful upload for the document, in ISO 8601 format + LastUploadedAt *string `json:"lastUploadedAt,omitempty"` + // Indexing status, enum of NOT_INDEXED, INDEXED, STATUS_UNKNOWN + IndexingStatus *string `json:"indexingStatus,omitempty"` + // Time of last successful indexing for the document, in ISO 8601 format + LastIndexedAt *string `json:"lastIndexedAt,omitempty"` + // 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`. + PermissionIdentityStatus *string `json:"permissionIdentityStatus,omitempty"` +} + +func (o *DocumentStatusResponse) GetUploadStatus() *string { + if o == nil { + return nil + } + return o.UploadStatus +} + +func (o *DocumentStatusResponse) GetLastUploadedAt() *string { + if o == nil { + return nil + } + return o.LastUploadedAt +} + +func (o *DocumentStatusResponse) GetIndexingStatus() *string { + if o == nil { + return nil + } + return o.IndexingStatus +} + +func (o *DocumentStatusResponse) GetLastIndexedAt() *string { + if o == nil { + return nil + } + return o.LastIndexedAt +} + +func (o *DocumentStatusResponse) GetPermissionIdentityStatus() *string { + if o == nil { + return nil + } + return o.PermissionIdentityStatus +} diff --git a/tests/mockserver/internal/sdk/models/components/documentvisibility.go b/tests/mockserver/internal/sdk/models/components/documentvisibility.go new file mode 100644 index 00000000..3d7e72b7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentvisibility.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// DocumentVisibility - The level of visibility of the document as understood by our system. +type DocumentVisibility string + +const ( + DocumentVisibilityPrivate DocumentVisibility = "PRIVATE" + DocumentVisibilitySpecificPeopleAndGroups DocumentVisibility = "SPECIFIC_PEOPLE_AND_GROUPS" + DocumentVisibilityDomainLink DocumentVisibility = "DOMAIN_LINK" + DocumentVisibilityDomainVisible DocumentVisibility = "DOMAIN_VISIBLE" + DocumentVisibilityPublicLink DocumentVisibility = "PUBLIC_LINK" + DocumentVisibilityPublicVisible DocumentVisibility = "PUBLIC_VISIBLE" +) + +func (e DocumentVisibility) ToPointer() *DocumentVisibility { + return &e +} +func (e *DocumentVisibility) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PRIVATE": + fallthrough + case "SPECIFIC_PEOPLE_AND_GROUPS": + fallthrough + case "DOMAIN_LINK": + fallthrough + case "DOMAIN_VISIBLE": + fallthrough + case "PUBLIC_LINK": + fallthrough + case "PUBLIC_VISIBLE": + *e = DocumentVisibility(v) + return nil + default: + return fmt.Errorf("invalid value for DocumentVisibility: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/documentvisibilityoverride.go b/tests/mockserver/internal/sdk/models/components/documentvisibilityoverride.go new file mode 100644 index 00000000..5d424357 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentvisibilityoverride.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// DocumentVisibilityOverrideOverride - The visibility-override state of the document. +type DocumentVisibilityOverrideOverride string + +const ( + DocumentVisibilityOverrideOverrideNone DocumentVisibilityOverrideOverride = "NONE" + DocumentVisibilityOverrideOverrideHideFromAll DocumentVisibilityOverrideOverride = "HIDE_FROM_ALL" + DocumentVisibilityOverrideOverrideHideFromGroups DocumentVisibilityOverrideOverride = "HIDE_FROM_GROUPS" + DocumentVisibilityOverrideOverrideHideFromAllExceptOwner DocumentVisibilityOverrideOverride = "HIDE_FROM_ALL_EXCEPT_OWNER" +) + +func (e DocumentVisibilityOverrideOverride) ToPointer() *DocumentVisibilityOverrideOverride { + return &e +} +func (e *DocumentVisibilityOverrideOverride) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NONE": + fallthrough + case "HIDE_FROM_ALL": + fallthrough + case "HIDE_FROM_GROUPS": + fallthrough + case "HIDE_FROM_ALL_EXCEPT_OWNER": + *e = DocumentVisibilityOverrideOverride(v) + return nil + default: + return fmt.Errorf("invalid value for DocumentVisibilityOverrideOverride: %v", v) + } +} + +type DocumentVisibilityOverride struct { + DocID *string `json:"docId,omitempty"` + // The visibility-override state of the document. + Override *DocumentVisibilityOverrideOverride `json:"override,omitempty"` +} + +func (o *DocumentVisibilityOverride) GetDocID() *string { + if o == nil { + return nil + } + return o.DocID +} + +func (o *DocumentVisibilityOverride) GetOverride() *DocumentVisibilityOverrideOverride { + if o == nil { + return nil + } + return o.Override +} diff --git a/tests/mockserver/internal/sdk/models/components/documentvisibilityupdateresult.go b/tests/mockserver/internal/sdk/models/components/documentvisibilityupdateresult.go new file mode 100644 index 00000000..5b76ae89 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/documentvisibilityupdateresult.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// DocumentVisibilityUpdateResultOverride - The visibility-override state of the document. +type DocumentVisibilityUpdateResultOverride string + +const ( + DocumentVisibilityUpdateResultOverrideNone DocumentVisibilityUpdateResultOverride = "NONE" + DocumentVisibilityUpdateResultOverrideHideFromAll DocumentVisibilityUpdateResultOverride = "HIDE_FROM_ALL" + DocumentVisibilityUpdateResultOverrideHideFromGroups DocumentVisibilityUpdateResultOverride = "HIDE_FROM_GROUPS" + DocumentVisibilityUpdateResultOverrideHideFromAllExceptOwner DocumentVisibilityUpdateResultOverride = "HIDE_FROM_ALL_EXCEPT_OWNER" +) + +func (e DocumentVisibilityUpdateResultOverride) ToPointer() *DocumentVisibilityUpdateResultOverride { + return &e +} +func (e *DocumentVisibilityUpdateResultOverride) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NONE": + fallthrough + case "HIDE_FROM_ALL": + fallthrough + case "HIDE_FROM_GROUPS": + fallthrough + case "HIDE_FROM_ALL_EXCEPT_OWNER": + *e = DocumentVisibilityUpdateResultOverride(v) + return nil + default: + return fmt.Errorf("invalid value for DocumentVisibilityUpdateResultOverride: %v", v) + } +} + +type DocumentVisibilityUpdateResult struct { + DocID *string `json:"docId,omitempty"` + // The visibility-override state of the document. + Override *DocumentVisibilityUpdateResultOverride `json:"override,omitempty"` + // Whether this document was successfully set to its desired visibility state. + Success *bool `json:"success,omitempty"` +} + +func (o *DocumentVisibilityUpdateResult) GetDocID() *string { + if o == nil { + return nil + } + return o.DocID +} + +func (o *DocumentVisibilityUpdateResult) GetOverride() *DocumentVisibilityUpdateResultOverride { + if o == nil { + return nil + } + return o.Override +} + +func (o *DocumentVisibilityUpdateResult) GetSuccess() *bool { + if o == nil { + return nil + } + return o.Success +} diff --git a/tests/mockserver/internal/sdk/models/components/editanswerrequest.go b/tests/mockserver/internal/sdk/models/components/editanswerrequest.go new file mode 100644 index 00000000..cbb07416 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/editanswerrequest.go @@ -0,0 +1,168 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type EditAnswerRequestSourceType string + +const ( + EditAnswerRequestSourceTypeDocument EditAnswerRequestSourceType = "DOCUMENT" + EditAnswerRequestSourceTypeAssistant EditAnswerRequestSourceType = "ASSISTANT" +) + +func (e EditAnswerRequestSourceType) ToPointer() *EditAnswerRequestSourceType { + return &e +} +func (e *EditAnswerRequestSourceType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DOCUMENT": + fallthrough + case "ASSISTANT": + *e = EditAnswerRequestSourceType(v) + return nil + default: + return fmt.Errorf("invalid value for EditAnswerRequestSourceType: %v", v) + } +} + +type EditAnswerRequest struct { + // The opaque ID of the Answer. + ID int64 `json:"id"` + // 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. + DocID *string `json:"docId,omitempty"` + Question *string `json:"question,omitempty"` + // Additional ways of phrasing this question. + QuestionVariations []string `json:"questionVariations,omitempty"` + // The plain text answer to the question. + BodyText *string `json:"bodyText,omitempty"` + // The parent board ID of this Answer, or 0 if it's a floating Answer. + BoardID *int64 `json:"boardId,omitempty"` + // Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // A list of user roles for the answer added by the owner. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of user roles for the answer removed by the owner. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` + // A list of roles for this answer explicitly granted by an owner, editor, or admin. + Roles []UserRoleSpecification `json:"roles,omitempty"` + SourceDocumentSpec *DocumentSpecUnion `json:"sourceDocumentSpec,omitempty"` + SourceType *EditAnswerRequestSourceType `json:"sourceType,omitempty"` + // IDs of Collections to which a document is added. + AddedCollections []int64 `json:"addedCollections,omitempty"` + // IDs of Collections from which a document is removed. + RemovedCollections []int64 `json:"removedCollections,omitempty"` + CombinedAnswerText *StructuredTextMutableProperties `json:"combinedAnswerText,omitempty"` +} + +func (o *EditAnswerRequest) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *EditAnswerRequest) GetDocID() *string { + if o == nil { + return nil + } + return o.DocID +} + +func (o *EditAnswerRequest) GetQuestion() *string { + if o == nil { + return nil + } + return o.Question +} + +func (o *EditAnswerRequest) GetQuestionVariations() []string { + if o == nil { + return nil + } + return o.QuestionVariations +} + +func (o *EditAnswerRequest) GetBodyText() *string { + if o == nil { + return nil + } + return o.BodyText +} + +func (o *EditAnswerRequest) GetBoardID() *int64 { + if o == nil { + return nil + } + return o.BoardID +} + +func (o *EditAnswerRequest) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *EditAnswerRequest) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *EditAnswerRequest) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} + +func (o *EditAnswerRequest) GetRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.Roles +} + +func (o *EditAnswerRequest) GetSourceDocumentSpec() *DocumentSpecUnion { + if o == nil { + return nil + } + return o.SourceDocumentSpec +} + +func (o *EditAnswerRequest) GetSourceType() *EditAnswerRequestSourceType { + if o == nil { + return nil + } + return o.SourceType +} + +func (o *EditAnswerRequest) GetAddedCollections() []int64 { + if o == nil { + return nil + } + return o.AddedCollections +} + +func (o *EditAnswerRequest) GetRemovedCollections() []int64 { + if o == nil { + return nil + } + return o.RemovedCollections +} + +func (o *EditAnswerRequest) GetCombinedAnswerText() *StructuredTextMutableProperties { + if o == nil { + return nil + } + return o.CombinedAnswerText +} diff --git a/tests/mockserver/internal/sdk/models/components/editcollectionitemrequest.go b/tests/mockserver/internal/sdk/models/components/editcollectionitemrequest.go new file mode 100644 index 00000000..d43b56a7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/editcollectionitemrequest.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type EditCollectionItemRequest struct { + // The optional name of the Collection item. + Name *string `json:"name,omitempty"` + // A helpful description of why this CollectionItem is in the Collection that it's in. + Description *string `json:"description,omitempty"` + // The emoji icon for this CollectionItem. Only used for Text type items. + Icon *string `json:"icon,omitempty"` + // The ID of the Collection to edit CollectionItems in. + CollectionID int64 `json:"collectionId"` + // The ID of the CollectionItem to edit. + ItemID string `json:"itemId"` +} + +func (o *EditCollectionItemRequest) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *EditCollectionItemRequest) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *EditCollectionItemRequest) GetIcon() *string { + if o == nil { + return nil + } + return o.Icon +} + +func (o *EditCollectionItemRequest) GetCollectionID() int64 { + if o == nil { + return 0 + } + return o.CollectionID +} + +func (o *EditCollectionItemRequest) GetItemID() string { + if o == nil { + return "" + } + return o.ItemID +} diff --git a/tests/mockserver/internal/sdk/models/components/editcollectionitemresponse.go b/tests/mockserver/internal/sdk/models/components/editcollectionitemresponse.go new file mode 100644 index 00000000..2d6a42bf --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/editcollectionitemresponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type EditCollectionItemResponse struct { + Collection *Collection `json:"collection,omitempty"` +} + +func (o *EditCollectionItemResponse) GetCollection() *Collection { + if o == nil { + return nil + } + return o.Collection +} diff --git a/tests/mockserver/internal/sdk/models/components/editcollectionrequest.go b/tests/mockserver/internal/sdk/models/components/editcollectionrequest.go new file mode 100644 index 00000000..ed60e373 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/editcollectionrequest.go @@ -0,0 +1,104 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type EditCollectionRequest struct { + // The unique name of the Collection. + Name string `json:"name"` + // A brief summary of the Collection's contents. + Description *string `json:"description,omitempty"` + // A list of added user roles for the Collection. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of removed user roles for the Collection. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` + // Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // The emoji icon of this Collection. + Icon *string `json:"icon,omitempty"` + // Indicates whether edits are allowed for everyone or only admins. + AdminLocked *bool `json:"adminLocked,omitempty"` + // The parent of this Collection, or 0 if it's a top-level Collection. + ParentID *int64 `json:"parentId,omitempty"` + Thumbnail *Thumbnail `json:"thumbnail,omitempty"` + // The datasource type this Collection can hold. + AllowedDatasource *string `json:"allowedDatasource,omitempty"` + // The ID of the Collection to modify. + ID int64 `json:"id"` +} + +func (o *EditCollectionRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *EditCollectionRequest) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *EditCollectionRequest) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *EditCollectionRequest) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} + +func (o *EditCollectionRequest) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *EditCollectionRequest) GetIcon() *string { + if o == nil { + return nil + } + return o.Icon +} + +func (o *EditCollectionRequest) GetAdminLocked() *bool { + if o == nil { + return nil + } + return o.AdminLocked +} + +func (o *EditCollectionRequest) GetParentID() *int64 { + if o == nil { + return nil + } + return o.ParentID +} + +func (o *EditCollectionRequest) GetThumbnail() *Thumbnail { + if o == nil { + return nil + } + return o.Thumbnail +} + +func (o *EditCollectionRequest) GetAllowedDatasource() *string { + if o == nil { + return nil + } + return o.AllowedDatasource +} + +func (o *EditCollectionRequest) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/editcollectionresponse.go b/tests/mockserver/internal/sdk/models/components/editcollectionresponse.go new file mode 100644 index 00000000..9cf6c7a4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/editcollectionresponse.go @@ -0,0 +1,289 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +type EditCollectionResponseErrorCode string + +const ( + EditCollectionResponseErrorCodeNameExists EditCollectionResponseErrorCode = "NAME_EXISTS" + EditCollectionResponseErrorCodeNotFound EditCollectionResponseErrorCode = "NOT_FOUND" + EditCollectionResponseErrorCodeCollectionPinned EditCollectionResponseErrorCode = "COLLECTION_PINNED" + EditCollectionResponseErrorCodeConcurrentHierarchyEdit EditCollectionResponseErrorCode = "CONCURRENT_HIERARCHY_EDIT" + EditCollectionResponseErrorCodeHeightViolation EditCollectionResponseErrorCode = "HEIGHT_VIOLATION" + EditCollectionResponseErrorCodeWidthViolation EditCollectionResponseErrorCode = "WIDTH_VIOLATION" + EditCollectionResponseErrorCodeNoPermissions EditCollectionResponseErrorCode = "NO_PERMISSIONS" +) + +func (e EditCollectionResponseErrorCode) ToPointer() *EditCollectionResponseErrorCode { + return &e +} +func (e *EditCollectionResponseErrorCode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NAME_EXISTS": + fallthrough + case "NOT_FOUND": + fallthrough + case "COLLECTION_PINNED": + fallthrough + case "CONCURRENT_HIERARCHY_EDIT": + fallthrough + case "HEIGHT_VIOLATION": + fallthrough + case "WIDTH_VIOLATION": + fallthrough + case "NO_PERMISSIONS": + *e = EditCollectionResponseErrorCode(v) + return nil + default: + return fmt.Errorf("invalid value for EditCollectionResponseErrorCode: %v", v) + } +} + +type EditCollectionResponse struct { + // The unique name of the Collection. + Name string `json:"name"` + // A brief summary of the Collection's contents. + Description string `json:"description"` + // A list of added user roles for the Collection. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of removed user roles for the Collection. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` + // Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // The emoji icon of this Collection. + Icon *string `json:"icon,omitempty"` + // Indicates whether edits are allowed for everyone or only admins. + AdminLocked *bool `json:"adminLocked,omitempty"` + // The parent of this Collection, or 0 if it's a top-level Collection. + ParentID *int64 `json:"parentId,omitempty"` + Thumbnail *Thumbnail `json:"thumbnail,omitempty"` + // The datasource type this Collection can hold. + AllowedDatasource *string `json:"allowedDatasource,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + // The unique ID of the Collection. + ID int64 `json:"id"` + CreateTime *time.Time `json:"createTime,omitempty"` + UpdateTime *time.Time `json:"updateTime,omitempty"` + Creator *Person `json:"creator,omitempty"` + UpdatedBy *Person `json:"updatedBy,omitempty"` + // The number of items currently in the Collection. Separated from the actual items so we can grab the count without items. + ItemCount *int64 `json:"itemCount,omitempty"` + // The number of children Collections. Separated from the actual children so we can grab the count without children. + ChildCount *int64 `json:"childCount,omitempty"` + // The items in this Collection. + Items []CollectionItem `json:"items,omitempty"` + PinMetadata *CollectionPinnedMetadata `json:"pinMetadata,omitempty"` + // The names of the shortcuts (Go Links) that point to this Collection. + Shortcuts []string `json:"shortcuts,omitempty"` + // The children Collections of this Collection. + Children []Collection `json:"children,omitempty"` + // A list of user roles for the Collection. + Roles []UserRoleSpecification `json:"roles,omitempty"` + ErrorCode EditCollectionResponseErrorCode `json:"errorCode"` + Collection *Collection `json:"collection,omitempty"` + Error *CollectionError `json:"error,omitempty"` +} + +func (e EditCollectionResponse) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(e, "", false) +} + +func (e *EditCollectionResponse) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &e, "", false, false); err != nil { + return err + } + return nil +} + +func (o *EditCollectionResponse) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *EditCollectionResponse) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +func (o *EditCollectionResponse) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *EditCollectionResponse) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} + +func (o *EditCollectionResponse) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *EditCollectionResponse) GetIcon() *string { + if o == nil { + return nil + } + return o.Icon +} + +func (o *EditCollectionResponse) GetAdminLocked() *bool { + if o == nil { + return nil + } + return o.AdminLocked +} + +func (o *EditCollectionResponse) GetParentID() *int64 { + if o == nil { + return nil + } + return o.ParentID +} + +func (o *EditCollectionResponse) GetThumbnail() *Thumbnail { + if o == nil { + return nil + } + return o.Thumbnail +} + +func (o *EditCollectionResponse) GetAllowedDatasource() *string { + if o == nil { + return nil + } + return o.AllowedDatasource +} + +func (o *EditCollectionResponse) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *EditCollectionResponse) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *EditCollectionResponse) GetCreateTime() *time.Time { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *EditCollectionResponse) GetUpdateTime() *time.Time { + if o == nil { + return nil + } + return o.UpdateTime +} + +func (o *EditCollectionResponse) GetCreator() *Person { + if o == nil { + return nil + } + return o.Creator +} + +func (o *EditCollectionResponse) GetUpdatedBy() *Person { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *EditCollectionResponse) GetItemCount() *int64 { + if o == nil { + return nil + } + return o.ItemCount +} + +func (o *EditCollectionResponse) GetChildCount() *int64 { + if o == nil { + return nil + } + return o.ChildCount +} + +func (o *EditCollectionResponse) GetItems() []CollectionItem { + if o == nil { + return nil + } + return o.Items +} + +func (o *EditCollectionResponse) GetPinMetadata() *CollectionPinnedMetadata { + if o == nil { + return nil + } + return o.PinMetadata +} + +func (o *EditCollectionResponse) GetShortcuts() []string { + if o == nil { + return nil + } + return o.Shortcuts +} + +func (o *EditCollectionResponse) GetChildren() []Collection { + if o == nil { + return nil + } + return o.Children +} + +func (o *EditCollectionResponse) GetRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.Roles +} + +func (o *EditCollectionResponse) GetErrorCode() EditCollectionResponseErrorCode { + if o == nil { + return EditCollectionResponseErrorCode("") + } + return o.ErrorCode +} + +func (o *EditCollectionResponse) GetCollection() *Collection { + if o == nil { + return nil + } + return o.Collection +} + +func (o *EditCollectionResponse) GetError() *CollectionError { + if o == nil { + return nil + } + return o.Error +} diff --git a/tests/mockserver/internal/sdk/models/components/editpinrequest.go b/tests/mockserver/internal/sdk/models/components/editpinrequest.go new file mode 100644 index 00000000..ab648e15 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/editpinrequest.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type EditPinRequest struct { + // The query strings for which the pinned result will show. + Queries []string `json:"queries,omitempty"` + // Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // The opaque id of the pin to be edited. + ID *string `json:"id,omitempty"` +} + +func (o *EditPinRequest) GetQueries() []string { + if o == nil { + return nil + } + return o.Queries +} + +func (o *EditPinRequest) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *EditPinRequest) GetID() *string { + if o == nil { + return nil + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/employeeinfodefinition.go b/tests/mockserver/internal/sdk/models/components/employeeinfodefinition.go new file mode 100644 index 00000000..91056ac5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/employeeinfodefinition.go @@ -0,0 +1,272 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" +) + +// EmployeeInfoDefinition - Describes employee info +type EmployeeInfoDefinition struct { + // The employee's email + Email string `json:"email"` + // The first name of the employee. **Note**: The value cannot be empty + // + FirstName *string `json:"firstName,omitempty"` + // The last name of the employee. **Note**: The value cannot be empty + // + LastName *string `json:"lastName,omitempty"` + // The preferred name or nickname of the employee + PreferredName *string `json:"preferredName,omitempty"` + // **[Advanced]** A unique universal internal identifier for the employee. This is solely used for understanding manager relationships along with `managerId`. + // + ID *string `json:"id,omitempty"` + // The employee's phone number. + PhoneNumber *string `json:"phoneNumber,omitempty"` + // The employee's location (city/office name etc). + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + Location *string `json:"location,omitempty"` + // Detailed location with information about country, state, city etc. + StructuredLocation *StructuredLocation `json:"structuredLocation,omitempty"` + // The employee's role title. + Title *string `json:"title,omitempty"` + // The employee's profile pic + PhotoURL *string `json:"photoUrl,omitempty"` + // Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. + BusinessUnit *string `json:"businessUnit,omitempty"` + // An organizational unit where everyone has a similar task, e.g. `Engineering`. + Department string `json:"department"` + // The datasource profiles of the employee, e.g. `Slack`,`Github`. + DatasourceProfiles []DatasourceProfile `json:"datasourceProfiles,omitempty"` + // Info about the employee's team(s) + Teams []EmployeeTeamInfo `json:"teams,omitempty"` + // The date when the employee started + StartDate *types.Date `json:"startDate,omitempty"` + // If a former employee, the last date of employment. + EndDate *types.Date `json:"endDate,omitempty"` + // Short biography or mission statement of the employee. + Bio *string `json:"bio,omitempty"` + // She/her, He/his or other pronoun. + Pronoun *string `json:"pronoun,omitempty"` + // Other names associated with the employee. + AlsoKnownAs []string `json:"alsoKnownAs,omitempty"` + // Link to internal company person profile. + ProfileURL *string `json:"profileUrl,omitempty"` + // List of social network profiles. + SocialNetworks []SocialNetworkDefinition `json:"socialNetworks,omitempty"` + // The email of the employee's manager + ManagerEmail *string `json:"managerEmail,omitempty"` + // **[Advanced]** A unique universal internal identifier for the employee's manager. This is solely used in conjunction with `id`. + // + ManagerID *string `json:"managerId,omitempty"` + // The type of the employee, an enum of `FULL_TIME`, `CONTRACTOR`, `NON_EMPLOYEE` + Type *string `default:"FULL_TIME" json:"type"` + // 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. + Relationships []EntityRelationship `json:"relationships,omitempty"` + // The status of the employee, an enum of `CURRENT`, `FUTURE`, `EX` + Status *string `default:"CURRENT" json:"status"` + // List of additional fields with more information about the employee. + AdditionalFields []AdditionalFieldDefinition `json:"additionalFields,omitempty"` +} + +func (e EmployeeInfoDefinition) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(e, "", false) +} + +func (e *EmployeeInfoDefinition) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &e, "", false, false); err != nil { + return err + } + return nil +} + +func (o *EmployeeInfoDefinition) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *EmployeeInfoDefinition) GetFirstName() *string { + if o == nil { + return nil + } + return o.FirstName +} + +func (o *EmployeeInfoDefinition) GetLastName() *string { + if o == nil { + return nil + } + return o.LastName +} + +func (o *EmployeeInfoDefinition) GetPreferredName() *string { + if o == nil { + return nil + } + return o.PreferredName +} + +func (o *EmployeeInfoDefinition) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *EmployeeInfoDefinition) GetPhoneNumber() *string { + if o == nil { + return nil + } + return o.PhoneNumber +} + +func (o *EmployeeInfoDefinition) GetLocation() *string { + if o == nil { + return nil + } + return o.Location +} + +func (o *EmployeeInfoDefinition) GetStructuredLocation() *StructuredLocation { + if o == nil { + return nil + } + return o.StructuredLocation +} + +func (o *EmployeeInfoDefinition) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *EmployeeInfoDefinition) GetPhotoURL() *string { + if o == nil { + return nil + } + return o.PhotoURL +} + +func (o *EmployeeInfoDefinition) GetBusinessUnit() *string { + if o == nil { + return nil + } + return o.BusinessUnit +} + +func (o *EmployeeInfoDefinition) GetDepartment() string { + if o == nil { + return "" + } + return o.Department +} + +func (o *EmployeeInfoDefinition) GetDatasourceProfiles() []DatasourceProfile { + if o == nil { + return nil + } + return o.DatasourceProfiles +} + +func (o *EmployeeInfoDefinition) GetTeams() []EmployeeTeamInfo { + if o == nil { + return nil + } + return o.Teams +} + +func (o *EmployeeInfoDefinition) GetStartDate() *types.Date { + if o == nil { + return nil + } + return o.StartDate +} + +func (o *EmployeeInfoDefinition) GetEndDate() *types.Date { + if o == nil { + return nil + } + return o.EndDate +} + +func (o *EmployeeInfoDefinition) GetBio() *string { + if o == nil { + return nil + } + return o.Bio +} + +func (o *EmployeeInfoDefinition) GetPronoun() *string { + if o == nil { + return nil + } + return o.Pronoun +} + +func (o *EmployeeInfoDefinition) GetAlsoKnownAs() []string { + if o == nil { + return nil + } + return o.AlsoKnownAs +} + +func (o *EmployeeInfoDefinition) GetProfileURL() *string { + if o == nil { + return nil + } + return o.ProfileURL +} + +func (o *EmployeeInfoDefinition) GetSocialNetworks() []SocialNetworkDefinition { + if o == nil { + return nil + } + return o.SocialNetworks +} + +func (o *EmployeeInfoDefinition) GetManagerEmail() *string { + if o == nil { + return nil + } + return o.ManagerEmail +} + +func (o *EmployeeInfoDefinition) GetManagerID() *string { + if o == nil { + return nil + } + return o.ManagerID +} + +func (o *EmployeeInfoDefinition) GetType() *string { + if o == nil { + return nil + } + return o.Type +} + +func (o *EmployeeInfoDefinition) GetRelationships() []EntityRelationship { + if o == nil { + return nil + } + return o.Relationships +} + +func (o *EmployeeInfoDefinition) GetStatus() *string { + if o == nil { + return nil + } + return o.Status +} + +func (o *EmployeeInfoDefinition) GetAdditionalFields() []AdditionalFieldDefinition { + if o == nil { + return nil + } + return o.AdditionalFields +} diff --git a/tests/mockserver/internal/sdk/models/components/employeeteaminfo.go b/tests/mockserver/internal/sdk/models/components/employeeteaminfo.go new file mode 100644 index 00000000..dd50fe0e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/employeeteaminfo.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// EmployeeTeamInfo - Information about which team an employee belongs to +type EmployeeTeamInfo struct { + // unique identifier for this team + ID *string `json:"id,omitempty"` + // Team name + Name *string `json:"name,omitempty"` + // Link to internal company team page + URL *string `json:"url,omitempty"` +} + +func (o *EmployeeTeamInfo) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *EmployeeTeamInfo) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *EmployeeTeamInfo) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} diff --git a/tests/mockserver/internal/sdk/models/components/entitiessortorder.go b/tests/mockserver/internal/sdk/models/components/entitiessortorder.go new file mode 100644 index 00000000..6888c129 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/entitiessortorder.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// EntitiesSortOrder - Different ways of sorting entities +type EntitiesSortOrder string + +const ( + EntitiesSortOrderEntityName EntitiesSortOrder = "ENTITY_NAME" + EntitiesSortOrderFirstName EntitiesSortOrder = "FIRST_NAME" + EntitiesSortOrderLastName EntitiesSortOrder = "LAST_NAME" + EntitiesSortOrderOrgSizeCount EntitiesSortOrder = "ORG_SIZE_COUNT" + EntitiesSortOrderStartDate EntitiesSortOrder = "START_DATE" + EntitiesSortOrderTeamSize EntitiesSortOrder = "TEAM_SIZE" + EntitiesSortOrderRelevance EntitiesSortOrder = "RELEVANCE" +) + +func (e EntitiesSortOrder) ToPointer() *EntitiesSortOrder { + return &e +} +func (e *EntitiesSortOrder) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ENTITY_NAME": + fallthrough + case "FIRST_NAME": + fallthrough + case "LAST_NAME": + fallthrough + case "ORG_SIZE_COUNT": + fallthrough + case "START_DATE": + fallthrough + case "TEAM_SIZE": + fallthrough + case "RELEVANCE": + *e = EntitiesSortOrder(v) + return nil + default: + return fmt.Errorf("invalid value for EntitiesSortOrder: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/entityrelationship.go b/tests/mockserver/internal/sdk/models/components/entityrelationship.go new file mode 100644 index 00000000..fee77670 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/entityrelationship.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// EntityRelationship - Describes a relationship edge between a source and destination entity +type EntityRelationship struct { + // The title or type of relationship. Currently an enum of `CHIEF_OF_STAFF`, `EXECUTIVE_ASSISTANT` + Name string `json:"name"` + // Email of the person with whom the relationship exists. Per the example above, either `B` or `C`'s email depending on the relationship. + Email string `json:"email"` +} + +func (o *EntityRelationship) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *EntityRelationship) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} diff --git a/tests/mockserver/internal/sdk/models/components/entitytype.go b/tests/mockserver/internal/sdk/models/components/entitytype.go new file mode 100644 index 00000000..18fae8c8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/entitytype.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// EntityType - The type of entity. +type EntityType string + +const ( + EntityTypePerson EntityType = "PERSON" + EntityTypeProject EntityType = "PROJECT" + EntityTypeCustomer EntityType = "CUSTOMER" +) + +func (e EntityType) ToPointer() *EntityType { + return &e +} +func (e *EntityType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PERSON": + fallthrough + case "PROJECT": + fallthrough + case "CUSTOMER": + *e = EntityType(v) + return nil + default: + return fmt.Errorf("invalid value for EntityType: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/errormessage.go b/tests/mockserver/internal/sdk/models/components/errormessage.go new file mode 100644 index 00000000..053c085d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/errormessage.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ErrorMessage struct { + // The datasource this message relates to. + Source *string `json:"source,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` +} + +func (o *ErrorMessage) GetSource() *string { + if o == nil { + return nil + } + return o.Source +} + +func (o *ErrorMessage) GetErrorMessage() *string { + if o == nil { + return nil + } + return o.ErrorMessage +} diff --git a/tests/mockserver/internal/sdk/models/components/eventclassification.go b/tests/mockserver/internal/sdk/models/components/eventclassification.go new file mode 100644 index 00000000..99367087 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/eventclassification.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// EventClassification - A generated classification of a given event. +type EventClassification struct { + // The name for a generated classification of an event. + Name *EventClassificationName `json:"name,omitempty"` + Strategies []EventStrategyName `json:"strategies,omitempty"` +} + +func (o *EventClassification) GetName() *EventClassificationName { + if o == nil { + return nil + } + return o.Name +} + +func (o *EventClassification) GetStrategies() []EventStrategyName { + if o == nil { + return nil + } + return o.Strategies +} diff --git a/tests/mockserver/internal/sdk/models/components/eventclassificationname.go b/tests/mockserver/internal/sdk/models/components/eventclassificationname.go new file mode 100644 index 00000000..2971f669 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/eventclassificationname.go @@ -0,0 +1,32 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// EventClassificationName - The name for a generated classification of an event. +type EventClassificationName string + +const ( + EventClassificationNameExternalEvent EventClassificationName = "External Event" +) + +func (e EventClassificationName) ToPointer() *EventClassificationName { + return &e +} +func (e *EventClassificationName) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "External Event": + *e = EventClassificationName(v) + return nil + default: + return fmt.Errorf("invalid value for EventClassificationName: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/eventstrategyname.go b/tests/mockserver/internal/sdk/models/components/eventstrategyname.go new file mode 100644 index 00000000..fbbce772 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/eventstrategyname.go @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// EventStrategyName - The name of method used to surface relevant data for a given calendar event. +type EventStrategyName string + +const ( + EventStrategyNameCustomerCard EventStrategyName = "customerCard" + EventStrategyNameNews EventStrategyName = "news" + EventStrategyNameCall EventStrategyName = "call" + EventStrategyNameEmail EventStrategyName = "email" + EventStrategyNameMeetingNotes EventStrategyName = "meetingNotes" + EventStrategyNameLinkedIn EventStrategyName = "linkedIn" + EventStrategyNameRelevantDocuments EventStrategyName = "relevantDocuments" + EventStrategyNameChatFollowUps EventStrategyName = "chatFollowUps" + EventStrategyNameConversations EventStrategyName = "conversations" +) + +func (e EventStrategyName) ToPointer() *EventStrategyName { + return &e +} +func (e *EventStrategyName) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "customerCard": + fallthrough + case "news": + fallthrough + case "call": + fallthrough + case "email": + fallthrough + case "meetingNotes": + fallthrough + case "linkedIn": + fallthrough + case "relevantDocuments": + fallthrough + case "chatFollowUps": + fallthrough + case "conversations": + *e = EventStrategyName(v) + return nil + default: + return fmt.Errorf("invalid value for EventStrategyName: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/externalsharingoptions.go b/tests/mockserver/internal/sdk/models/components/externalsharingoptions.go new file mode 100644 index 00000000..0d0a7b9c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/externalsharingoptions.go @@ -0,0 +1,89 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ExternalSharingOptions - Controls how "shared" a document must be to get picked for scans. +// +// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. +type ExternalSharingOptions struct { + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + Enabled *bool `json:"enabled,omitempty"` + // The minimum number of users the document is shared with. + Threshold *int64 `json:"threshold,omitempty"` + // Documents will be filtered based on how many people have access to it. + ThresholdEnabled *bool `json:"thresholdEnabled,omitempty"` + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + AnyoneWithLinkEnabled *bool `json:"anyoneWithLinkEnabled,omitempty"` + // Only users within the organization can access the document. + AnyoneInternalEnabled *bool `json:"anyoneInternalEnabled,omitempty"` + // Anyone on the internet can access the document. + AnonymousAccessEnabled *bool `json:"anonymousAccessEnabled,omitempty"` + // Enable user access check + UserAccessEnabled *bool `json:"userAccessEnabled,omitempty"` + // Any one of the specified users can access the document. + UserIds []string `json:"userIds,omitempty"` + DomainAccessEnabled *bool `json:"domainAccessEnabled,omitempty"` +} + +func (o *ExternalSharingOptions) GetEnabled() *bool { + if o == nil { + return nil + } + return o.Enabled +} + +func (o *ExternalSharingOptions) GetThreshold() *int64 { + if o == nil { + return nil + } + return o.Threshold +} + +func (o *ExternalSharingOptions) GetThresholdEnabled() *bool { + if o == nil { + return nil + } + return o.ThresholdEnabled +} + +func (o *ExternalSharingOptions) GetAnyoneWithLinkEnabled() *bool { + if o == nil { + return nil + } + return o.AnyoneWithLinkEnabled +} + +func (o *ExternalSharingOptions) GetAnyoneInternalEnabled() *bool { + if o == nil { + return nil + } + return o.AnyoneInternalEnabled +} + +func (o *ExternalSharingOptions) GetAnonymousAccessEnabled() *bool { + if o == nil { + return nil + } + return o.AnonymousAccessEnabled +} + +func (o *ExternalSharingOptions) GetUserAccessEnabled() *bool { + if o == nil { + return nil + } + return o.UserAccessEnabled +} + +func (o *ExternalSharingOptions) GetUserIds() []string { + if o == nil { + return nil + } + return o.UserIds +} + +func (o *ExternalSharingOptions) GetDomainAccessEnabled() *bool { + if o == nil { + return nil + } + return o.DomainAccessEnabled +} diff --git a/tests/mockserver/internal/sdk/models/components/externalshortcut.go b/tests/mockserver/internal/sdk/models/components/externalshortcut.go new file mode 100644 index 00000000..24eee619 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/externalshortcut.go @@ -0,0 +1,105 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ExternalShortcut struct { + // 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. + InputAlias string `json:"inputAlias"` + // A short, plain text blurb to help people understand the intent of the shortcut. + Description *string `json:"description,omitempty"` + // destination URL for the shortcut. + DestinationURL string `json:"destinationUrl"` + // Email of the user who created this shortcut. + CreatedBy string `json:"createdBy"` + // The time the shortcut was created in epoch seconds. + CreateTime *int64 `json:"createTime,omitempty"` + // Email of the user who last updated this shortcut. + UpdatedBy *string `json:"updatedBy,omitempty"` + // The time the shortcut was updated in epoch seconds. + UpdateTime *int64 `json:"updateTime,omitempty"` + // Title of the golink + Title *string `json:"title,omitempty"` + // The URL from which the user is then redirected to the destination URL. + IntermediateURL string `json:"intermediateUrl"` + // decayed visits score for ranking + DecayedVisitScore *float64 `json:"decayedVisitScore,omitempty"` + // The URL using which the user can access the edit page of the shortcut. + EditURL *string `json:"editUrl,omitempty"` +} + +func (o *ExternalShortcut) GetInputAlias() string { + if o == nil { + return "" + } + return o.InputAlias +} + +func (o *ExternalShortcut) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *ExternalShortcut) GetDestinationURL() string { + if o == nil { + return "" + } + return o.DestinationURL +} + +func (o *ExternalShortcut) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *ExternalShortcut) GetCreateTime() *int64 { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *ExternalShortcut) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *ExternalShortcut) GetUpdateTime() *int64 { + if o == nil { + return nil + } + return o.UpdateTime +} + +func (o *ExternalShortcut) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *ExternalShortcut) GetIntermediateURL() string { + if o == nil { + return "" + } + return o.IntermediateURL +} + +func (o *ExternalShortcut) GetDecayedVisitScore() *float64 { + if o == nil { + return nil + } + return o.DecayedVisitScore +} + +func (o *ExternalShortcut) GetEditURL() *string { + if o == nil { + return nil + } + return o.EditURL +} diff --git a/tests/mockserver/internal/sdk/models/components/extractedqna.go b/tests/mockserver/internal/sdk/models/components/extractedqna.go new file mode 100644 index 00000000..f3a6ce3a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/extractedqna.go @@ -0,0 +1,32 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ExtractedQnA struct { + // Heading text that was matched to produce this result. + Heading *string `json:"heading,omitempty"` + // Question text that was matched to produce this result. + Question *string `json:"question,omitempty"` + QuestionResult *SearchResult `json:"questionResult,omitempty"` +} + +func (o *ExtractedQnA) GetHeading() *string { + if o == nil { + return nil + } + return o.Heading +} + +func (o *ExtractedQnA) GetQuestion() *string { + if o == nil { + return nil + } + return o.Question +} + +func (o *ExtractedQnA) GetQuestionResult() *SearchResult { + if o == nil { + return nil + } + return o.QuestionResult +} diff --git a/tests/mockserver/internal/sdk/models/components/facetbucket.go b/tests/mockserver/internal/sdk/models/components/facetbucket.go new file mode 100644 index 00000000..bc1861d2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/facetbucket.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type FacetBucket struct { + // Estimated number of results in this facet. + Count *int64 `json:"count,omitempty"` + // The datasource the value belongs to. This will be used by the all tab to show types across all datasources. + Datasource *string `json:"datasource,omitempty"` + // Estimated percentage of results in this facet. + Percentage *int64 `json:"percentage,omitempty"` + Value *FacetValue `json:"value,omitempty"` +} + +func (o *FacetBucket) GetCount() *int64 { + if o == nil { + return nil + } + return o.Count +} + +func (o *FacetBucket) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *FacetBucket) GetPercentage() *int64 { + if o == nil { + return nil + } + return o.Percentage +} + +func (o *FacetBucket) GetValue() *FacetValue { + if o == nil { + return nil + } + return o.Value +} diff --git a/tests/mockserver/internal/sdk/models/components/facetbucketfilter.go b/tests/mockserver/internal/sdk/models/components/facetbucketfilter.go new file mode 100644 index 00000000..f7dacbe1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/facetbucketfilter.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type FacetBucketFilter struct { + // The facet whose buckets should be filtered. + Facet *string `json:"facet,omitempty"` + // The per-term prefix that facet buckets should be filtered on. + Prefix *string `json:"prefix,omitempty"` +} + +func (o *FacetBucketFilter) GetFacet() *string { + if o == nil { + return nil + } + return o.Facet +} + +func (o *FacetBucketFilter) GetPrefix() *string { + if o == nil { + return nil + } + return o.Prefix +} diff --git a/tests/mockserver/internal/sdk/models/components/facetfilter.go b/tests/mockserver/internal/sdk/models/components/facetfilter.go new file mode 100644 index 00000000..b20d27ef --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/facetfilter.go @@ -0,0 +1,32 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type FacetFilter struct { + FieldName *string `json:"fieldName,omitempty"` + // 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. + Values []FacetFilterValue `json:"values,omitempty"` + // 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. + GroupName *string `json:"groupName,omitempty"` +} + +func (o *FacetFilter) GetFieldName() *string { + if o == nil { + return nil + } + return o.FieldName +} + +func (o *FacetFilter) GetValues() []FacetFilterValue { + if o == nil { + return nil + } + return o.Values +} + +func (o *FacetFilter) GetGroupName() *string { + if o == nil { + return nil + } + return o.GroupName +} diff --git a/tests/mockserver/internal/sdk/models/components/facetfilterset.go b/tests/mockserver/internal/sdk/models/components/facetfilterset.go new file mode 100644 index 00000000..fd364863 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/facetfilterset.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// FacetFilterSet - Within a single FacetFilterSet, the filters are treated as AND. For example, owner Sumeet and type Spreadsheet shows documents that are by Sumeet AND are Spreadsheets. +type FacetFilterSet struct { + Filters []FacetFilter `json:"filters,omitempty"` +} + +func (o *FacetFilterSet) GetFilters() []FacetFilter { + if o == nil { + return nil + } + return o.Filters +} diff --git a/tests/mockserver/internal/sdk/models/components/facetfiltervalue.go b/tests/mockserver/internal/sdk/models/components/facetfiltervalue.go new file mode 100644 index 00000000..79b31319 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/facetfiltervalue.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type RelationType string + +const ( + RelationTypeEquals RelationType = "EQUALS" + RelationTypeIDEquals RelationType = "ID_EQUALS" + RelationTypeLt RelationType = "LT" + RelationTypeGt RelationType = "GT" +) + +func (e RelationType) ToPointer() *RelationType { + return &e +} +func (e *RelationType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "EQUALS": + fallthrough + case "ID_EQUALS": + fallthrough + case "LT": + fallthrough + case "GT": + *e = RelationType(v) + return nil + default: + return fmt.Errorf("invalid value for RelationType: %v", v) + } +} + +type FacetFilterValue struct { + Value *string `json:"value,omitempty"` + RelationType *RelationType `json:"relationType,omitempty"` + // DEPRECATED - please use relationType instead + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + IsNegated *bool `json:"isNegated,omitempty"` +} + +func (o *FacetFilterValue) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *FacetFilterValue) GetRelationType() *RelationType { + if o == nil { + return nil + } + return o.RelationType +} + +func (o *FacetFilterValue) GetIsNegated() *bool { + if o == nil { + return nil + } + return o.IsNegated +} diff --git a/tests/mockserver/internal/sdk/models/components/facetresult.go b/tests/mockserver/internal/sdk/models/components/facetresult.go new file mode 100644 index 00000000..a9ad79ba --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/facetresult.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type FacetResult struct { + // The source of this facet (e.g. container_name, type, last_updated_at). + SourceName *string `json:"sourceName,omitempty"` + // How to display this facet. Currently supportes 'SelectSingle' and 'SelectMultiple'. + OperatorName *string `json:"operatorName,omitempty"` + // A list of unique buckets that exist within this result set. + Buckets []FacetBucket `json:"buckets,omitempty"` + // Returns true if more buckets exist than those returned. Additional buckets can be retrieve by requesting again with a higher facetBucketSize. + HasMoreBuckets *bool `json:"hasMoreBuckets,omitempty"` + // 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) + GroupName *string `json:"groupName,omitempty"` +} + +func (o *FacetResult) GetSourceName() *string { + if o == nil { + return nil + } + return o.SourceName +} + +func (o *FacetResult) GetOperatorName() *string { + if o == nil { + return nil + } + return o.OperatorName +} + +func (o *FacetResult) GetBuckets() []FacetBucket { + if o == nil { + return nil + } + return o.Buckets +} + +func (o *FacetResult) GetHasMoreBuckets() *bool { + if o == nil { + return nil + } + return o.HasMoreBuckets +} + +func (o *FacetResult) GetGroupName() *string { + if o == nil { + return nil + } + return o.GroupName +} diff --git a/tests/mockserver/internal/sdk/models/components/facetvalue.go b/tests/mockserver/internal/sdk/models/components/facetvalue.go new file mode 100644 index 00000000..e720e4a7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/facetvalue.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type FacetValue struct { + // The value that should be set in the FacetFilter when applying this filter to a search request. + StringValue *string `json:"stringValue,omitempty"` + IntegerValue *int64 `json:"integerValue,omitempty"` + // An optional user-friendly label to display in place of the facet value. + DisplayLabel *string `json:"displayLabel,omitempty"` + // Defines how to render an icon + IconConfig *IconConfig `json:"iconConfig,omitempty"` +} + +func (o *FacetValue) GetStringValue() *string { + if o == nil { + return nil + } + return o.StringValue +} + +func (o *FacetValue) GetIntegerValue() *int64 { + if o == nil { + return nil + } + return o.IntegerValue +} + +func (o *FacetValue) GetDisplayLabel() *string { + if o == nil { + return nil + } + return o.DisplayLabel +} + +func (o *FacetValue) GetIconConfig() *IconConfig { + if o == nil { + return nil + } + return o.IconConfig +} diff --git a/tests/mockserver/internal/sdk/models/components/favoriteinfo.go b/tests/mockserver/internal/sdk/models/components/favoriteinfo.go new file mode 100644 index 00000000..7e46f018 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/favoriteinfo.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type FavoriteInfo struct { + UgcType *UgcType `json:"ugcType,omitempty"` + // Opaque id of the UGC. + ID *string `json:"id,omitempty"` + // Number of users this object has been favorited by. + Count *int64 `json:"count,omitempty"` + // If the requesting user has favorited this object. + FavoritedByUser *bool `json:"favoritedByUser,omitempty"` +} + +func (o *FavoriteInfo) GetUgcType() *UgcType { + if o == nil { + return nil + } + return o.UgcType +} + +func (o *FavoriteInfo) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *FavoriteInfo) GetCount() *int64 { + if o == nil { + return nil + } + return o.Count +} + +func (o *FavoriteInfo) GetFavoritedByUser() *bool { + if o == nil { + return nil + } + return o.FavoritedByUser +} diff --git a/tests/mockserver/internal/sdk/models/components/feedback.go b/tests/mockserver/internal/sdk/models/components/feedback.go new file mode 100644 index 00000000..101c1f19 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/feedback.go @@ -0,0 +1,386 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +// FeedbackCategory - 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. +type FeedbackCategory string + +const ( + FeedbackCategoryAnnouncement FeedbackCategory = "ANNOUNCEMENT" + FeedbackCategoryAutocomplete FeedbackCategory = "AUTOCOMPLETE" + FeedbackCategoryCollections FeedbackCategory = "COLLECTIONS" + FeedbackCategoryFeed FeedbackCategory = "FEED" + FeedbackCategorySearch FeedbackCategory = "SEARCH" + FeedbackCategoryChat FeedbackCategory = "CHAT" + FeedbackCategoryNtp FeedbackCategory = "NTP" + FeedbackCategoryWorkflows FeedbackCategory = "WORKFLOWS" + FeedbackCategorySummary FeedbackCategory = "SUMMARY" + FeedbackCategoryGeneral FeedbackCategory = "GENERAL" + FeedbackCategoryPrompts FeedbackCategory = "PROMPTS" +) + +func (e FeedbackCategory) ToPointer() *FeedbackCategory { + return &e +} +func (e *FeedbackCategory) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ANNOUNCEMENT": + fallthrough + case "AUTOCOMPLETE": + fallthrough + case "COLLECTIONS": + fallthrough + case "FEED": + fallthrough + case "SEARCH": + fallthrough + case "CHAT": + fallthrough + case "NTP": + fallthrough + case "WORKFLOWS": + fallthrough + case "SUMMARY": + fallthrough + case "GENERAL": + fallthrough + case "PROMPTS": + *e = FeedbackCategory(v) + return nil + default: + return fmt.Errorf("invalid value for FeedbackCategory: %v", v) + } +} + +// Event - The action the user took within a Glean client with respect to the object referred to by the given `trackingToken`. +type Event string + +const ( + EventClick Event = "CLICK" + EventContainerClick Event = "CONTAINER_CLICK" + EventCopyLink Event = "COPY_LINK" + EventCreate Event = "CREATE" + EventDismiss Event = "DISMISS" + EventDownvote Event = "DOWNVOTE" + EventEmail Event = "EMAIL" + EventExecute Event = "EXECUTE" + EventFilter Event = "FILTER" + EventFirstToken Event = "FIRST_TOKEN" + EventFocusIn Event = "FOCUS_IN" + EventLastToken Event = "LAST_TOKEN" + EventManualFeedback Event = "MANUAL_FEEDBACK" + EventMarkAsRead Event = "MARK_AS_READ" + EventMessage Event = "MESSAGE" + EventMiddleClick Event = "MIDDLE_CLICK" + EventPageBlur Event = "PAGE_BLUR" + EventPageFocus Event = "PAGE_FOCUS" + EventPageLeave Event = "PAGE_LEAVE" + EventPreview Event = "PREVIEW" + EventRelatedClick Event = "RELATED_CLICK" + EventRightClick Event = "RIGHT_CLICK" + EventSectionClick Event = "SECTION_CLICK" + EventSeen Event = "SEEN" + EventShare Event = "SHARE" + EventShowMore Event = "SHOW_MORE" + EventUpvote Event = "UPVOTE" + EventView Event = "VIEW" + EventVisible Event = "VISIBLE" +) + +func (e Event) ToPointer() *Event { + return &e +} +func (e *Event) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "CLICK": + fallthrough + case "CONTAINER_CLICK": + fallthrough + case "COPY_LINK": + fallthrough + case "CREATE": + fallthrough + case "DISMISS": + fallthrough + case "DOWNVOTE": + fallthrough + case "EMAIL": + fallthrough + case "EXECUTE": + fallthrough + case "FILTER": + fallthrough + case "FIRST_TOKEN": + fallthrough + case "FOCUS_IN": + fallthrough + case "LAST_TOKEN": + fallthrough + case "MANUAL_FEEDBACK": + fallthrough + case "MARK_AS_READ": + fallthrough + case "MESSAGE": + fallthrough + case "MIDDLE_CLICK": + fallthrough + case "PAGE_BLUR": + fallthrough + case "PAGE_FOCUS": + fallthrough + case "PAGE_LEAVE": + fallthrough + case "PREVIEW": + fallthrough + case "RELATED_CLICK": + fallthrough + case "RIGHT_CLICK": + fallthrough + case "SECTION_CLICK": + fallthrough + case "SEEN": + fallthrough + case "SHARE": + fallthrough + case "SHOW_MORE": + fallthrough + case "UPVOTE": + fallthrough + case "VIEW": + fallthrough + case "VISIBLE": + *e = Event(v) + return nil + default: + return fmt.Errorf("invalid value for Event: %v", v) + } +} + +type FeedbackChannel string + +const ( + FeedbackChannelCompany FeedbackChannel = "COMPANY" + FeedbackChannelGlean FeedbackChannel = "GLEAN" +) + +func (e FeedbackChannel) ToPointer() *FeedbackChannel { + return &e +} +func (e *FeedbackChannel) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "COMPANY": + fallthrough + case "GLEAN": + *e = FeedbackChannel(v) + return nil + default: + return fmt.Errorf("invalid value for FeedbackChannel: %v", v) + } +} + +type Feedback struct { + // 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. + ID *string `json:"id,omitempty"` + // 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. + Category *FeedbackCategory `json:"category,omitempty"` + // A list of server-generated trackingTokens to which this event applies. + TrackingTokens []string `json:"trackingTokens"` + // The action the user took within a Glean client with respect to the object referred to by the given `trackingToken`. + Event Event `json:"event"` + // Position of the element in the case that the client controls order (such as feed and autocomplete). + Position *int64 `json:"position,omitempty"` + // 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. + Payload *string `json:"payload,omitempty"` + SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` + // The ISO 8601 timestamp when the event occured. + Timestamp *time.Time `json:"timestamp,omitempty"` + User *User `json:"user,omitempty"` + // The path the client was at when the feedback event triggered. + Pathname *string `json:"pathname,omitempty"` + // 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. + Channels []FeedbackChannel `json:"channels,omitempty"` + // The URL the client was at when the feedback event triggered. + URL *string `json:"url,omitempty"` + // The UI element tree associated with the event, if any. + UITree []string `json:"uiTree,omitempty"` + // The UI element associated with the event, if any. + UIElement *string `json:"uiElement,omitempty"` + ManualFeedbackInfo *ManualFeedbackInfo `json:"manualFeedbackInfo,omitempty"` + SeenFeedbackInfo *SeenFeedbackInfo `json:"seenFeedbackInfo,omitempty"` + UserViewInfo *UserViewInfo `json:"userViewInfo,omitempty"` + WorkflowFeedbackInfo *WorkflowFeedbackInfo `json:"workflowFeedbackInfo,omitempty"` + // The application ID of the client that sent the feedback event. + ApplicationID *string `json:"applicationId,omitempty"` + // The agent ID of the client that sent the feedback event. + AgentID *string `json:"agentId,omitempty"` +} + +func (f Feedback) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(f, "", false) +} + +func (f *Feedback) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &f, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Feedback) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Feedback) GetCategory() *FeedbackCategory { + if o == nil { + return nil + } + return o.Category +} + +func (o *Feedback) GetTrackingTokens() []string { + if o == nil { + return []string{} + } + return o.TrackingTokens +} + +func (o *Feedback) GetEvent() Event { + if o == nil { + return Event("") + } + return o.Event +} + +func (o *Feedback) GetPosition() *int64 { + if o == nil { + return nil + } + return o.Position +} + +func (o *Feedback) GetPayload() *string { + if o == nil { + return nil + } + return o.Payload +} + +func (o *Feedback) GetSessionInfo() *SessionInfo { + if o == nil { + return nil + } + return o.SessionInfo +} + +func (o *Feedback) GetTimestamp() *time.Time { + if o == nil { + return nil + } + return o.Timestamp +} + +func (o *Feedback) GetUser() *User { + if o == nil { + return nil + } + return o.User +} + +func (o *Feedback) GetPathname() *string { + if o == nil { + return nil + } + return o.Pathname +} + +func (o *Feedback) GetChannels() []FeedbackChannel { + if o == nil { + return nil + } + return o.Channels +} + +func (o *Feedback) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *Feedback) GetUITree() []string { + if o == nil { + return nil + } + return o.UITree +} + +func (o *Feedback) GetUIElement() *string { + if o == nil { + return nil + } + return o.UIElement +} + +func (o *Feedback) GetManualFeedbackInfo() *ManualFeedbackInfo { + if o == nil { + return nil + } + return o.ManualFeedbackInfo +} + +func (o *Feedback) GetSeenFeedbackInfo() *SeenFeedbackInfo { + if o == nil { + return nil + } + return o.SeenFeedbackInfo +} + +func (o *Feedback) GetUserViewInfo() *UserViewInfo { + if o == nil { + return nil + } + return o.UserViewInfo +} + +func (o *Feedback) GetWorkflowFeedbackInfo() *WorkflowFeedbackInfo { + if o == nil { + return nil + } + return o.WorkflowFeedbackInfo +} + +func (o *Feedback) GetApplicationID() *string { + if o == nil { + return nil + } + return o.ApplicationID +} + +func (o *Feedback) GetAgentID() *string { + if o == nil { + return nil + } + return o.AgentID +} diff --git a/tests/mockserver/internal/sdk/models/components/feedbackchatexchange.go b/tests/mockserver/internal/sdk/models/components/feedbackchatexchange.go new file mode 100644 index 00000000..04cc3a93 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/feedbackchatexchange.go @@ -0,0 +1,78 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ResultDocument struct { + Title *string `json:"title,omitempty"` + URL *string `json:"url,omitempty"` +} + +func (o *ResultDocument) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *ResultDocument) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +type FeedbackChatExchange struct { + // Unix timestamp in millis for the chat request. + Timestamp *int64 `json:"timestamp,omitempty"` + // Either DEFAULT (company knowledge) or GPT (world knowledge). + Agent *string `json:"agent,omitempty"` + // Initial query entered by the user. + UserQuery *string `json:"userQuery,omitempty"` + // Search query performed by the agent. + SearchQuery *string `json:"searchQuery,omitempty"` + // List of documents read by the agent. + ResultDocuments []ResultDocument `json:"resultDocuments,omitempty"` + Response *string `json:"response,omitempty"` +} + +func (o *FeedbackChatExchange) GetTimestamp() *int64 { + if o == nil { + return nil + } + return o.Timestamp +} + +func (o *FeedbackChatExchange) GetAgent() *string { + if o == nil { + return nil + } + return o.Agent +} + +func (o *FeedbackChatExchange) GetUserQuery() *string { + if o == nil { + return nil + } + return o.UserQuery +} + +func (o *FeedbackChatExchange) GetSearchQuery() *string { + if o == nil { + return nil + } + return o.SearchQuery +} + +func (o *FeedbackChatExchange) GetResultDocuments() []ResultDocument { + if o == nil { + return nil + } + return o.ResultDocuments +} + +func (o *FeedbackChatExchange) GetResponse() *string { + if o == nil { + return nil + } + return o.Response +} diff --git a/tests/mockserver/internal/sdk/models/components/feedentry.go b/tests/mockserver/internal/sdk/models/components/feedentry.go new file mode 100644 index 00000000..84d2f8c5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/feedentry.go @@ -0,0 +1,340 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// Format - defines how to render this particular displayable list card +type Format string + +const ( + FormatList Format = "LIST" +) + +func (e Format) ToPointer() *Format { + return &e +} +func (e *Format) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LIST": + *e = Format(v) + return nil + default: + return fmt.Errorf("invalid value for Format: %v", v) + } +} + +type UIConfig struct { + // defines how to render this particular displayable list card + Format *Format `json:"format,omitempty"` + // UI configurations for each item of the list + AdditionalFlags *DisplayableListItemUIConfig `json:"additionalFlags,omitempty"` +} + +func (o *UIConfig) GetFormat() *Format { + if o == nil { + return nil + } + return o.Format +} + +func (o *UIConfig) GetAdditionalFlags() *DisplayableListItemUIConfig { + if o == nil { + return nil + } + return o.AdditionalFlags +} + +// JustificationType - Type of the justification. +type JustificationType string + +const ( + JustificationTypeFrequentlyAccessed JustificationType = "FREQUENTLY_ACCESSED" + JustificationTypeRecentlyAccessed JustificationType = "RECENTLY_ACCESSED" + JustificationTypeTrendingDocument JustificationType = "TRENDING_DOCUMENT" + JustificationTypeVerificationReminder JustificationType = "VERIFICATION_REMINDER" + JustificationTypeSuggestedDocument JustificationType = "SUGGESTED_DOCUMENT" + JustificationTypeEmptyStateSuggestion JustificationType = "EMPTY_STATE_SUGGESTION" + JustificationTypeFrecencyScored JustificationType = "FRECENCY_SCORED" + JustificationTypeServerGenerated JustificationType = "SERVER_GENERATED" + JustificationTypeUseCase JustificationType = "USE_CASE" + JustificationTypeUpdateSinceLastView JustificationType = "UPDATE_SINCE_LAST_VIEW" + JustificationTypeRecentlyStarted JustificationType = "RECENTLY_STARTED" + JustificationTypeEvent JustificationType = "EVENT" + JustificationTypeUserMention JustificationType = "USER_MENTION" + JustificationTypeAnnouncement JustificationType = "ANNOUNCEMENT" + JustificationTypeExternalAnnouncement JustificationType = "EXTERNAL_ANNOUNCEMENT" + JustificationTypePopularityBasedTrending JustificationType = "POPULARITY_BASED_TRENDING" + JustificationTypeCompanyResource JustificationType = "COMPANY_RESOURCE" + JustificationTypeEventDocumentFromContent JustificationType = "EVENT_DOCUMENT_FROM_CONTENT" + JustificationTypeEventDocumentFromSearch JustificationType = "EVENT_DOCUMENT_FROM_SEARCH" + JustificationTypeVisitAffinityScored JustificationType = "VISIT_AFFINITY_SCORED" + JustificationTypeSuggestedApp JustificationType = "SUGGESTED_APP" + JustificationTypeSuggestedPerson JustificationType = "SUGGESTED_PERSON" + JustificationTypeActivityHighlight JustificationType = "ACTIVITY_HIGHLIGHT" + JustificationTypeSavedSearch JustificationType = "SAVED_SEARCH" + JustificationTypeSuggestedChannel JustificationType = "SUGGESTED_CHANNEL" + JustificationTypePeopleCelebrations JustificationType = "PEOPLE_CELEBRATIONS" + JustificationTypeSocialLink JustificationType = "SOCIAL_LINK" + JustificationTypeZeroStateChatSuggestion JustificationType = "ZERO_STATE_CHAT_SUGGESTION" + JustificationTypeZeroStateChatToolSuggestion JustificationType = "ZERO_STATE_CHAT_TOOL_SUGGESTION" + JustificationTypeZeroStatePromptTemplateSuggestion JustificationType = "ZERO_STATE_PROMPT_TEMPLATE_SUGGESTION" + JustificationTypeZeroStateStaticWorkflowSuggestion JustificationType = "ZERO_STATE_STATIC_WORKFLOW_SUGGESTION" + JustificationTypeZeroStateAgentSuggestion JustificationType = "ZERO_STATE_AGENT_SUGGESTION" +) + +func (e JustificationType) ToPointer() *JustificationType { + return &e +} +func (e *JustificationType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "FREQUENTLY_ACCESSED": + fallthrough + case "RECENTLY_ACCESSED": + fallthrough + case "TRENDING_DOCUMENT": + fallthrough + case "VERIFICATION_REMINDER": + fallthrough + case "SUGGESTED_DOCUMENT": + fallthrough + case "EMPTY_STATE_SUGGESTION": + fallthrough + case "FRECENCY_SCORED": + fallthrough + case "SERVER_GENERATED": + fallthrough + case "USE_CASE": + fallthrough + case "UPDATE_SINCE_LAST_VIEW": + fallthrough + case "RECENTLY_STARTED": + fallthrough + case "EVENT": + fallthrough + case "USER_MENTION": + fallthrough + case "ANNOUNCEMENT": + fallthrough + case "EXTERNAL_ANNOUNCEMENT": + fallthrough + case "POPULARITY_BASED_TRENDING": + fallthrough + case "COMPANY_RESOURCE": + fallthrough + case "EVENT_DOCUMENT_FROM_CONTENT": + fallthrough + case "EVENT_DOCUMENT_FROM_SEARCH": + fallthrough + case "VISIT_AFFINITY_SCORED": + fallthrough + case "SUGGESTED_APP": + fallthrough + case "SUGGESTED_PERSON": + fallthrough + case "ACTIVITY_HIGHLIGHT": + fallthrough + case "SAVED_SEARCH": + fallthrough + case "SUGGESTED_CHANNEL": + fallthrough + case "PEOPLE_CELEBRATIONS": + fallthrough + case "SOCIAL_LINK": + fallthrough + case "ZERO_STATE_CHAT_SUGGESTION": + fallthrough + case "ZERO_STATE_CHAT_TOOL_SUGGESTION": + fallthrough + case "ZERO_STATE_PROMPT_TEMPLATE_SUGGESTION": + fallthrough + case "ZERO_STATE_STATIC_WORKFLOW_SUGGESTION": + fallthrough + case "ZERO_STATE_AGENT_SUGGESTION": + *e = JustificationType(v) + return nil + default: + return fmt.Errorf("invalid value for JustificationType: %v", v) + } +} + +type FeedEntry struct { + // optional ID associated with a single feed entry (displayable_list_id) + EntryID *string `json:"entryId,omitempty"` + // Title for the result. Can be document title, event title and so on. + Title string `json:"title"` + Thumbnail *Thumbnail `json:"thumbnail,omitempty"` + CreatedBy *Person `json:"createdBy,omitempty"` + UIConfig *UIConfig `json:"uiConfig,omitempty"` + // Type of the justification. + JustificationType *JustificationType `json:"justificationType,omitempty"` + // Server side generated justification string if server provides one. + Justification *string `json:"justification,omitempty"` + // An opaque token that represents this particular feed entry in this particular response. To be used for /feedback reporting. + TrackingToken *string `json:"trackingToken,omitempty"` + // View URL for the entry if based on links that are not documents in Glean. + ViewURL *string `json:"viewUrl,omitempty"` + Document *Document `json:"document,omitempty"` + Event *CalendarEvent `json:"event,omitempty"` + Announcement *Announcement `json:"announcement,omitempty"` + Collection *Collection `json:"collection,omitempty"` + CollectionItem *CollectionItem `json:"collectionItem,omitempty"` + Person *Person `json:"person,omitempty"` + App *AppResult `json:"app,omitempty"` + PromptTemplate *PromptTemplateResult `json:"promptTemplate,omitempty"` + Workflow *WorkflowResult `json:"workflow,omitempty"` + // List of activity where each activity has user, action, timestamp. + Activities []UserActivity `json:"activities,omitempty"` + DocumentVisitorCount *CountInfo `json:"documentVisitorCount,omitempty"` +} + +func (o *FeedEntry) GetEntryID() *string { + if o == nil { + return nil + } + return o.EntryID +} + +func (o *FeedEntry) GetTitle() string { + if o == nil { + return "" + } + return o.Title +} + +func (o *FeedEntry) GetThumbnail() *Thumbnail { + if o == nil { + return nil + } + return o.Thumbnail +} + +func (o *FeedEntry) GetCreatedBy() *Person { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *FeedEntry) GetUIConfig() *UIConfig { + if o == nil { + return nil + } + return o.UIConfig +} + +func (o *FeedEntry) GetJustificationType() *JustificationType { + if o == nil { + return nil + } + return o.JustificationType +} + +func (o *FeedEntry) GetJustification() *string { + if o == nil { + return nil + } + return o.Justification +} + +func (o *FeedEntry) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *FeedEntry) GetViewURL() *string { + if o == nil { + return nil + } + return o.ViewURL +} + +func (o *FeedEntry) GetDocument() *Document { + if o == nil { + return nil + } + return o.Document +} + +func (o *FeedEntry) GetEvent() *CalendarEvent { + if o == nil { + return nil + } + return o.Event +} + +func (o *FeedEntry) GetAnnouncement() *Announcement { + if o == nil { + return nil + } + return o.Announcement +} + +func (o *FeedEntry) GetCollection() *Collection { + if o == nil { + return nil + } + return o.Collection +} + +func (o *FeedEntry) GetCollectionItem() *CollectionItem { + if o == nil { + return nil + } + return o.CollectionItem +} + +func (o *FeedEntry) GetPerson() *Person { + if o == nil { + return nil + } + return o.Person +} + +func (o *FeedEntry) GetApp() *AppResult { + if o == nil { + return nil + } + return o.App +} + +func (o *FeedEntry) GetPromptTemplate() *PromptTemplateResult { + if o == nil { + return nil + } + return o.PromptTemplate +} + +func (o *FeedEntry) GetWorkflow() *WorkflowResult { + if o == nil { + return nil + } + return o.Workflow +} + +func (o *FeedEntry) GetActivities() []UserActivity { + if o == nil { + return nil + } + return o.Activities +} + +func (o *FeedEntry) GetDocumentVisitorCount() *CountInfo { + if o == nil { + return nil + } + return o.DocumentVisitorCount +} diff --git a/tests/mockserver/internal/sdk/models/components/feedrequest.go b/tests/mockserver/internal/sdk/models/components/feedrequest.go new file mode 100644 index 00000000..163e42d2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/feedrequest.go @@ -0,0 +1,128 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type FeedRequestCategory string + +const ( + FeedRequestCategoryDocumentSuggestion FeedRequestCategory = "DOCUMENT_SUGGESTION" + FeedRequestCategoryDocumentSuggestionScenario FeedRequestCategory = "DOCUMENT_SUGGESTION_SCENARIO" + FeedRequestCategoryTrendingDocument FeedRequestCategory = "TRENDING_DOCUMENT" + FeedRequestCategoryVerificationReminder FeedRequestCategory = "VERIFICATION_REMINDER" + FeedRequestCategoryEvent FeedRequestCategory = "EVENT" + FeedRequestCategoryAnnouncement FeedRequestCategory = "ANNOUNCEMENT" + FeedRequestCategoryMention FeedRequestCategory = "MENTION" + FeedRequestCategoryDatasourceAffinity FeedRequestCategory = "DATASOURCE_AFFINITY" + FeedRequestCategoryRecent FeedRequestCategory = "RECENT" + FeedRequestCategoryCompanyResource FeedRequestCategory = "COMPANY_RESOURCE" + FeedRequestCategoryExperimental FeedRequestCategory = "EXPERIMENTAL" + FeedRequestCategoryPeopleCelebrations FeedRequestCategory = "PEOPLE_CELEBRATIONS" + FeedRequestCategoryDisplayableList FeedRequestCategory = "DISPLAYABLE_LIST" + FeedRequestCategorySocialLink FeedRequestCategory = "SOCIAL_LINK" + FeedRequestCategoryExternalTasks FeedRequestCategory = "EXTERNAL_TASKS" + FeedRequestCategoryZeroStateChatSuggestion FeedRequestCategory = "ZERO_STATE_CHAT_SUGGESTION" + FeedRequestCategoryZeroStateChatToolSuggestion FeedRequestCategory = "ZERO_STATE_CHAT_TOOL_SUGGESTION" + FeedRequestCategoryZeroStateWorkflowCreatedByMe FeedRequestCategory = "ZERO_STATE_WORKFLOW_CREATED_BY_ME" + FeedRequestCategoryZeroStateWorkflowFavorites FeedRequestCategory = "ZERO_STATE_WORKFLOW_FAVORITES" + FeedRequestCategoryZeroStateWorkflowPopular FeedRequestCategory = "ZERO_STATE_WORKFLOW_POPULAR" + FeedRequestCategoryZeroStateWorkflowSuggestion FeedRequestCategory = "ZERO_STATE_WORKFLOW_SUGGESTION" +) + +func (e FeedRequestCategory) ToPointer() *FeedRequestCategory { + return &e +} +func (e *FeedRequestCategory) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DOCUMENT_SUGGESTION": + fallthrough + case "DOCUMENT_SUGGESTION_SCENARIO": + fallthrough + case "TRENDING_DOCUMENT": + fallthrough + case "VERIFICATION_REMINDER": + fallthrough + case "EVENT": + fallthrough + case "ANNOUNCEMENT": + fallthrough + case "MENTION": + fallthrough + case "DATASOURCE_AFFINITY": + fallthrough + case "RECENT": + fallthrough + case "COMPANY_RESOURCE": + fallthrough + case "EXPERIMENTAL": + fallthrough + case "PEOPLE_CELEBRATIONS": + fallthrough + case "DISPLAYABLE_LIST": + fallthrough + case "SOCIAL_LINK": + fallthrough + case "EXTERNAL_TASKS": + fallthrough + case "ZERO_STATE_CHAT_SUGGESTION": + fallthrough + case "ZERO_STATE_CHAT_TOOL_SUGGESTION": + fallthrough + case "ZERO_STATE_WORKFLOW_CREATED_BY_ME": + fallthrough + case "ZERO_STATE_WORKFLOW_FAVORITES": + fallthrough + case "ZERO_STATE_WORKFLOW_POPULAR": + fallthrough + case "ZERO_STATE_WORKFLOW_SUGGESTION": + *e = FeedRequestCategory(v) + return nil + default: + return fmt.Errorf("invalid value for FeedRequestCategory: %v", v) + } +} + +type FeedRequest struct { + // Categories of content requested. An allowlist gives flexibility to request content separately or together. + Categories []FeedRequestCategory `json:"categories,omitempty"` + RequestOptions *FeedRequestOptions `json:"requestOptions,omitempty"` + // Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. + TimeoutMillis *int64 `json:"timeoutMillis,omitempty"` + SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` +} + +func (o *FeedRequest) GetCategories() []FeedRequestCategory { + if o == nil { + return nil + } + return o.Categories +} + +func (o *FeedRequest) GetRequestOptions() *FeedRequestOptions { + if o == nil { + return nil + } + return o.RequestOptions +} + +func (o *FeedRequest) GetTimeoutMillis() *int64 { + if o == nil { + return nil + } + return o.TimeoutMillis +} + +func (o *FeedRequest) GetSessionInfo() *SessionInfo { + if o == nil { + return nil + } + return o.SessionInfo +} diff --git a/tests/mockserver/internal/sdk/models/components/feedrequestoptions.go b/tests/mockserver/internal/sdk/models/components/feedrequestoptions.go new file mode 100644 index 00000000..7a1d1f2e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/feedrequestoptions.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CategoryToResultSize struct { + ResultSize *int64 `json:"resultSize,omitempty"` +} + +func (o *CategoryToResultSize) GetResultSize() *int64 { + if o == nil { + return nil + } + return o.ResultSize +} + +type FeedRequestOptions struct { + // Number of results asked in response. If a result is a collection, counts as one. + ResultSize int64 `json:"resultSize"` + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `json:"timezoneOffset,omitempty"` + // Mapping from category to number of results asked for the category. + CategoryToResultSize map[string]CategoryToResultSize `json:"categoryToResultSize,omitempty"` + // Datasources for which content should be included. Empty is for all. + DatasourceFilter []string `json:"datasourceFilter,omitempty"` + ChatZeroStateSuggestionOptions *ChatZeroStateSuggestionOptions `json:"chatZeroStateSuggestionOptions,omitempty"` +} + +func (o *FeedRequestOptions) GetResultSize() int64 { + if o == nil { + return 0 + } + return o.ResultSize +} + +func (o *FeedRequestOptions) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *FeedRequestOptions) GetCategoryToResultSize() map[string]CategoryToResultSize { + if o == nil { + return nil + } + return o.CategoryToResultSize +} + +func (o *FeedRequestOptions) GetDatasourceFilter() []string { + if o == nil { + return nil + } + return o.DatasourceFilter +} + +func (o *FeedRequestOptions) GetChatZeroStateSuggestionOptions() *ChatZeroStateSuggestionOptions { + if o == nil { + return nil + } + return o.ChatZeroStateSuggestionOptions +} diff --git a/tests/mockserver/internal/sdk/models/components/feedresponse.go b/tests/mockserver/internal/sdk/models/components/feedresponse.go new file mode 100644 index 00000000..54f9d1a8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/feedresponse.go @@ -0,0 +1,59 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type FeedResponse struct { + // List of experiment ids for the corresponding request. + ExperimentIds []int64 `json:"experimentIds,omitempty"` + // An opaque token that represents this particular feed response. + TrackingToken *string `json:"trackingToken,omitempty"` + // Server unix timestamp (in seconds since epoch UTC). + ServerTimestamp int64 `json:"serverTimestamp"` + Results []FeedResult `json:"results,omitempty"` + // Map from category to the list of facets that can be used to filter the entry's content. + FacetResults map[string][]FacetResult `json:"facetResults,omitempty"` + // The time window (in hours) used for generating user mentions. + MentionsTimeWindowInHours *int64 `json:"mentionsTimeWindowInHours,omitempty"` +} + +func (o *FeedResponse) GetExperimentIds() []int64 { + if o == nil { + return nil + } + return o.ExperimentIds +} + +func (o *FeedResponse) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *FeedResponse) GetServerTimestamp() int64 { + if o == nil { + return 0 + } + return o.ServerTimestamp +} + +func (o *FeedResponse) GetResults() []FeedResult { + if o == nil { + return nil + } + return o.Results +} + +func (o *FeedResponse) GetFacetResults() map[string][]FacetResult { + if o == nil { + return nil + } + return o.FacetResults +} + +func (o *FeedResponse) GetMentionsTimeWindowInHours() *int64 { + if o == nil { + return nil + } + return o.MentionsTimeWindowInHours +} diff --git a/tests/mockserver/internal/sdk/models/components/feedresult.go b/tests/mockserver/internal/sdk/models/components/feedresult.go new file mode 100644 index 00000000..7fa16e06 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/feedresult.go @@ -0,0 +1,133 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// FeedResultCategory - Category of the result, one of the requested categories in incoming request. +type FeedResultCategory string + +const ( + FeedResultCategoryDocumentSuggestion FeedResultCategory = "DOCUMENT_SUGGESTION" + FeedResultCategoryDocumentSuggestionScenario FeedResultCategory = "DOCUMENT_SUGGESTION_SCENARIO" + FeedResultCategoryTrendingDocument FeedResultCategory = "TRENDING_DOCUMENT" + FeedResultCategoryUseCase FeedResultCategory = "USE_CASE" + FeedResultCategoryVerificationReminder FeedResultCategory = "VERIFICATION_REMINDER" + FeedResultCategoryEvent FeedResultCategory = "EVENT" + FeedResultCategoryAnnouncement FeedResultCategory = "ANNOUNCEMENT" + FeedResultCategoryMention FeedResultCategory = "MENTION" + FeedResultCategoryDatasourceAffinity FeedResultCategory = "DATASOURCE_AFFINITY" + FeedResultCategoryRecent FeedResultCategory = "RECENT" + FeedResultCategoryCompanyResource FeedResultCategory = "COMPANY_RESOURCE" + FeedResultCategoryExperimental FeedResultCategory = "EXPERIMENTAL" + FeedResultCategoryPeopleCelebrations FeedResultCategory = "PEOPLE_CELEBRATIONS" + FeedResultCategorySocialLink FeedResultCategory = "SOCIAL_LINK" + FeedResultCategoryExternalTasks FeedResultCategory = "EXTERNAL_TASKS" + FeedResultCategoryDisplayableList FeedResultCategory = "DISPLAYABLE_LIST" + FeedResultCategoryZeroStateChatSuggestion FeedResultCategory = "ZERO_STATE_CHAT_SUGGESTION" + FeedResultCategoryZeroStateChatToolSuggestion FeedResultCategory = "ZERO_STATE_CHAT_TOOL_SUGGESTION" + FeedResultCategoryZeroStateWorkflowCreatedByMe FeedResultCategory = "ZERO_STATE_WORKFLOW_CREATED_BY_ME" + FeedResultCategoryZeroStateWorkflowFavorites FeedResultCategory = "ZERO_STATE_WORKFLOW_FAVORITES" + FeedResultCategoryZeroStateWorkflowPopular FeedResultCategory = "ZERO_STATE_WORKFLOW_POPULAR" + FeedResultCategoryZeroStateWorkflowSuggestion FeedResultCategory = "ZERO_STATE_WORKFLOW_SUGGESTION" +) + +func (e FeedResultCategory) ToPointer() *FeedResultCategory { + return &e +} +func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DOCUMENT_SUGGESTION": + fallthrough + case "DOCUMENT_SUGGESTION_SCENARIO": + fallthrough + case "TRENDING_DOCUMENT": + fallthrough + case "USE_CASE": + fallthrough + case "VERIFICATION_REMINDER": + fallthrough + case "EVENT": + fallthrough + case "ANNOUNCEMENT": + fallthrough + case "MENTION": + fallthrough + case "DATASOURCE_AFFINITY": + fallthrough + case "RECENT": + fallthrough + case "COMPANY_RESOURCE": + fallthrough + case "EXPERIMENTAL": + fallthrough + case "PEOPLE_CELEBRATIONS": + fallthrough + case "SOCIAL_LINK": + fallthrough + case "EXTERNAL_TASKS": + fallthrough + case "DISPLAYABLE_LIST": + fallthrough + case "ZERO_STATE_CHAT_SUGGESTION": + fallthrough + case "ZERO_STATE_CHAT_TOOL_SUGGESTION": + fallthrough + case "ZERO_STATE_WORKFLOW_CREATED_BY_ME": + fallthrough + case "ZERO_STATE_WORKFLOW_FAVORITES": + fallthrough + case "ZERO_STATE_WORKFLOW_POPULAR": + fallthrough + case "ZERO_STATE_WORKFLOW_SUGGESTION": + *e = FeedResultCategory(v) + return nil + default: + return fmt.Errorf("invalid value for FeedResultCategory: %v", v) + } +} + +type FeedResult struct { + // Category of the result, one of the requested categories in incoming request. + Category FeedResultCategory `json:"category"` + PrimaryEntry FeedEntry `json:"primaryEntry"` + // Secondary entries for the result e.g. suggested docs for the calendar, carousel. + SecondaryEntries []FeedEntry `json:"secondaryEntries,omitempty"` + // Rank of the result. Rank is suggested by server. Client side rank may differ. + Rank *int64 `json:"rank,omitempty"` +} + +func (o *FeedResult) GetCategory() FeedResultCategory { + if o == nil { + return FeedResultCategory("") + } + return o.Category +} + +func (o *FeedResult) GetPrimaryEntry() FeedEntry { + if o == nil { + return FeedEntry{} + } + return o.PrimaryEntry +} + +func (o *FeedResult) GetSecondaryEntries() []FeedEntry { + if o == nil { + return nil + } + return o.SecondaryEntries +} + +func (o *FeedResult) GetRank() *int64 { + if o == nil { + return nil + } + return o.Rank +} diff --git a/tests/mockserver/internal/sdk/models/components/followupaction.go b/tests/mockserver/internal/sdk/models/components/followupaction.go new file mode 100644 index 00000000..78bd5812 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/followupaction.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// FollowupAction - 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. +type FollowupAction struct { + // Unique identifier for this actionRun recommendation event. + ActionRunID *string `json:"actionRunId,omitempty"` + // The ID of the action instance that will be invoked. + ActionInstanceID *string `json:"actionInstanceId,omitempty"` + // The ID of the associated action. + ActionID *string `json:"actionId,omitempty"` + // Text to be displayed to the user when recommending the action instance. + RecommendationText *string `json:"recommendationText,omitempty"` + // The label to be used when displaying a button to execute this action instance. + ActionLabel *string `json:"actionLabel,omitempty"` + // Whether user confirmation is needed before executing this action instance. + UserConfirmationRequired *bool `json:"userConfirmationRequired,omitempty"` +} + +func (o *FollowupAction) GetActionRunID() *string { + if o == nil { + return nil + } + return o.ActionRunID +} + +func (o *FollowupAction) GetActionInstanceID() *string { + if o == nil { + return nil + } + return o.ActionInstanceID +} + +func (o *FollowupAction) GetActionID() *string { + if o == nil { + return nil + } + return o.ActionID +} + +func (o *FollowupAction) GetRecommendationText() *string { + if o == nil { + return nil + } + return o.RecommendationText +} + +func (o *FollowupAction) GetActionLabel() *string { + if o == nil { + return nil + } + return o.ActionLabel +} + +func (o *FollowupAction) GetUserConfirmationRequired() *bool { + if o == nil { + return nil + } + return o.UserConfirmationRequired +} diff --git a/tests/mockserver/internal/sdk/models/components/generatedattachment.go b/tests/mockserver/internal/sdk/models/components/generatedattachment.go new file mode 100644 index 00000000..0e418f08 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/generatedattachment.go @@ -0,0 +1,57 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// GeneratedAttachment - These are attachments that aren't natively present on the event, and have been smartly suggested. +type GeneratedAttachment struct { + // The name of method used to surface relevant data for a given calendar event. + StrategyName *EventStrategyName `json:"strategyName,omitempty"` + Documents []Document `json:"documents,omitempty"` + Person *Person `json:"person,omitempty"` + Customer *Customer `json:"customer,omitempty"` + // A list of links to external sources outside of Glean. + ExternalLinks []StructuredLink `json:"externalLinks,omitempty"` + Content []GeneratedAttachmentContent `json:"content,omitempty"` +} + +func (o *GeneratedAttachment) GetStrategyName() *EventStrategyName { + if o == nil { + return nil + } + return o.StrategyName +} + +func (o *GeneratedAttachment) GetDocuments() []Document { + if o == nil { + return nil + } + return o.Documents +} + +func (o *GeneratedAttachment) GetPerson() *Person { + if o == nil { + return nil + } + return o.Person +} + +func (o *GeneratedAttachment) GetCustomer() *Customer { + if o == nil { + return nil + } + return o.Customer +} + +func (o *GeneratedAttachment) GetExternalLinks() []StructuredLink { + if o == nil { + return nil + } + return o.ExternalLinks +} + +func (o *GeneratedAttachment) GetContent() []GeneratedAttachmentContent { + if o == nil { + return nil + } + return o.Content +} diff --git a/tests/mockserver/internal/sdk/models/components/generatedattachmentcontent.go b/tests/mockserver/internal/sdk/models/components/generatedattachmentcontent.go new file mode 100644 index 00000000..5b1366c1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/generatedattachmentcontent.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// GeneratedAttachmentContent - Content that has been generated or extrapolated from the documents present in the document field. +type GeneratedAttachmentContent struct { + // The header describing the generated content. + DisplayHeader *string `json:"displayHeader,omitempty"` + // The content that has been generated. + Text *string `json:"text,omitempty"` +} + +func (o *GeneratedAttachmentContent) GetDisplayHeader() *string { + if o == nil { + return nil + } + return o.DisplayHeader +} + +func (o *GeneratedAttachmentContent) GetText() *string { + if o == nil { + return nil + } + return o.Text +} diff --git a/tests/mockserver/internal/sdk/models/components/generatedqna.go b/tests/mockserver/internal/sdk/models/components/generatedqna.go new file mode 100644 index 00000000..ddecb6d8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/generatedqna.go @@ -0,0 +1,128 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// GeneratedQnaStatus - Status of backend generating the answer +type GeneratedQnaStatus string + +const ( + GeneratedQnaStatusComputing GeneratedQnaStatus = "COMPUTING" + GeneratedQnaStatusDisabled GeneratedQnaStatus = "DISABLED" + GeneratedQnaStatusFailed GeneratedQnaStatus = "FAILED" + GeneratedQnaStatusNoAnswer GeneratedQnaStatus = "NO_ANSWER" + GeneratedQnaStatusSkipped GeneratedQnaStatus = "SKIPPED" + GeneratedQnaStatusStreaming GeneratedQnaStatus = "STREAMING" + GeneratedQnaStatusSucceeded GeneratedQnaStatus = "SUCCEEDED" + GeneratedQnaStatusTimeout GeneratedQnaStatus = "TIMEOUT" +) + +func (e GeneratedQnaStatus) ToPointer() *GeneratedQnaStatus { + return &e +} +func (e *GeneratedQnaStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "COMPUTING": + fallthrough + case "DISABLED": + fallthrough + case "FAILED": + fallthrough + case "NO_ANSWER": + fallthrough + case "SKIPPED": + fallthrough + case "STREAMING": + fallthrough + case "SUCCEEDED": + fallthrough + case "TIMEOUT": + *e = GeneratedQnaStatus(v) + return nil + default: + return fmt.Errorf("invalid value for GeneratedQnaStatus: %v", v) + } +} + +type GeneratedQna struct { + // Search query rephrased into a question. + Question *string `json:"question,omitempty"` + // Answer generated for the given query or the generated question. + Answer *string `json:"answer,omitempty"` + // List of all follow-up prompts generated for the given query or the generated question. + FollowUpPrompts []string `json:"followUpPrompts,omitempty"` + // List of follow-up actions generated for the given query or the generated question. + FollowupActions []FollowupAction `json:"followupActions,omitempty"` + // Answer subsections to mark with special formatting (citations, bolding etc) + Ranges []TextRange `json:"ranges,omitempty"` + // Status of backend generating the answer + Status *GeneratedQnaStatus `json:"status,omitempty"` + // An opaque cursor representing the search request + Cursor *string `json:"cursor,omitempty"` + // An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. + TrackingToken *string `json:"trackingToken,omitempty"` +} + +func (o *GeneratedQna) GetQuestion() *string { + if o == nil { + return nil + } + return o.Question +} + +func (o *GeneratedQna) GetAnswer() *string { + if o == nil { + return nil + } + return o.Answer +} + +func (o *GeneratedQna) GetFollowUpPrompts() []string { + if o == nil { + return nil + } + return o.FollowUpPrompts +} + +func (o *GeneratedQna) GetFollowupActions() []FollowupAction { + if o == nil { + return nil + } + return o.FollowupActions +} + +func (o *GeneratedQna) GetRanges() []TextRange { + if o == nil { + return nil + } + return o.Ranges +} + +func (o *GeneratedQna) GetStatus() *GeneratedQnaStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *GeneratedQna) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *GeneratedQna) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} diff --git a/tests/mockserver/internal/sdk/models/components/getanswererror.go b/tests/mockserver/internal/sdk/models/components/getanswererror.go new file mode 100644 index 00000000..76937f9b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getanswererror.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type GetAnswerErrorErrorType string + +const ( + GetAnswerErrorErrorTypeNoPermission GetAnswerErrorErrorType = "NO_PERMISSION" + GetAnswerErrorErrorTypeInvalidID GetAnswerErrorErrorType = "INVALID_ID" +) + +func (e GetAnswerErrorErrorType) ToPointer() *GetAnswerErrorErrorType { + return &e +} +func (e *GetAnswerErrorErrorType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NO_PERMISSION": + fallthrough + case "INVALID_ID": + *e = GetAnswerErrorErrorType(v) + return nil + default: + return fmt.Errorf("invalid value for GetAnswerErrorErrorType: %v", v) + } +} + +type GetAnswerError struct { + ErrorType *GetAnswerErrorErrorType `json:"errorType,omitempty"` + AnswerAuthor *Person `json:"answerAuthor,omitempty"` +} + +func (o *GetAnswerError) GetErrorType() *GetAnswerErrorErrorType { + if o == nil { + return nil + } + return o.ErrorType +} + +func (o *GetAnswerError) GetAnswerAuthor() *Person { + if o == nil { + return nil + } + return o.AnswerAuthor +} diff --git a/tests/mockserver/internal/sdk/models/components/getanswerrequest.go b/tests/mockserver/internal/sdk/models/components/getanswerrequest.go new file mode 100644 index 00000000..2f1611b9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getanswerrequest.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetAnswerRequest struct { + // The opaque ID of the Answer. + ID *int64 `json:"id,omitempty"` + // 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. + DocID *string `json:"docId,omitempty"` +} + +func (o *GetAnswerRequest) GetID() *int64 { + if o == nil { + return nil + } + return o.ID +} + +func (o *GetAnswerRequest) GetDocID() *string { + if o == nil { + return nil + } + return o.DocID +} diff --git a/tests/mockserver/internal/sdk/models/components/getanswerresponse.go b/tests/mockserver/internal/sdk/models/components/getanswerresponse.go new file mode 100644 index 00000000..0272f330 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getanswerresponse.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetAnswerResponse struct { + AnswerResult *AnswerResult `json:"answerResult,omitempty"` + Error *GetAnswerError `json:"error,omitempty"` +} + +func (o *GetAnswerResponse) GetAnswerResult() *AnswerResult { + if o == nil { + return nil + } + return o.AnswerResult +} + +func (o *GetAnswerResponse) GetError() *GetAnswerError { + if o == nil { + return nil + } + return o.Error +} diff --git a/tests/mockserver/internal/sdk/models/components/getchatapplicationrequest.go b/tests/mockserver/internal/sdk/models/components/getchatapplicationrequest.go new file mode 100644 index 00000000..ed309bf7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getchatapplicationrequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetChatApplicationRequest struct { + // The id of the Chat application to be retrieved. + ID string `json:"id"` +} + +func (o *GetChatApplicationRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/getchatapplicationresponse.go b/tests/mockserver/internal/sdk/models/components/getchatapplicationresponse.go new file mode 100644 index 00000000..e55f9694 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getchatapplicationresponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetChatApplicationResponse struct { + Application any `json:"application,omitempty"` +} + +func (o *GetChatApplicationResponse) GetApplication() any { + if o == nil { + return nil + } + return o.Application +} diff --git a/tests/mockserver/internal/sdk/models/components/getchatfilesrequest.go b/tests/mockserver/internal/sdk/models/components/getchatfilesrequest.go new file mode 100644 index 00000000..01e36cf0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getchatfilesrequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetChatFilesRequest struct { + // IDs of files to fetch. + FileIds []string `json:"fileIds"` +} + +func (o *GetChatFilesRequest) GetFileIds() []string { + if o == nil { + return []string{} + } + return o.FileIds +} diff --git a/tests/mockserver/internal/sdk/models/components/getchatfilesresponse.go b/tests/mockserver/internal/sdk/models/components/getchatfilesresponse.go new file mode 100644 index 00000000..1148537a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getchatfilesresponse.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetChatFilesResponse struct { + // A map of file IDs to ChatFile structs. + Files map[string]ChatFile `json:"files,omitempty"` +} + +func (o *GetChatFilesResponse) GetFiles() map[string]ChatFile { + if o == nil { + return nil + } + return o.Files +} diff --git a/tests/mockserver/internal/sdk/models/components/getchatrequest.go b/tests/mockserver/internal/sdk/models/components/getchatrequest.go new file mode 100644 index 00000000..82118136 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getchatrequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetChatRequest struct { + // The id of the Chat to be retrieved. + ID string `json:"id"` +} + +func (o *GetChatRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/getchatresponse.go b/tests/mockserver/internal/sdk/models/components/getchatresponse.go new file mode 100644 index 00000000..88ac7a95 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getchatresponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetChatResponse struct { + ChatResult *ChatResult `json:"chatResult,omitempty"` +} + +func (o *GetChatResponse) GetChatResult() *ChatResult { + if o == nil { + return nil + } + return o.ChatResult +} diff --git a/tests/mockserver/internal/sdk/models/components/getcollectionrequest.go b/tests/mockserver/internal/sdk/models/components/getcollectionrequest.go new file mode 100644 index 00000000..89a1e14b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getcollectionrequest.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetCollectionRequest struct { + // The ID of the Collection to be retrieved. + ID int64 `json:"id"` + // Whether or not to include the Collection Items in this Collection. Only request if absolutely required, as this is expensive. + WithItems *bool `json:"withItems,omitempty"` + // Whether or not to include the top level Collection in this Collection's hierarchy. + WithHierarchy *bool `json:"withHierarchy,omitempty"` + // The datasource allowed in the Collection returned. + AllowedDatasource *string `json:"allowedDatasource,omitempty"` +} + +func (o *GetCollectionRequest) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *GetCollectionRequest) GetWithItems() *bool { + if o == nil { + return nil + } + return o.WithItems +} + +func (o *GetCollectionRequest) GetWithHierarchy() *bool { + if o == nil { + return nil + } + return o.WithHierarchy +} + +func (o *GetCollectionRequest) GetAllowedDatasource() *string { + if o == nil { + return nil + } + return o.AllowedDatasource +} diff --git a/tests/mockserver/internal/sdk/models/components/getcollectionresponse.go b/tests/mockserver/internal/sdk/models/components/getcollectionresponse.go new file mode 100644 index 00000000..e8446d27 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getcollectionresponse.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetCollectionResponse struct { + Collection *Collection `json:"collection,omitempty"` + RootCollection *Collection `json:"rootCollection,omitempty"` + // An opaque token that represents this particular Collection. To be used for `/feedback` reporting. + TrackingToken *string `json:"trackingToken,omitempty"` + Error *CollectionError `json:"error,omitempty"` +} + +func (o *GetCollectionResponse) GetCollection() *Collection { + if o == nil { + return nil + } + return o.Collection +} + +func (o *GetCollectionResponse) GetRootCollection() *Collection { + if o == nil { + return nil + } + return o.RootCollection +} + +func (o *GetCollectionResponse) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *GetCollectionResponse) GetError() *CollectionError { + if o == nil { + return nil + } + return o.Error +} diff --git a/tests/mockserver/internal/sdk/models/components/getdatasourceconfigrequest.go b/tests/mockserver/internal/sdk/models/components/getdatasourceconfigrequest.go new file mode 100644 index 00000000..61fa0d59 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdatasourceconfigrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// GetDatasourceConfigRequest - Describes the request body of the /getdatasourceconfig API call +type GetDatasourceConfigRequest struct { + // Datasource name for which config is needed. + Datasource string `json:"datasource"` +} + +func (o *GetDatasourceConfigRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} diff --git a/tests/mockserver/internal/sdk/models/components/getdlpreportresponse.go b/tests/mockserver/internal/sdk/models/components/getdlpreportresponse.go new file mode 100644 index 00000000..275dbf8c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdlpreportresponse.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetDlpReportResponse struct { + // Full policy information that will be used for scans. + Report *DlpReport `json:"report,omitempty"` +} + +func (o *GetDlpReportResponse) GetReport() *DlpReport { + if o == nil { + return nil + } + return o.Report +} diff --git a/tests/mockserver/internal/sdk/models/components/getdocpermissionsrequest.go b/tests/mockserver/internal/sdk/models/components/getdocpermissionsrequest.go new file mode 100644 index 00000000..05b37eac --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdocpermissionsrequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetDocPermissionsRequest struct { + // The Glean Document ID to retrieve permissions for. + DocumentID *string `json:"documentId,omitempty"` +} + +func (o *GetDocPermissionsRequest) GetDocumentID() *string { + if o == nil { + return nil + } + return o.DocumentID +} diff --git a/tests/mockserver/internal/sdk/models/components/getdocpermissionsresponse.go b/tests/mockserver/internal/sdk/models/components/getdocpermissionsresponse.go new file mode 100644 index 00000000..8e244e14 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdocpermissionsresponse.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetDocPermissionsResponse struct { + // 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'. + AllowedUserEmails []string `json:"allowedUserEmails,omitempty"` +} + +func (o *GetDocPermissionsResponse) GetAllowedUserEmails() []string { + if o == nil { + return nil + } + return o.AllowedUserEmails +} diff --git a/tests/mockserver/internal/sdk/models/components/getdocumentcountrequest.go b/tests/mockserver/internal/sdk/models/components/getdocumentcountrequest.go new file mode 100644 index 00000000..a0961331 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdocumentcountrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// GetDocumentCountRequest - Describes the request body of the /getdocumentcount API call +type GetDocumentCountRequest struct { + // Datasource name for which document count is needed. + Datasource string `json:"datasource"` +} + +func (o *GetDocumentCountRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} diff --git a/tests/mockserver/internal/sdk/models/components/getdocumentcountresponse.go b/tests/mockserver/internal/sdk/models/components/getdocumentcountresponse.go new file mode 100644 index 00000000..1691776f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdocumentcountresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// GetDocumentCountResponse - Describes the response body of the /getdocumentcount API call +type GetDocumentCountResponse struct { + // Number of documents corresponding to the specified custom datasource. + DocumentCount *int64 `json:"documentCount,omitempty"` +} + +func (o *GetDocumentCountResponse) GetDocumentCount() *int64 { + if o == nil { + return nil + } + return o.DocumentCount +} diff --git a/tests/mockserver/internal/sdk/models/components/getdocumentsbyfacetsrequest.go b/tests/mockserver/internal/sdk/models/components/getdocumentsbyfacetsrequest.go new file mode 100644 index 00000000..62e8ccc0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdocumentsbyfacetsrequest.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetDocumentsByFacetsRequest struct { + // Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. + DatasourcesFilter []string `json:"datasourcesFilter,omitempty"` + // A list of facet filter sets that will be OR'ed together. An AND is assumed between different filters in each set. + FilterSets []FacetFilterSet `json:"filterSets"` + // Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. + Cursor *string `json:"cursor,omitempty"` +} + +func (o *GetDocumentsByFacetsRequest) GetDatasourcesFilter() []string { + if o == nil { + return nil + } + return o.DatasourcesFilter +} + +func (o *GetDocumentsByFacetsRequest) GetFilterSets() []FacetFilterSet { + if o == nil { + return []FacetFilterSet{} + } + return o.FilterSets +} + +func (o *GetDocumentsByFacetsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} diff --git a/tests/mockserver/internal/sdk/models/components/getdocumentsbyfacetsresponse.go b/tests/mockserver/internal/sdk/models/components/getdocumentsbyfacetsresponse.go new file mode 100644 index 00000000..74a0f90f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdocumentsbyfacetsresponse.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetDocumentsByFacetsResponse struct { + // The document details, ordered by score. + Documents []Document `json:"documents,omitempty"` + // Whether more results are available. Use cursor to retrieve them. + HasMoreResults *bool `json:"hasMoreResults,omitempty"` + // Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query. + Cursor *string `json:"cursor,omitempty"` +} + +func (o *GetDocumentsByFacetsResponse) GetDocuments() []Document { + if o == nil { + return nil + } + return o.Documents +} + +func (o *GetDocumentsByFacetsResponse) GetHasMoreResults() *bool { + if o == nil { + return nil + } + return o.HasMoreResults +} + +func (o *GetDocumentsByFacetsResponse) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} diff --git a/tests/mockserver/internal/sdk/models/components/getdocumentsrequest.go b/tests/mockserver/internal/sdk/models/components/getdocumentsrequest.go new file mode 100644 index 00000000..48c69211 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdocumentsrequest.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type GetDocumentsRequestIncludeField string + +const ( + GetDocumentsRequestIncludeFieldLastViewedAt GetDocumentsRequestIncludeField = "LAST_VIEWED_AT" + GetDocumentsRequestIncludeFieldVisitorsCount GetDocumentsRequestIncludeField = "VISITORS_COUNT" + GetDocumentsRequestIncludeFieldRecentShares GetDocumentsRequestIncludeField = "RECENT_SHARES" + GetDocumentsRequestIncludeFieldDocumentContent GetDocumentsRequestIncludeField = "DOCUMENT_CONTENT" +) + +func (e GetDocumentsRequestIncludeField) ToPointer() *GetDocumentsRequestIncludeField { + return &e +} +func (e *GetDocumentsRequestIncludeField) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LAST_VIEWED_AT": + fallthrough + case "VISITORS_COUNT": + fallthrough + case "RECENT_SHARES": + fallthrough + case "DOCUMENT_CONTENT": + *e = GetDocumentsRequestIncludeField(v) + return nil + default: + return fmt.Errorf("invalid value for GetDocumentsRequestIncludeField: %v", v) + } +} + +type GetDocumentsRequest struct { + // The specification for the documents to be retrieved. + DocumentSpecs []DocumentSpecUnion `json:"documentSpecs"` + // List of Document fields to return (that aren't returned by default) + IncludeFields []GetDocumentsRequestIncludeField `json:"includeFields,omitempty"` +} + +func (o *GetDocumentsRequest) GetDocumentSpecs() []DocumentSpecUnion { + if o == nil { + return []DocumentSpecUnion{} + } + return o.DocumentSpecs +} + +func (o *GetDocumentsRequest) GetIncludeFields() []GetDocumentsRequestIncludeField { + if o == nil { + return nil + } + return o.IncludeFields +} diff --git a/tests/mockserver/internal/sdk/models/components/getdocumentsresponse.go b/tests/mockserver/internal/sdk/models/components/getdocumentsresponse.go new file mode 100644 index 00000000..f1940563 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdocumentsresponse.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetDocumentsResponse struct { + // The document details or the error if document is not found. + Documents map[string]DocumentOrErrorUnion `json:"documents,omitempty"` +} + +func (o *GetDocumentsResponse) GetDocuments() map[string]DocumentOrErrorUnion { + if o == nil { + return nil + } + return o.Documents +} diff --git a/tests/mockserver/internal/sdk/models/components/getdocumentstatusrequest.go b/tests/mockserver/internal/sdk/models/components/getdocumentstatusrequest.go new file mode 100644 index 00000000..a16e6e72 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdocumentstatusrequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// GetDocumentStatusRequest - Describes the request body for /getdocumentstatus API call +type GetDocumentStatusRequest struct { + // Datasource to get fetch document status for + Datasource string `json:"datasource"` + // Object type of the document to get the status for + ObjectType string `json:"objectType"` + // Glean Document ID within the datasource to get the status for. + DocID string `json:"docId"` +} + +func (o *GetDocumentStatusRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *GetDocumentStatusRequest) GetObjectType() string { + if o == nil { + return "" + } + return o.ObjectType +} + +func (o *GetDocumentStatusRequest) GetDocID() string { + if o == nil { + return "" + } + return o.DocID +} diff --git a/tests/mockserver/internal/sdk/models/components/getdocumentstatusresponse.go b/tests/mockserver/internal/sdk/models/components/getdocumentstatusresponse.go new file mode 100644 index 00000000..b87bd528 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdocumentstatusresponse.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// GetDocumentStatusResponse - Describes the response body of the /getdocumentstatus API call +type GetDocumentStatusResponse struct { + // Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN + UploadStatus *string `json:"uploadStatus,omitempty"` + // Time of last successful upload, in epoch seconds + LastUploadedAt *int64 `json:"lastUploadedAt,omitempty"` + // Indexing status, enum of NOT_INDEXED, INDEXED, STATUS_UNKNOWN + IndexingStatus *string `json:"indexingStatus,omitempty"` + // Time of last successful indexing, in epoch seconds + LastIndexedAt *int64 `json:"lastIndexedAt,omitempty"` +} + +func (o *GetDocumentStatusResponse) GetUploadStatus() *string { + if o == nil { + return nil + } + return o.UploadStatus +} + +func (o *GetDocumentStatusResponse) GetLastUploadedAt() *int64 { + if o == nil { + return nil + } + return o.LastUploadedAt +} + +func (o *GetDocumentStatusResponse) GetIndexingStatus() *string { + if o == nil { + return nil + } + return o.IndexingStatus +} + +func (o *GetDocumentStatusResponse) GetLastIndexedAt() *int64 { + if o == nil { + return nil + } + return o.LastIndexedAt +} diff --git a/tests/mockserver/internal/sdk/models/components/getdocumentvisibilityoverridesresponse.go b/tests/mockserver/internal/sdk/models/components/getdocumentvisibilityoverridesresponse.go new file mode 100644 index 00000000..5bd08e14 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getdocumentvisibilityoverridesresponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetDocumentVisibilityOverridesResponse struct { + VisibilityOverrides []DocumentVisibilityOverride `json:"visibilityOverrides,omitempty"` +} + +func (o *GetDocumentVisibilityOverridesResponse) GetVisibilityOverrides() []DocumentVisibilityOverride { + if o == nil { + return nil + } + return o.VisibilityOverrides +} diff --git a/tests/mockserver/internal/sdk/models/components/getpinrequest.go b/tests/mockserver/internal/sdk/models/components/getpinrequest.go new file mode 100644 index 00000000..f126af9c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getpinrequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetPinRequest struct { + // The opaque id of the pin to be fetched. + ID *string `json:"id,omitempty"` +} + +func (o *GetPinRequest) GetID() *string { + if o == nil { + return nil + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/getpinresponse.go b/tests/mockserver/internal/sdk/models/components/getpinresponse.go new file mode 100644 index 00000000..e6eb59d7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getpinresponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetPinResponse struct { + Pin *PinDocument `json:"pin,omitempty"` +} + +func (o *GetPinResponse) GetPin() *PinDocument { + if o == nil { + return nil + } + return o.Pin +} diff --git a/tests/mockserver/internal/sdk/models/components/getshortcutrequestunion.go b/tests/mockserver/internal/sdk/models/components/getshortcutrequestunion.go new file mode 100644 index 00000000..b85f7dee --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getshortcutrequestunion.go @@ -0,0 +1,84 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/utils" +) + +type GetShortcutRequest struct { + // The alias for the shortcut, including any arguments for variable shortcuts. + Alias string `json:"alias"` +} + +func (o *GetShortcutRequest) GetAlias() string { + if o == nil { + return "" + } + return o.Alias +} + +type GetShortcutRequestUnionType string + +const ( + GetShortcutRequestUnionTypeUserGeneratedContentID GetShortcutRequestUnionType = "UserGeneratedContentId" + GetShortcutRequestUnionTypeGetShortcutRequest GetShortcutRequestUnionType = "GetShortcutRequest" +) + +type GetShortcutRequestUnion struct { + UserGeneratedContentID *UserGeneratedContentID + GetShortcutRequest *GetShortcutRequest + + Type GetShortcutRequestUnionType +} + +func CreateGetShortcutRequestUnionUserGeneratedContentID(userGeneratedContentID UserGeneratedContentID) GetShortcutRequestUnion { + typ := GetShortcutRequestUnionTypeUserGeneratedContentID + + return GetShortcutRequestUnion{ + UserGeneratedContentID: &userGeneratedContentID, + Type: typ, + } +} + +func CreateGetShortcutRequestUnionGetShortcutRequest(getShortcutRequest GetShortcutRequest) GetShortcutRequestUnion { + typ := GetShortcutRequestUnionTypeGetShortcutRequest + + return GetShortcutRequestUnion{ + GetShortcutRequest: &getShortcutRequest, + Type: typ, + } +} + +func (u *GetShortcutRequestUnion) UnmarshalJSON(data []byte) error { + + var userGeneratedContentID UserGeneratedContentID = UserGeneratedContentID{} + if err := utils.UnmarshalJSON(data, &userGeneratedContentID, "", true, true); err == nil { + u.UserGeneratedContentID = &userGeneratedContentID + u.Type = GetShortcutRequestUnionTypeUserGeneratedContentID + return nil + } + + var getShortcutRequest GetShortcutRequest = GetShortcutRequest{} + if err := utils.UnmarshalJSON(data, &getShortcutRequest, "", true, true); err == nil { + u.GetShortcutRequest = &getShortcutRequest + u.Type = GetShortcutRequestUnionTypeGetShortcutRequest + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetShortcutRequestUnion", string(data)) +} + +func (u GetShortcutRequestUnion) MarshalJSON() ([]byte, error) { + if u.UserGeneratedContentID != nil { + return utils.MarshalJSON(u.UserGeneratedContentID, "", true) + } + + if u.GetShortcutRequest != nil { + return utils.MarshalJSON(u.GetShortcutRequest, "", true) + } + + return nil, errors.New("could not marshal union type GetShortcutRequestUnion: all fields are null") +} diff --git a/tests/mockserver/internal/sdk/models/components/getshortcutresponse.go b/tests/mockserver/internal/sdk/models/components/getshortcutresponse.go new file mode 100644 index 00000000..4e6db38c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getshortcutresponse.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GetShortcutResponse struct { + Shortcut *Shortcut `json:"shortcut,omitempty"` + Error *ShortcutError `json:"error,omitempty"` +} + +func (o *GetShortcutResponse) GetShortcut() *Shortcut { + if o == nil { + return nil + } + return o.Shortcut +} + +func (o *GetShortcutResponse) GetError() *ShortcutError { + if o == nil { + return nil + } + return o.Error +} diff --git a/tests/mockserver/internal/sdk/models/components/getusercountrequest.go b/tests/mockserver/internal/sdk/models/components/getusercountrequest.go new file mode 100644 index 00000000..c86badbe --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getusercountrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// GetUserCountRequest - Describes the request body of the /getusercount API call +type GetUserCountRequest struct { + // Datasource name for which user count is needed. + Datasource string `json:"datasource"` +} + +func (o *GetUserCountRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} diff --git a/tests/mockserver/internal/sdk/models/components/getusercountresponse.go b/tests/mockserver/internal/sdk/models/components/getusercountresponse.go new file mode 100644 index 00000000..49761b93 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/getusercountresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// GetUserCountResponse - Describes the response body of the /getusercount API call +type GetUserCountResponse struct { + // Number of users corresponding to the specified custom datasource. + UserCount *int64 `json:"userCount,omitempty"` +} + +func (o *GetUserCountResponse) GetUserCount() *int64 { + if o == nil { + return nil + } + return o.UserCount +} diff --git a/tests/mockserver/internal/sdk/models/components/gleanassistinsightsresponse.go b/tests/mockserver/internal/sdk/models/components/gleanassistinsightsresponse.go new file mode 100644 index 00000000..9bc58150 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/gleanassistinsightsresponse.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GleanAssistInsightsResponse struct { + // Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). + LastLogTimestamp *int64 `json:"lastLogTimestamp,omitempty"` + // Insights for all active users with respect to set of actions. + ActivityInsights []UserActivityInsight `json:"activityInsights,omitempty"` + // Total number of active users in the requested period. + TotalActiveUsers *int64 `json:"totalActiveUsers,omitempty"` + // List of datasource instances for which glean assist is enabled. + DatasourceInstances []string `json:"datasourceInstances,omitempty"` + // List of departments applicable for users tab. + Departments []string `json:"departments,omitempty"` +} + +func (o *GleanAssistInsightsResponse) GetLastLogTimestamp() *int64 { + if o == nil { + return nil + } + return o.LastLogTimestamp +} + +func (o *GleanAssistInsightsResponse) GetActivityInsights() []UserActivityInsight { + if o == nil { + return nil + } + return o.ActivityInsights +} + +func (o *GleanAssistInsightsResponse) GetTotalActiveUsers() *int64 { + if o == nil { + return nil + } + return o.TotalActiveUsers +} + +func (o *GleanAssistInsightsResponse) GetDatasourceInstances() []string { + if o == nil { + return nil + } + return o.DatasourceInstances +} + +func (o *GleanAssistInsightsResponse) GetDepartments() []string { + if o == nil { + return nil + } + return o.Departments +} diff --git a/tests/mockserver/internal/sdk/models/components/gleandataerror.go b/tests/mockserver/internal/sdk/models/components/gleandataerror.go new file mode 100644 index 00000000..12eecd2e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/gleandataerror.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type GleanDataError struct { + // Indicates the gmail results could not be fetched due to bad token. + BadGmailToken *bool `json:"badGmailToken,omitempty"` + // Indicates the outlook results could not be fetched due to bad token. + BadOutlookToken *bool `json:"badOutlookToken,omitempty"` + // Indicates results could not be fetched due to invalid operators in the query. + InvalidOperators []InvalidOperatorValueError `json:"invalidOperators,omitempty"` + ErrorMessages []ErrorMessage `json:"errorMessages,omitempty"` +} + +func (o *GleanDataError) GetBadGmailToken() *bool { + if o == nil { + return nil + } + return o.BadGmailToken +} + +func (o *GleanDataError) GetBadOutlookToken() *bool { + if o == nil { + return nil + } + return o.BadOutlookToken +} + +func (o *GleanDataError) GetInvalidOperators() []InvalidOperatorValueError { + if o == nil { + return nil + } + return o.InvalidOperators +} + +func (o *GleanDataError) GetErrorMessages() []ErrorMessage { + if o == nil { + return nil + } + return o.ErrorMessages +} diff --git a/tests/mockserver/internal/sdk/models/components/grantpermission.go b/tests/mockserver/internal/sdk/models/components/grantpermission.go new file mode 100644 index 00000000..b7685b36 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/grantpermission.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// GrantPermission - Describes the grant permission level that a user has for a specific feature +type GrantPermission struct { + // Describes the scope for a ReadPermission, WritePermission, or GrantPermission object + ScopeType *ScopeType `json:"scopeType,omitempty"` +} + +func (o *GrantPermission) GetScopeType() *ScopeType { + if o == nil { + return nil + } + return o.ScopeType +} diff --git a/tests/mockserver/internal/sdk/models/components/greenlistusersrequest.go b/tests/mockserver/internal/sdk/models/components/greenlistusersrequest.go new file mode 100644 index 00000000..7cfe20c0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/greenlistusersrequest.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// GreenlistUsersRequest - Describes the request body of the /betausers API call +type GreenlistUsersRequest struct { + // Datasource which needs to be made visible to users specified in the `emails` field. + Datasource string `json:"datasource"` + // The emails of the beta users + Emails []string `json:"emails"` +} + +func (o *GreenlistUsersRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *GreenlistUsersRequest) GetEmails() []string { + if o == nil { + return []string{} + } + return o.Emails +} diff --git a/tests/mockserver/internal/sdk/models/components/group.go b/tests/mockserver/internal/sdk/models/components/group.go new file mode 100644 index 00000000..1b639d40 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/group.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Group struct { + // The type of user group + Type GroupType `json:"type"` + // A unique identifier for the group. May be the same as name. + ID string `json:"id"` + // Name of the group. + Name *string `json:"name,omitempty"` +} + +func (o *Group) GetType() GroupType { + if o == nil { + return GroupType("") + } + return o.Type +} + +func (o *Group) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Group) GetName() *string { + if o == nil { + return nil + } + return o.Name +} diff --git a/tests/mockserver/internal/sdk/models/components/grouptype.go b/tests/mockserver/internal/sdk/models/components/grouptype.go new file mode 100644 index 00000000..3f25f70b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/grouptype.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// GroupType - The type of user group +type GroupType string + +const ( + GroupTypeDepartment GroupType = "DEPARTMENT" + GroupTypeAll GroupType = "ALL" + GroupTypeTeam GroupType = "TEAM" + GroupTypeJobTitle GroupType = "JOB_TITLE" + GroupTypeRoleType GroupType = "ROLE_TYPE" + GroupTypeLocation GroupType = "LOCATION" + GroupTypeRegion GroupType = "REGION" + GroupTypeExternalGroup GroupType = "EXTERNAL_GROUP" +) + +func (e GroupType) ToPointer() *GroupType { + return &e +} +func (e *GroupType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DEPARTMENT": + fallthrough + case "ALL": + fallthrough + case "TEAM": + fallthrough + case "JOB_TITLE": + fallthrough + case "ROLE_TYPE": + fallthrough + case "LOCATION": + fallthrough + case "REGION": + fallthrough + case "EXTERNAL_GROUP": + *e = GroupType(v) + return nil + default: + return fmt.Errorf("invalid value for GroupType: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/hotword.go b/tests/mockserver/internal/sdk/models/components/hotword.go new file mode 100644 index 00000000..ed23ff8d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/hotword.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Hotword struct { + Regex *string `json:"regex,omitempty"` + Proximity *HotwordProximity `json:"proximity,omitempty"` +} + +func (o *Hotword) GetRegex() *string { + if o == nil { + return nil + } + return o.Regex +} + +func (o *Hotword) GetProximity() *HotwordProximity { + if o == nil { + return nil + } + return o.Proximity +} diff --git a/tests/mockserver/internal/sdk/models/components/hotwordproximity.go b/tests/mockserver/internal/sdk/models/components/hotwordproximity.go new file mode 100644 index 00000000..611b62d7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/hotwordproximity.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type HotwordProximity struct { + WindowBefore *int64 `json:"windowBefore,omitempty"` + WindowAfter *int64 `json:"windowAfter,omitempty"` +} + +func (o *HotwordProximity) GetWindowBefore() *int64 { + if o == nil { + return nil + } + return o.WindowBefore +} + +func (o *HotwordProximity) GetWindowAfter() *int64 { + if o == nil { + return nil + } + return o.WindowAfter +} diff --git a/tests/mockserver/internal/sdk/models/components/httpmetadata.go b/tests/mockserver/internal/sdk/models/components/httpmetadata.go new file mode 100644 index 00000000..e18bdc06 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/httpmetadata.go @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "net/http" +) + +type HTTPMetadata struct { + // Raw HTTP response; suitable for custom response parsing + Response *http.Response `json:"-"` + // Raw HTTP request; suitable for debugging + Request *http.Request `json:"-"` +} + +func (o *HTTPMetadata) GetResponse() *http.Response { + if o == nil { + return nil + } + return o.Response +} + +func (o *HTTPMetadata) GetRequest() *http.Request { + if o == nil { + return nil + } + return o.Request +} diff --git a/tests/mockserver/internal/sdk/models/components/iconconfig.go b/tests/mockserver/internal/sdk/models/components/iconconfig.go new file mode 100644 index 00000000..5f79d9dd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/iconconfig.go @@ -0,0 +1,138 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type IconType string + +const ( + IconTypeCollection IconType = "COLLECTION" + IconTypeCustom IconType = "CUSTOM" + IconTypeDatasource IconType = "DATASOURCE" + IconTypeDatasourceInstance IconType = "DATASOURCE_INSTANCE" + IconTypeFavicon IconType = "FAVICON" + IconTypeFileType IconType = "FILE_TYPE" + IconTypeGeneratedBackground IconType = "GENERATED_BACKGROUND" + IconTypeGlyph IconType = "GLYPH" + IconTypeMimeType IconType = "MIME_TYPE" + IconTypeNoIcon IconType = "NO_ICON" + IconTypePerson IconType = "PERSON" + IconTypeReactions IconType = "REACTIONS" + IconTypeURL IconType = "URL" +) + +func (e IconType) ToPointer() *IconType { + return &e +} +func (e *IconType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "COLLECTION": + fallthrough + case "CUSTOM": + fallthrough + case "DATASOURCE": + fallthrough + case "DATASOURCE_INSTANCE": + fallthrough + case "FAVICON": + fallthrough + case "FILE_TYPE": + fallthrough + case "GENERATED_BACKGROUND": + fallthrough + case "GLYPH": + fallthrough + case "MIME_TYPE": + fallthrough + case "NO_ICON": + fallthrough + case "PERSON": + fallthrough + case "REACTIONS": + fallthrough + case "URL": + *e = IconType(v) + return nil + default: + return fmt.Errorf("invalid value for IconType: %v", v) + } +} + +// IconConfig - Defines how to render an icon +type IconConfig struct { + GeneratedBackgroundColorKey *string `json:"generatedBackgroundColorKey,omitempty"` + BackgroundColor *string `json:"backgroundColor,omitempty"` + Color *string `json:"color,omitempty"` + Key *string `json:"key,omitempty"` + IconType *IconType `json:"iconType,omitempty"` + // Whether the icon should be masked based on current theme. + Masked *bool `json:"masked,omitempty"` + // The name of the icon if applicable, e.g. the glyph name for `IconType.GLYPH` icons. + Name *string `json:"name,omitempty"` + // The URL to an image to be displayed if applicable, e.g. the URL for `iconType.URL` icons. + URL *string `json:"url,omitempty"` +} + +func (o *IconConfig) GetGeneratedBackgroundColorKey() *string { + if o == nil { + return nil + } + return o.GeneratedBackgroundColorKey +} + +func (o *IconConfig) GetBackgroundColor() *string { + if o == nil { + return nil + } + return o.BackgroundColor +} + +func (o *IconConfig) GetColor() *string { + if o == nil { + return nil + } + return o.Color +} + +func (o *IconConfig) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *IconConfig) GetIconType() *IconType { + if o == nil { + return nil + } + return o.IconType +} + +func (o *IconConfig) GetMasked() *bool { + if o == nil { + return nil + } + return o.Masked +} + +func (o *IconConfig) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *IconConfig) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} diff --git a/tests/mockserver/internal/sdk/models/components/indexdocumentrequest.go b/tests/mockserver/internal/sdk/models/components/indexdocumentrequest.go new file mode 100644 index 00000000..86a60a70 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/indexdocumentrequest.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// IndexDocumentRequest - Describes the request body of the /indexdocument API call +type IndexDocumentRequest struct { + // Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + Version *int64 `json:"version,omitempty"` + // Indexable document structure + Document DocumentDefinition `json:"document"` +} + +func (o *IndexDocumentRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} + +func (o *IndexDocumentRequest) GetDocument() DocumentDefinition { + if o == nil { + return DocumentDefinition{} + } + return o.Document +} diff --git a/tests/mockserver/internal/sdk/models/components/indexdocumentsrequest.go b/tests/mockserver/internal/sdk/models/components/indexdocumentsrequest.go new file mode 100644 index 00000000..759eb8b7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/indexdocumentsrequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// IndexDocumentsRequest - Describes the request body of the /indexdocuments API call +type IndexDocumentsRequest struct { + // Optional id parameter to identify and track a batch of documents. + UploadID *string `json:"uploadId,omitempty"` + // Datasource of the documents + Datasource string `json:"datasource"` + // Batch of documents being added/updated + Documents []DocumentDefinition `json:"documents"` +} + +func (o *IndexDocumentsRequest) GetUploadID() *string { + if o == nil { + return nil + } + return o.UploadID +} + +func (o *IndexDocumentsRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *IndexDocumentsRequest) GetDocuments() []DocumentDefinition { + if o == nil { + return []DocumentDefinition{} + } + return o.Documents +} diff --git a/tests/mockserver/internal/sdk/models/components/indexemployeerequest.go b/tests/mockserver/internal/sdk/models/components/indexemployeerequest.go new file mode 100644 index 00000000..8d08b0b7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/indexemployeerequest.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// IndexEmployeeRequest - Info about an employee and optional version for that info +type IndexEmployeeRequest struct { + // Describes employee info + Employee EmployeeInfoDefinition `json:"employee"` + // Version number for the employee object. If absent or 0 then no version checks are done + Version *int64 `json:"version,omitempty"` +} + +func (o *IndexEmployeeRequest) GetEmployee() EmployeeInfoDefinition { + if o == nil { + return EmployeeInfoDefinition{} + } + return o.Employee +} + +func (o *IndexEmployeeRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} diff --git a/tests/mockserver/internal/sdk/models/components/indexgrouprequest.go b/tests/mockserver/internal/sdk/models/components/indexgrouprequest.go new file mode 100644 index 00000000..acd400f6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/indexgrouprequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// IndexGroupRequest - Describes the request body of the /indexgroup API call +type IndexGroupRequest struct { + // Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + Version *int64 `json:"version,omitempty"` + // The datasource for which the group is added + Datasource string `json:"datasource"` + // describes a group in the datasource + Group DatasourceGroupDefinition `json:"group"` +} + +func (o *IndexGroupRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} + +func (o *IndexGroupRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *IndexGroupRequest) GetGroup() DatasourceGroupDefinition { + if o == nil { + return DatasourceGroupDefinition{} + } + return o.Group +} diff --git a/tests/mockserver/internal/sdk/models/components/indexingshortcut.go b/tests/mockserver/internal/sdk/models/components/indexingshortcut.go new file mode 100644 index 00000000..b7b7ca15 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/indexingshortcut.go @@ -0,0 +1,87 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type IndexingShortcut struct { + // 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. + InputAlias string `json:"inputAlias"` + // A short, plain text blurb to help people understand the intent of the shortcut. + Description *string `json:"description,omitempty"` + // destination URL for the shortcut. + DestinationURL string `json:"destinationUrl"` + // Email of the user who created this shortcut. + CreatedBy string `json:"createdBy"` + // The time the shortcut was created in epoch seconds. + CreateTime *int64 `json:"createTime,omitempty"` + // Email of the user who last updated this shortcut. + UpdatedBy *string `json:"updatedBy,omitempty"` + // The time the shortcut was updated in epoch seconds. + UpdateTime *int64 `json:"updateTime,omitempty"` + // Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author and admins only. + Unlisted *bool `json:"unlisted,omitempty"` + // For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. + URLTemplate *string `json:"urlTemplate,omitempty"` +} + +func (o *IndexingShortcut) GetInputAlias() string { + if o == nil { + return "" + } + return o.InputAlias +} + +func (o *IndexingShortcut) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *IndexingShortcut) GetDestinationURL() string { + if o == nil { + return "" + } + return o.DestinationURL +} + +func (o *IndexingShortcut) GetCreatedBy() string { + if o == nil { + return "" + } + return o.CreatedBy +} + +func (o *IndexingShortcut) GetCreateTime() *int64 { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *IndexingShortcut) GetUpdatedBy() *string { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *IndexingShortcut) GetUpdateTime() *int64 { + if o == nil { + return nil + } + return o.UpdateTime +} + +func (o *IndexingShortcut) GetUnlisted() *bool { + if o == nil { + return nil + } + return o.Unlisted +} + +func (o *IndexingShortcut) GetURLTemplate() *string { + if o == nil { + return nil + } + return o.URLTemplate +} diff --git a/tests/mockserver/internal/sdk/models/components/indexmembershiprequest.go b/tests/mockserver/internal/sdk/models/components/indexmembershiprequest.go new file mode 100644 index 00000000..e7b2a46c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/indexmembershiprequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// IndexMembershipRequest - Describes the request body of the /indexmembership API call +type IndexMembershipRequest struct { + // Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + Version *int64 `json:"version,omitempty"` + // The datasource for which the membership is added + Datasource string `json:"datasource"` + // describes the membership row of a group. Only one of memberUserId and memberGroupName can be specified. + Membership DatasourceMembershipDefinition `json:"membership"` +} + +func (o *IndexMembershipRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} + +func (o *IndexMembershipRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *IndexMembershipRequest) GetMembership() DatasourceMembershipDefinition { + if o == nil { + return DatasourceMembershipDefinition{} + } + return o.Membership +} diff --git a/tests/mockserver/internal/sdk/models/components/indexstatus.go b/tests/mockserver/internal/sdk/models/components/indexstatus.go new file mode 100644 index 00000000..23360275 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/indexstatus.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type IndexStatus struct { + // When the document was last crawled + LastCrawledTime *time.Time `json:"lastCrawledTime,omitempty"` + // When the document was last indexed + LastIndexedTime *time.Time `json:"lastIndexedTime,omitempty"` +} + +func (i IndexStatus) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(i, "", false) +} + +func (i *IndexStatus) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &i, "", false, false); err != nil { + return err + } + return nil +} + +func (o *IndexStatus) GetLastCrawledTime() *time.Time { + if o == nil { + return nil + } + return o.LastCrawledTime +} + +func (o *IndexStatus) GetLastIndexedTime() *time.Time { + if o == nil { + return nil + } + return o.LastIndexedTime +} diff --git a/tests/mockserver/internal/sdk/models/components/indexteamrequest.go b/tests/mockserver/internal/sdk/models/components/indexteamrequest.go new file mode 100644 index 00000000..64f2b364 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/indexteamrequest.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// IndexTeamRequest - Info about a team and optional version for that info +type IndexTeamRequest struct { + // Information about an employee's team + Team TeamInfoDefinition `json:"team"` + // Version number for the team object. If absent or 0 then no version checks are done + Version *int64 `json:"version,omitempty"` +} + +func (o *IndexTeamRequest) GetTeam() TeamInfoDefinition { + if o == nil { + return TeamInfoDefinition{} + } + return o.Team +} + +func (o *IndexTeamRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} diff --git a/tests/mockserver/internal/sdk/models/components/indexuserrequest.go b/tests/mockserver/internal/sdk/models/components/indexuserrequest.go new file mode 100644 index 00000000..daf6de74 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/indexuserrequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// IndexUserRequest - Describes the request body of the /indexuser API call +type IndexUserRequest struct { + // Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. + Version *int64 `json:"version,omitempty"` + // The datasource for which the user is added + Datasource string `json:"datasource"` + // describes a user in the datasource + User DatasourceUserDefinition `json:"user"` +} + +func (o *IndexUserRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} + +func (o *IndexUserRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *IndexUserRequest) GetUser() DatasourceUserDefinition { + if o == nil { + return DatasourceUserDefinition{} + } + return o.User +} diff --git a/tests/mockserver/internal/sdk/models/components/inputoptions.go b/tests/mockserver/internal/sdk/models/components/inputoptions.go new file mode 100644 index 00000000..c68f47e3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/inputoptions.go @@ -0,0 +1,129 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// DatasourcesType - The types of datasource for which to run the report/policy. +type DatasourcesType string + +const ( + DatasourcesTypeAll DatasourcesType = "ALL" + DatasourcesTypeCustom DatasourcesType = "CUSTOM" +) + +func (e DatasourcesType) ToPointer() *DatasourcesType { + return &e +} +func (e *DatasourcesType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ALL": + fallthrough + case "CUSTOM": + *e = DatasourcesType(v) + return nil + default: + return fmt.Errorf("invalid value for DatasourcesType: %v", v) + } +} + +// TimePeriodType - Type of time period for which to run the report/policy. PAST_DAY is deprecated. +type TimePeriodType string + +const ( + TimePeriodTypeAllTime TimePeriodType = "ALL_TIME" + TimePeriodTypePastYear TimePeriodType = "PAST_YEAR" + TimePeriodTypePastDay TimePeriodType = "PAST_DAY" + TimePeriodTypeCustom TimePeriodType = "CUSTOM" +) + +func (e TimePeriodType) ToPointer() *TimePeriodType { + return &e +} +func (e *TimePeriodType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ALL_TIME": + fallthrough + case "PAST_YEAR": + fallthrough + case "PAST_DAY": + fallthrough + case "CUSTOM": + *e = TimePeriodType(v) + return nil + default: + return fmt.Errorf("invalid value for TimePeriodType: %v", v) + } +} + +// InputOptions - Controls which data-sources and what time-range to include in scans. +type InputOptions struct { + // list of url regex matching documents excluded from report + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + URLGreenlist []string `json:"urlGreenlist,omitempty"` + // The types of datasource for which to run the report/policy. + DatasourcesType *DatasourcesType `json:"datasourcesType,omitempty"` + // List of datasources to consider for report. DEPRECATED - use datasourceInstances instead. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + Datasources []string `json:"datasources,omitempty"` + // List of datasource instances to consider for report/policy. + DatasourceInstances []string `json:"datasourceInstances,omitempty"` + // Type of time period for which to run the report/policy. PAST_DAY is deprecated. + TimePeriodType *TimePeriodType `json:"timePeriodType,omitempty"` + CustomTimeRange *TimeRange `json:"customTimeRange,omitempty"` +} + +func (o *InputOptions) GetURLGreenlist() []string { + if o == nil { + return nil + } + return o.URLGreenlist +} + +func (o *InputOptions) GetDatasourcesType() *DatasourcesType { + if o == nil { + return nil + } + return o.DatasourcesType +} + +func (o *InputOptions) GetDatasources() []string { + if o == nil { + return nil + } + return o.Datasources +} + +func (o *InputOptions) GetDatasourceInstances() []string { + if o == nil { + return nil + } + return o.DatasourceInstances +} + +func (o *InputOptions) GetTimePeriodType() *TimePeriodType { + if o == nil { + return nil + } + return o.TimePeriodType +} + +func (o *InputOptions) GetCustomTimeRange() *TimeRange { + if o == nil { + return nil + } + return o.CustomTimeRange +} diff --git a/tests/mockserver/internal/sdk/models/components/insightsagentsrequestoptions.go b/tests/mockserver/internal/sdk/models/components/insightsagentsrequestoptions.go new file mode 100644 index 00000000..6b825aec --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/insightsagentsrequestoptions.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type InsightsAgentsRequestOptions struct { + // IDs of the Agents for which Insights should be returned. An empty array signifies all. + AgentIds []string `json:"agentIds,omitempty"` +} + +func (o *InsightsAgentsRequestOptions) GetAgentIds() []string { + if o == nil { + return nil + } + return o.AgentIds +} diff --git a/tests/mockserver/internal/sdk/models/components/insightsaiapprequestoptions.go b/tests/mockserver/internal/sdk/models/components/insightsaiapprequestoptions.go new file mode 100644 index 00000000..7275316c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/insightsaiapprequestoptions.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type InsightsAiAppRequestOptions struct { + // IDs of the AI Apps for which Insights should be returned. An empty array signifies all. + AiAppIds []string `json:"aiAppIds,omitempty"` +} + +func (o *InsightsAiAppRequestOptions) GetAiAppIds() []string { + if o == nil { + return nil + } + return o.AiAppIds +} diff --git a/tests/mockserver/internal/sdk/models/components/insightsrequest.go b/tests/mockserver/internal/sdk/models/components/insightsrequest.go new file mode 100644 index 00000000..0cd7481b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/insightsrequest.go @@ -0,0 +1,156 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type InsightsRequestCategory string + +const ( + InsightsRequestCategoryAgents InsightsRequestCategory = "AGENTS" + InsightsRequestCategoryAi InsightsRequestCategory = "AI" + InsightsRequestCategoryAiApps InsightsRequestCategory = "AI_APPS" + InsightsRequestCategoryAnnouncements InsightsRequestCategory = "ANNOUNCEMENTS" + InsightsRequestCategoryAnswers InsightsRequestCategory = "ANSWERS" + InsightsRequestCategoryCollections InsightsRequestCategory = "COLLECTIONS" + InsightsRequestCategoryContent InsightsRequestCategory = "CONTENT" + InsightsRequestCategoryGleanAssist InsightsRequestCategory = "GLEAN_ASSIST" + InsightsRequestCategoryQueries InsightsRequestCategory = "QUERIES" + InsightsRequestCategoryShortcuts InsightsRequestCategory = "SHORTCUTS" + InsightsRequestCategoryUsers InsightsRequestCategory = "USERS" +) + +func (e InsightsRequestCategory) ToPointer() *InsightsRequestCategory { + return &e +} +func (e *InsightsRequestCategory) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "AGENTS": + fallthrough + case "AI": + fallthrough + case "AI_APPS": + fallthrough + case "ANNOUNCEMENTS": + fallthrough + case "ANSWERS": + fallthrough + case "COLLECTIONS": + fallthrough + case "CONTENT": + fallthrough + case "GLEAN_ASSIST": + fallthrough + case "QUERIES": + fallthrough + case "SHORTCUTS": + fallthrough + case "USERS": + *e = InsightsRequestCategory(v) + return nil + default: + return fmt.Errorf("invalid value for InsightsRequestCategory: %v", v) + } +} + +type AssistantActivityType string + +const ( + AssistantActivityTypeGleanChat AssistantActivityType = "GLEAN_CHAT" + AssistantActivityTypeAiSummary AssistantActivityType = "AI_SUMMARY" + AssistantActivityTypeAiAnswer AssistantActivityType = "AI_ANSWER" + AssistantActivityTypeGleanbotResponse AssistantActivityType = "GLEANBOT_RESPONSE" +) + +func (e AssistantActivityType) ToPointer() *AssistantActivityType { + return &e +} +func (e *AssistantActivityType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "GLEAN_CHAT": + fallthrough + case "AI_SUMMARY": + fallthrough + case "AI_ANSWER": + fallthrough + case "GLEANBOT_RESPONSE": + *e = AssistantActivityType(v) + return nil + default: + return fmt.Errorf("invalid value for AssistantActivityType: %v", v) + } +} + +type InsightsRequest struct { + // Categories of data requested. Request can include single or multiple types. + Categories []InsightsRequestCategory `json:"categories"` + // Departments that the data is requested for. If this is empty, corresponds to whole company. + Departments []string `json:"departments,omitempty"` + DayRange *Period `json:"dayRange,omitempty"` + AiAppRequestOptions *InsightsAiAppRequestOptions `json:"aiAppRequestOptions,omitempty"` + AgentsRequestOptions *InsightsAgentsRequestOptions `json:"agentsRequestOptions,omitempty"` + // Types of activity that should count in the definition of an Assistant Active User. Affects only insights for AI category. + AssistantActivityTypes []AssistantActivityType `json:"assistantActivityTypes,omitempty"` + // If true, suppresses the generation of per-user Insights in the response. Default is false. + DisablePerUserInsights *bool `json:"disablePerUserInsights,omitempty"` +} + +func (o *InsightsRequest) GetCategories() []InsightsRequestCategory { + if o == nil { + return []InsightsRequestCategory{} + } + return o.Categories +} + +func (o *InsightsRequest) GetDepartments() []string { + if o == nil { + return nil + } + return o.Departments +} + +func (o *InsightsRequest) GetDayRange() *Period { + if o == nil { + return nil + } + return o.DayRange +} + +func (o *InsightsRequest) GetAiAppRequestOptions() *InsightsAiAppRequestOptions { + if o == nil { + return nil + } + return o.AiAppRequestOptions +} + +func (o *InsightsRequest) GetAgentsRequestOptions() *InsightsAgentsRequestOptions { + if o == nil { + return nil + } + return o.AgentsRequestOptions +} + +func (o *InsightsRequest) GetAssistantActivityTypes() []AssistantActivityType { + if o == nil { + return nil + } + return o.AssistantActivityTypes +} + +func (o *InsightsRequest) GetDisablePerUserInsights() *bool { + if o == nil { + return nil + } + return o.DisablePerUserInsights +} diff --git a/tests/mockserver/internal/sdk/models/components/insightsresponse.go b/tests/mockserver/internal/sdk/models/components/insightsresponse.go new file mode 100644 index 00000000..fe65a737 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/insightsresponse.go @@ -0,0 +1,112 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type InsightsResponse struct { + // List of timeseries to make charts (if applicable). + Timeseries []LabeledCountInfo `json:"timeseries,omitempty"` + Users *UserInsightsResponse `json:"users,omitempty"` + Content *ContentInsightsResponse `json:"content,omitempty"` + Queries *QueryInsightsResponse `json:"queries,omitempty"` + Collections *ContentInsightsResponse `json:"collections,omitempty"` + CollectionsV2 *ContentInsightsResponse `json:"collectionsV2,omitempty"` + Shortcuts *ShortcutInsightsResponse `json:"shortcuts,omitempty"` + Announcements *ContentInsightsResponse `json:"announcements,omitempty"` + Answers *ContentInsightsResponse `json:"answers,omitempty"` + Ai *AiInsightsResponse `json:"ai,omitempty"` + AiApps *AiAppsInsightsResponse `json:"aiApps,omitempty"` + GleanAssist *GleanAssistInsightsResponse `json:"gleanAssist,omitempty"` + // list of all departments. + Departments []string `json:"departments,omitempty"` +} + +func (o *InsightsResponse) GetTimeseries() []LabeledCountInfo { + if o == nil { + return nil + } + return o.Timeseries +} + +func (o *InsightsResponse) GetUsers() *UserInsightsResponse { + if o == nil { + return nil + } + return o.Users +} + +func (o *InsightsResponse) GetContent() *ContentInsightsResponse { + if o == nil { + return nil + } + return o.Content +} + +func (o *InsightsResponse) GetQueries() *QueryInsightsResponse { + if o == nil { + return nil + } + return o.Queries +} + +func (o *InsightsResponse) GetCollections() *ContentInsightsResponse { + if o == nil { + return nil + } + return o.Collections +} + +func (o *InsightsResponse) GetCollectionsV2() *ContentInsightsResponse { + if o == nil { + return nil + } + return o.CollectionsV2 +} + +func (o *InsightsResponse) GetShortcuts() *ShortcutInsightsResponse { + if o == nil { + return nil + } + return o.Shortcuts +} + +func (o *InsightsResponse) GetAnnouncements() *ContentInsightsResponse { + if o == nil { + return nil + } + return o.Announcements +} + +func (o *InsightsResponse) GetAnswers() *ContentInsightsResponse { + if o == nil { + return nil + } + return o.Answers +} + +func (o *InsightsResponse) GetAi() *AiInsightsResponse { + if o == nil { + return nil + } + return o.Ai +} + +func (o *InsightsResponse) GetAiApps() *AiAppsInsightsResponse { + if o == nil { + return nil + } + return o.AiApps +} + +func (o *InsightsResponse) GetGleanAssist() *GleanAssistInsightsResponse { + if o == nil { + return nil + } + return o.GleanAssist +} + +func (o *InsightsResponse) GetDepartments() []string { + if o == nil { + return nil + } + return o.Departments +} diff --git a/tests/mockserver/internal/sdk/models/components/invalidoperatorvalueerror.go b/tests/mockserver/internal/sdk/models/components/invalidoperatorvalueerror.go new file mode 100644 index 00000000..a59e0100 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/invalidoperatorvalueerror.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type InvalidOperatorValueError struct { + // The operator key that has an invalid value. + Key *string `json:"key,omitempty"` + // The invalid operator value. + Value *string `json:"value,omitempty"` +} + +func (o *InvalidOperatorValueError) GetKey() *string { + if o == nil { + return nil + } + return o.Key +} + +func (o *InvalidOperatorValueError) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} diff --git a/tests/mockserver/internal/sdk/models/components/inviteinfo.go b/tests/mockserver/internal/sdk/models/components/inviteinfo.go new file mode 100644 index 00000000..1a540ca9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/inviteinfo.go @@ -0,0 +1,71 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +// InviteInfo - Information regarding the invite status of a person. +type InviteInfo struct { + // The time this person signed up in ISO format (ISO 8601). + SignUpTime *time.Time `json:"signUpTime,omitempty"` + // Latest invites received by the user for each channel + Invites []ChannelInviteInfo `json:"invites,omitempty"` + Inviter *Person `json:"inviter,omitempty"` + // The time this person was invited in ISO format (ISO 8601). + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + InviteTime *time.Time `json:"inviteTime,omitempty"` + // The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + ReminderTime *time.Time `json:"reminderTime,omitempty"` +} + +func (i InviteInfo) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(i, "", false) +} + +func (i *InviteInfo) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &i, "", false, false); err != nil { + return err + } + return nil +} + +func (o *InviteInfo) GetSignUpTime() *time.Time { + if o == nil { + return nil + } + return o.SignUpTime +} + +func (o *InviteInfo) GetInvites() []ChannelInviteInfo { + if o == nil { + return nil + } + return o.Invites +} + +func (o *InviteInfo) GetInviter() *Person { + if o == nil { + return nil + } + return o.Inviter +} + +func (o *InviteInfo) GetInviteTime() *time.Time { + if o == nil { + return nil + } + return o.InviteTime +} + +func (o *InviteInfo) GetReminderTime() *time.Time { + if o == nil { + return nil + } + return o.ReminderTime +} diff --git a/tests/mockserver/internal/sdk/models/components/labeledcountinfo.go b/tests/mockserver/internal/sdk/models/components/labeledcountinfo.go new file mode 100644 index 00000000..6ddd153c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/labeledcountinfo.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type LabeledCountInfo struct { + // Label for the included count information. + Label string `json:"label"` + // List of data points for counts for a given date period. + CountInfo []CountInfo `json:"countInfo,omitempty"` +} + +func (o *LabeledCountInfo) GetLabel() string { + if o == nil { + return "" + } + return o.Label +} + +func (o *LabeledCountInfo) GetCountInfo() []CountInfo { + if o == nil { + return nil + } + return o.CountInfo +} diff --git a/tests/mockserver/internal/sdk/models/components/listanswersrequest.go b/tests/mockserver/internal/sdk/models/components/listanswersrequest.go new file mode 100644 index 00000000..04f62de3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/listanswersrequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ListAnswersRequest struct { + // The Answer Board Id to list answers on. + BoardID *int64 `json:"boardId,omitempty"` +} + +func (o *ListAnswersRequest) GetBoardID() *int64 { + if o == nil { + return nil + } + return o.BoardID +} diff --git a/tests/mockserver/internal/sdk/models/components/listanswersresponse.go b/tests/mockserver/internal/sdk/models/components/listanswersresponse.go new file mode 100644 index 00000000..fe8dd286 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/listanswersresponse.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ListAnswersResponse struct { + // List of answers with tracking tokens. + AnswerResults []AnswerResult `json:"answerResults"` +} + +func (o *ListAnswersResponse) GetAnswerResults() []AnswerResult { + if o == nil { + return []AnswerResult{} + } + return o.AnswerResults +} diff --git a/tests/mockserver/internal/sdk/models/components/listchatsresponse.go b/tests/mockserver/internal/sdk/models/components/listchatsresponse.go new file mode 100644 index 00000000..9a646b6b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/listchatsresponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ListChatsResponse struct { + ChatResults []ChatMetadataResult `json:"chatResults,omitempty"` +} + +func (o *ListChatsResponse) GetChatResults() []ChatMetadataResult { + if o == nil { + return nil + } + return o.ChatResults +} diff --git a/tests/mockserver/internal/sdk/models/components/listcollectionsrequest.go b/tests/mockserver/internal/sdk/models/components/listcollectionsrequest.go new file mode 100644 index 00000000..3dec9559 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/listcollectionsrequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ListCollectionsRequest struct { + // Whether to include the audience filters with the listed Collections. + IncludeAudience *bool `json:"includeAudience,omitempty"` + // Whether to include the editor roles with the listed Collections. + IncludeRoles *bool `json:"includeRoles,omitempty"` + // The datasource type this Collection can hold. + // ANSWERS - for Collections representing answer boards + AllowedDatasource *string `json:"allowedDatasource,omitempty"` +} + +func (o *ListCollectionsRequest) GetIncludeAudience() *bool { + if o == nil { + return nil + } + return o.IncludeAudience +} + +func (o *ListCollectionsRequest) GetIncludeRoles() *bool { + if o == nil { + return nil + } + return o.IncludeRoles +} + +func (o *ListCollectionsRequest) GetAllowedDatasource() *string { + if o == nil { + return nil + } + return o.AllowedDatasource +} diff --git a/tests/mockserver/internal/sdk/models/components/listcollectionsresponse.go b/tests/mockserver/internal/sdk/models/components/listcollectionsresponse.go new file mode 100644 index 00000000..77a9eaff --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/listcollectionsresponse.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ListCollectionsResponse struct { + // List of all Collections, no Collection items are fetched. + Collections []Collection `json:"collections"` +} + +func (o *ListCollectionsResponse) GetCollections() []Collection { + if o == nil { + return []Collection{} + } + return o.Collections +} diff --git a/tests/mockserver/internal/sdk/models/components/listdlpreportsresponse.go b/tests/mockserver/internal/sdk/models/components/listdlpreportsresponse.go new file mode 100644 index 00000000..25f297b5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/listdlpreportsresponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ListDlpReportsResponse struct { + Reports []DlpReport `json:"reports,omitempty"` +} + +func (o *ListDlpReportsResponse) GetReports() []DlpReport { + if o == nil { + return nil + } + return o.Reports +} diff --git a/tests/mockserver/internal/sdk/models/components/listentitiesrequest.go b/tests/mockserver/internal/sdk/models/components/listentitiesrequest.go new file mode 100644 index 00000000..bf43970e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/listentitiesrequest.go @@ -0,0 +1,178 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" +) + +type ListEntitiesRequestEntityType string + +const ( + ListEntitiesRequestEntityTypePeople ListEntitiesRequestEntityType = "PEOPLE" + ListEntitiesRequestEntityTypeTeams ListEntitiesRequestEntityType = "TEAMS" + ListEntitiesRequestEntityTypeCustomEntities ListEntitiesRequestEntityType = "CUSTOM_ENTITIES" +) + +func (e ListEntitiesRequestEntityType) ToPointer() *ListEntitiesRequestEntityType { + return &e +} +func (e *ListEntitiesRequestEntityType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PEOPLE": + fallthrough + case "TEAMS": + fallthrough + case "CUSTOM_ENTITIES": + *e = ListEntitiesRequestEntityType(v) + return nil + default: + return fmt.Errorf("invalid value for ListEntitiesRequestEntityType: %v", v) + } +} + +type ListEntitiesRequestIncludeField string + +const ( + ListEntitiesRequestIncludeFieldPeople ListEntitiesRequestIncludeField = "PEOPLE" + ListEntitiesRequestIncludeFieldTeams ListEntitiesRequestIncludeField = "TEAMS" + ListEntitiesRequestIncludeFieldPeopleDistance ListEntitiesRequestIncludeField = "PEOPLE_DISTANCE" + ListEntitiesRequestIncludeFieldPermissions ListEntitiesRequestIncludeField = "PERMISSIONS" + ListEntitiesRequestIncludeFieldFacets ListEntitiesRequestIncludeField = "FACETS" + ListEntitiesRequestIncludeFieldInviteInfo ListEntitiesRequestIncludeField = "INVITE_INFO" + ListEntitiesRequestIncludeFieldLastExtensionUse ListEntitiesRequestIncludeField = "LAST_EXTENSION_USE" + ListEntitiesRequestIncludeFieldManagementDetails ListEntitiesRequestIncludeField = "MANAGEMENT_DETAILS" + ListEntitiesRequestIncludeFieldUnprocessedTeams ListEntitiesRequestIncludeField = "UNPROCESSED_TEAMS" +) + +func (e ListEntitiesRequestIncludeField) ToPointer() *ListEntitiesRequestIncludeField { + return &e +} +func (e *ListEntitiesRequestIncludeField) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PEOPLE": + fallthrough + case "TEAMS": + fallthrough + case "PEOPLE_DISTANCE": + fallthrough + case "PERMISSIONS": + fallthrough + case "FACETS": + fallthrough + case "INVITE_INFO": + fallthrough + case "LAST_EXTENSION_USE": + fallthrough + case "MANAGEMENT_DETAILS": + fallthrough + case "UNPROCESSED_TEAMS": + *e = ListEntitiesRequestIncludeField(v) + return nil + default: + return fmt.Errorf("invalid value for ListEntitiesRequestIncludeField: %v", v) + } +} + +type ListEntitiesRequest struct { + Filter []FacetFilter `json:"filter,omitempty"` + // Use EntitiesSortOrder enum for SortOptions.sortBy + Sort []SortOptions `json:"sort,omitempty"` + EntityType *ListEntitiesRequestEntityType `default:"PEOPLE" json:"entityType"` + // The datasource associated with the entity type, most commonly used with CUSTOM_ENTITIES + Datasource *string `json:"datasource,omitempty"` + // A query string to search for entities that each entity in the response must conform to. An empty query does not filter any entities. + Query *string `json:"query,omitempty"` + // List of entity fields to return (that aren't returned by default) + IncludeFields []ListEntitiesRequestIncludeField `json:"includeFields,omitempty"` + // Hint to the server about how many results to send back. Server may return less. + PageSize *int64 `json:"pageSize,omitempty"` + // Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. + Cursor *string `json:"cursor,omitempty"` + // A string denoting the search surface from which the endpoint is called. + Source *string `json:"source,omitempty"` +} + +func (l ListEntitiesRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(l, "", false) +} + +func (l *ListEntitiesRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ListEntitiesRequest) GetFilter() []FacetFilter { + if o == nil { + return nil + } + return o.Filter +} + +func (o *ListEntitiesRequest) GetSort() []SortOptions { + if o == nil { + return nil + } + return o.Sort +} + +func (o *ListEntitiesRequest) GetEntityType() *ListEntitiesRequestEntityType { + if o == nil { + return nil + } + return o.EntityType +} + +func (o *ListEntitiesRequest) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *ListEntitiesRequest) GetQuery() *string { + if o == nil { + return nil + } + return o.Query +} + +func (o *ListEntitiesRequest) GetIncludeFields() []ListEntitiesRequestIncludeField { + if o == nil { + return nil + } + return o.IncludeFields +} + +func (o *ListEntitiesRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *ListEntitiesRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *ListEntitiesRequest) GetSource() *string { + if o == nil { + return nil + } + return o.Source +} diff --git a/tests/mockserver/internal/sdk/models/components/listentitiesresponse.go b/tests/mockserver/internal/sdk/models/components/listentitiesresponse.go new file mode 100644 index 00000000..fdfcc5a4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/listentitiesresponse.go @@ -0,0 +1,83 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ListEntitiesResponse struct { + Results []Person `json:"results,omitempty"` + TeamResults []Team `json:"teamResults,omitempty"` + CustomEntityResults []CustomEntity `json:"customEntityResults,omitempty"` + FacetResults []FacetResult `json:"facetResults,omitempty"` + // Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. + Cursor *string `json:"cursor,omitempty"` + // The total number of entities available + TotalCount *int64 `json:"totalCount,omitempty"` + // Whether or not more entities can be fetched. + HasMoreResults *bool `json:"hasMoreResults,omitempty"` + // Sort options from EntitiesSortOrder supported for this response. Default is empty list. + SortOptions []EntitiesSortOrder `json:"sortOptions,omitempty"` + // list of Person attributes that are custom setup by deployment + CustomFacetNames []string `json:"customFacetNames,omitempty"` +} + +func (o *ListEntitiesResponse) GetResults() []Person { + if o == nil { + return nil + } + return o.Results +} + +func (o *ListEntitiesResponse) GetTeamResults() []Team { + if o == nil { + return nil + } + return o.TeamResults +} + +func (o *ListEntitiesResponse) GetCustomEntityResults() []CustomEntity { + if o == nil { + return nil + } + return o.CustomEntityResults +} + +func (o *ListEntitiesResponse) GetFacetResults() []FacetResult { + if o == nil { + return nil + } + return o.FacetResults +} + +func (o *ListEntitiesResponse) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *ListEntitiesResponse) GetTotalCount() *int64 { + if o == nil { + return nil + } + return o.TotalCount +} + +func (o *ListEntitiesResponse) GetHasMoreResults() *bool { + if o == nil { + return nil + } + return o.HasMoreResults +} + +func (o *ListEntitiesResponse) GetSortOptions() []EntitiesSortOrder { + if o == nil { + return nil + } + return o.SortOptions +} + +func (o *ListEntitiesResponse) GetCustomFacetNames() []string { + if o == nil { + return nil + } + return o.CustomFacetNames +} diff --git a/tests/mockserver/internal/sdk/models/components/listpinsresponse.go b/tests/mockserver/internal/sdk/models/components/listpinsresponse.go new file mode 100644 index 00000000..cbf8b276 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/listpinsresponse.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ListPinsResponse struct { + // List of pinned documents. + Pins []PinDocument `json:"pins"` +} + +func (o *ListPinsResponse) GetPins() []PinDocument { + if o == nil { + return []PinDocument{} + } + return o.Pins +} diff --git a/tests/mockserver/internal/sdk/models/components/listshortcutspaginatedrequest.go b/tests/mockserver/internal/sdk/models/components/listshortcutspaginatedrequest.go new file mode 100644 index 00000000..40562b5b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/listshortcutspaginatedrequest.go @@ -0,0 +1,89 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type ListShortcutsPaginatedRequestIncludeField string + +const ( + ListShortcutsPaginatedRequestIncludeFieldFacets ListShortcutsPaginatedRequestIncludeField = "FACETS" + ListShortcutsPaginatedRequestIncludeFieldPeopleDetails ListShortcutsPaginatedRequestIncludeField = "PEOPLE_DETAILS" +) + +func (e ListShortcutsPaginatedRequestIncludeField) ToPointer() *ListShortcutsPaginatedRequestIncludeField { + return &e +} +func (e *ListShortcutsPaginatedRequestIncludeField) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "FACETS": + fallthrough + case "PEOPLE_DETAILS": + *e = ListShortcutsPaginatedRequestIncludeField(v) + return nil + default: + return fmt.Errorf("invalid value for ListShortcutsPaginatedRequestIncludeField: %v", v) + } +} + +type ListShortcutsPaginatedRequest struct { + // Array of fields/data to be included in response that are not included by default + IncludeFields []ListShortcutsPaginatedRequestIncludeField `json:"includeFields,omitempty"` + PageSize int64 `json:"pageSize"` + // A token specifying the position in the overall results to start at. Received from the endpoint and iterated back. Currently being used as page no (as we implement offset pagination) + Cursor *string `json:"cursor,omitempty"` + // 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. + Filters []FacetFilter `json:"filters,omitempty"` + Sort *SortOptions `json:"sort,omitempty"` + // Search query that should be a substring in atleast one of the fields (alias , inputAlias, destinationUrl, description). Empty query does not filter shortcuts. + Query *string `json:"query,omitempty"` +} + +func (o *ListShortcutsPaginatedRequest) GetIncludeFields() []ListShortcutsPaginatedRequestIncludeField { + if o == nil { + return nil + } + return o.IncludeFields +} + +func (o *ListShortcutsPaginatedRequest) GetPageSize() int64 { + if o == nil { + return 0 + } + return o.PageSize +} + +func (o *ListShortcutsPaginatedRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *ListShortcutsPaginatedRequest) GetFilters() []FacetFilter { + if o == nil { + return nil + } + return o.Filters +} + +func (o *ListShortcutsPaginatedRequest) GetSort() *SortOptions { + if o == nil { + return nil + } + return o.Sort +} + +func (o *ListShortcutsPaginatedRequest) GetQuery() *string { + if o == nil { + return nil + } + return o.Query +} diff --git a/tests/mockserver/internal/sdk/models/components/listshortcutspaginatedresponse.go b/tests/mockserver/internal/sdk/models/components/listshortcutspaginatedresponse.go new file mode 100644 index 00000000..49944966 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/listshortcutspaginatedresponse.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ListShortcutsPaginatedResponse struct { + // List of all shortcuts accessible to the user + Shortcuts []Shortcut `json:"shortcuts"` + FacetResults []FacetResult `json:"facetResults,omitempty"` + Meta ShortcutsPaginationMetadata `json:"meta"` +} + +func (o *ListShortcutsPaginatedResponse) GetShortcuts() []Shortcut { + if o == nil { + return []Shortcut{} + } + return o.Shortcuts +} + +func (o *ListShortcutsPaginatedResponse) GetFacetResults() []FacetResult { + if o == nil { + return nil + } + return o.FacetResults +} + +func (o *ListShortcutsPaginatedResponse) GetMeta() ShortcutsPaginationMetadata { + if o == nil { + return ShortcutsPaginationMetadata{} + } + return o.Meta +} diff --git a/tests/mockserver/internal/sdk/models/components/manualfeedbackinfo.go b/tests/mockserver/internal/sdk/models/components/manualfeedbackinfo.go new file mode 100644 index 00000000..26a64603 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/manualfeedbackinfo.go @@ -0,0 +1,324 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ManualFeedbackInfoSource - The source associated with the Feedback.event.MANUAL_FEEDBACK event. +type ManualFeedbackInfoSource string + +const ( + ManualFeedbackInfoSourceAutocomplete ManualFeedbackInfoSource = "AUTOCOMPLETE" + ManualFeedbackInfoSourceCalendar ManualFeedbackInfoSource = "CALENDAR" + ManualFeedbackInfoSourceChat ManualFeedbackInfoSource = "CHAT" + ManualFeedbackInfoSourceChatGeneral ManualFeedbackInfoSource = "CHAT_GENERAL" + ManualFeedbackInfoSourceConceptCard ManualFeedbackInfoSource = "CONCEPT_CARD" + ManualFeedbackInfoSourceDesktopApp ManualFeedbackInfoSource = "DESKTOP_APP" + ManualFeedbackInfoSourceDisambiguationCard ManualFeedbackInfoSource = "DISAMBIGUATION_CARD" + ManualFeedbackInfoSourceExpertDetection ManualFeedbackInfoSource = "EXPERT_DETECTION" + ManualFeedbackInfoSourceFeed ManualFeedbackInfoSource = "FEED" + ManualFeedbackInfoSourceGeneratedQAndA ManualFeedbackInfoSource = "GENERATED_Q_AND_A" + ManualFeedbackInfoSourceInlineMenu ManualFeedbackInfoSource = "INLINE_MENU" + ManualFeedbackInfoSourceNativeResult ManualFeedbackInfoSource = "NATIVE_RESULT" + ManualFeedbackInfoSourceQAndA ManualFeedbackInfoSource = "Q_AND_A" + ManualFeedbackInfoSourceRelatedQuestions ManualFeedbackInfoSource = "RELATED_QUESTIONS" + ManualFeedbackInfoSourceReportIssue ManualFeedbackInfoSource = "REPORT_ISSUE" + ManualFeedbackInfoSourceSciobot ManualFeedbackInfoSource = "SCIOBOT" + ManualFeedbackInfoSourceSearch ManualFeedbackInfoSource = "SEARCH" + ManualFeedbackInfoSourceSidebar ManualFeedbackInfoSource = "SIDEBAR" + ManualFeedbackInfoSourceSummary ManualFeedbackInfoSource = "SUMMARY" +) + +func (e ManualFeedbackInfoSource) ToPointer() *ManualFeedbackInfoSource { + return &e +} +func (e *ManualFeedbackInfoSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "AUTOCOMPLETE": + fallthrough + case "CALENDAR": + fallthrough + case "CHAT": + fallthrough + case "CHAT_GENERAL": + fallthrough + case "CONCEPT_CARD": + fallthrough + case "DESKTOP_APP": + fallthrough + case "DISAMBIGUATION_CARD": + fallthrough + case "EXPERT_DETECTION": + fallthrough + case "FEED": + fallthrough + case "GENERATED_Q_AND_A": + fallthrough + case "INLINE_MENU": + fallthrough + case "NATIVE_RESULT": + fallthrough + case "Q_AND_A": + fallthrough + case "RELATED_QUESTIONS": + fallthrough + case "REPORT_ISSUE": + fallthrough + case "SCIOBOT": + fallthrough + case "SEARCH": + fallthrough + case "SIDEBAR": + fallthrough + case "SUMMARY": + *e = ManualFeedbackInfoSource(v) + return nil + default: + return fmt.Errorf("invalid value for ManualFeedbackInfoSource: %v", v) + } +} + +type Issue string + +const ( + IssueInaccurateResponse Issue = "INACCURATE_RESPONSE" + IssueIncompleteOrNoAnswer Issue = "INCOMPLETE_OR_NO_ANSWER" + IssueIncorrectCitation Issue = "INCORRECT_CITATION" + IssueMissingCitation Issue = "MISSING_CITATION" + IssueOther Issue = "OTHER" + IssueOutdatedResponse Issue = "OUTDATED_RESPONSE" + IssueResultMissing Issue = "RESULT_MISSING" + IssueResultShouldNotAppear Issue = "RESULT_SHOULD_NOT_APPEAR" + IssueResultsHelpful Issue = "RESULTS_HELPFUL" + IssueResultsPoorOrder Issue = "RESULTS_POOR_ORDER" + IssueTooMuchOneKind Issue = "TOO_MUCH_ONE_KIND" +) + +func (e Issue) ToPointer() *Issue { + return &e +} +func (e *Issue) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "INACCURATE_RESPONSE": + fallthrough + case "INCOMPLETE_OR_NO_ANSWER": + fallthrough + case "INCORRECT_CITATION": + fallthrough + case "MISSING_CITATION": + fallthrough + case "OTHER": + fallthrough + case "OUTDATED_RESPONSE": + fallthrough + case "RESULT_MISSING": + fallthrough + case "RESULT_SHOULD_NOT_APPEAR": + fallthrough + case "RESULTS_HELPFUL": + fallthrough + case "RESULTS_POOR_ORDER": + fallthrough + case "TOO_MUCH_ONE_KIND": + *e = Issue(v) + return nil + default: + return fmt.Errorf("invalid value for Issue: %v", v) + } +} + +// Vote - The vote associated with the Feedback.event.MANUAL_FEEDBACK event. +type Vote string + +const ( + VoteUpvote Vote = "UPVOTE" + VoteDownvote Vote = "DOWNVOTE" +) + +func (e Vote) ToPointer() *Vote { + return &e +} +func (e *Vote) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "UPVOTE": + fallthrough + case "DOWNVOTE": + *e = Vote(v) + return nil + default: + return fmt.Errorf("invalid value for Vote: %v", v) + } +} + +type ManualFeedbackInfo struct { + // The email address of the user who submitted the Feedback.event.MANUAL_FEEDBACK event. + Email *string `json:"email,omitempty"` + // The source associated with the Feedback.event.MANUAL_FEEDBACK event. + Source *ManualFeedbackInfoSource `json:"source,omitempty"` + // The issue the user indicated in the feedback. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + Issue *string `json:"issue,omitempty"` + // The issue(s) the user indicated in the feedback. + Issues []Issue `json:"issues,omitempty"` + // URLs of images uploaded by user when providing feedback + ImageUrls []string `json:"imageUrls,omitempty"` + // The query associated with the Feedback.event.MANUAL_FEEDBACK event. + Query *string `json:"query,omitempty"` + // 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. + ObscuredQuery *string `json:"obscuredQuery,omitempty"` + // Which tabs the user had chosen at the time of the Feedback.event.MANUAL_FEEDBACK event. For search feedback events only. + ActiveTab *string `json:"activeTab,omitempty"` + // The comments users can optionally add to the Feedback.event.MANUAL_FEEDBACK events. + Comments *string `json:"comments,omitempty"` + // The array of search result Glean Document IDs, ordered by top to bottom result. + SearchResults []string `json:"searchResults,omitempty"` + // The array of previous messages in a chat session, ordered by oldest to newest. + PreviousMessages []string `json:"previousMessages,omitempty"` + // Array of previous request/response exchanges, ordered by oldest to newest. + ChatTranscript []FeedbackChatExchange `json:"chatTranscript,omitempty"` + // How many times this query has been run in the past. + NumQueriesFromFirstRun *int64 `json:"numQueriesFromFirstRun,omitempty"` + // The vote associated with the Feedback.event.MANUAL_FEEDBACK event. + Vote *Vote `json:"vote,omitempty"` + // A rating associated with the user feedback. The value will be between one and the maximum given by ratingScale, inclusive. + Rating *int64 `json:"rating,omitempty"` + // A description of the rating that contextualizes how it appeared to the user, e.g. "satisfied". + RatingKey *string `json:"ratingKey,omitempty"` + // 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. + RatingScale *int64 `json:"ratingScale,omitempty"` +} + +func (o *ManualFeedbackInfo) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} + +func (o *ManualFeedbackInfo) GetSource() *ManualFeedbackInfoSource { + if o == nil { + return nil + } + return o.Source +} + +func (o *ManualFeedbackInfo) GetIssue() *string { + if o == nil { + return nil + } + return o.Issue +} + +func (o *ManualFeedbackInfo) GetIssues() []Issue { + if o == nil { + return nil + } + return o.Issues +} + +func (o *ManualFeedbackInfo) GetImageUrls() []string { + if o == nil { + return nil + } + return o.ImageUrls +} + +func (o *ManualFeedbackInfo) GetQuery() *string { + if o == nil { + return nil + } + return o.Query +} + +func (o *ManualFeedbackInfo) GetObscuredQuery() *string { + if o == nil { + return nil + } + return o.ObscuredQuery +} + +func (o *ManualFeedbackInfo) GetActiveTab() *string { + if o == nil { + return nil + } + return o.ActiveTab +} + +func (o *ManualFeedbackInfo) GetComments() *string { + if o == nil { + return nil + } + return o.Comments +} + +func (o *ManualFeedbackInfo) GetSearchResults() []string { + if o == nil { + return nil + } + return o.SearchResults +} + +func (o *ManualFeedbackInfo) GetPreviousMessages() []string { + if o == nil { + return nil + } + return o.PreviousMessages +} + +func (o *ManualFeedbackInfo) GetChatTranscript() []FeedbackChatExchange { + if o == nil { + return nil + } + return o.ChatTranscript +} + +func (o *ManualFeedbackInfo) GetNumQueriesFromFirstRun() *int64 { + if o == nil { + return nil + } + return o.NumQueriesFromFirstRun +} + +func (o *ManualFeedbackInfo) GetVote() *Vote { + if o == nil { + return nil + } + return o.Vote +} + +func (o *ManualFeedbackInfo) GetRating() *int64 { + if o == nil { + return nil + } + return o.Rating +} + +func (o *ManualFeedbackInfo) GetRatingKey() *string { + if o == nil { + return nil + } + return o.RatingKey +} + +func (o *ManualFeedbackInfo) GetRatingScale() *int64 { + if o == nil { + return nil + } + return o.RatingScale +} diff --git a/tests/mockserver/internal/sdk/models/components/meeting.go b/tests/mockserver/internal/sdk/models/components/meeting.go new file mode 100644 index 00000000..7f1bd14d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/meeting.go @@ -0,0 +1,78 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type Meeting struct { + ID *string `json:"id,omitempty"` + Title *string `json:"title,omitempty"` + Description *string `json:"description,omitempty"` + URL *string `json:"url,omitempty"` + StartTime *time.Time `json:"startTime,omitempty"` + EndTime *time.Time `json:"endTime,omitempty"` + Attendees *CalendarAttendees `json:"attendees,omitempty"` +} + +func (m Meeting) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(m, "", false) +} + +func (m *Meeting) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &m, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Meeting) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Meeting) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *Meeting) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *Meeting) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *Meeting) GetStartTime() *time.Time { + if o == nil { + return nil + } + return o.StartTime +} + +func (o *Meeting) GetEndTime() *time.Time { + if o == nil { + return nil + } + return o.EndTime +} + +func (o *Meeting) GetAttendees() *CalendarAttendees { + if o == nil { + return nil + } + return o.Attendees +} diff --git a/tests/mockserver/internal/sdk/models/components/message.go b/tests/mockserver/internal/sdk/models/components/message.go new file mode 100644 index 00000000..5972aa33 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/message.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type MessageTextBlock struct { + Text string `json:"text"` + Type ContentType `json:"type"` +} + +func (o *MessageTextBlock) GetText() string { + if o == nil { + return "" + } + return o.Text +} + +func (o *MessageTextBlock) GetType() ContentType { + if o == nil { + return ContentType("") + } + return o.Type +} + +type Message struct { + // The role of the message. + Role *string `json:"role,omitempty"` + // The content of the message. + Content []MessageTextBlock `json:"content,omitempty"` +} + +func (o *Message) GetRole() *string { + if o == nil { + return nil + } + return o.Role +} + +func (o *Message) GetContent() []MessageTextBlock { + if o == nil { + return nil + } + return o.Content +} diff --git a/tests/mockserver/internal/sdk/models/components/messagesrequest.go b/tests/mockserver/internal/sdk/models/components/messagesrequest.go new file mode 100644 index 00000000..e7c80836 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/messagesrequest.go @@ -0,0 +1,170 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// IDType - Type of the id in the incoming request. +type IDType string + +const ( + IDTypeChannelName IDType = "CHANNEL_NAME" + IDTypeThreadID IDType = "THREAD_ID" + IDTypeConversationID IDType = "CONVERSATION_ID" +) + +func (e IDType) ToPointer() *IDType { + return &e +} +func (e *IDType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "CHANNEL_NAME": + fallthrough + case "THREAD_ID": + fallthrough + case "CONVERSATION_ID": + *e = IDType(v) + return nil + default: + return fmt.Errorf("invalid value for IDType: %v", v) + } +} + +// Direction - The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. +type Direction string + +const ( + DirectionOlder Direction = "OLDER" + DirectionNewer Direction = "NEWER" +) + +func (e Direction) ToPointer() *Direction { + return &e +} +func (e *Direction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OLDER": + fallthrough + case "NEWER": + *e = Direction(v) + return nil + default: + return fmt.Errorf("invalid value for Direction: %v", v) + } +} + +// Datasource - The type of the data source. Missing field defaults to SLACK. +type Datasource string + +const ( + DatasourceSlack Datasource = "SLACK" + DatasourceMicrosoftteams Datasource = "MICROSOFTTEAMS" + DatasourceFacebookworkplace Datasource = "FACEBOOKWORKPLACE" +) + +func (e Datasource) ToPointer() *Datasource { + return &e +} +func (e *Datasource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "SLACK": + fallthrough + case "MICROSOFTTEAMS": + fallthrough + case "FACEBOOKWORKPLACE": + *e = Datasource(v) + return nil + default: + return fmt.Errorf("invalid value for Datasource: %v", v) + } +} + +type MessagesRequest struct { + // Type of the id in the incoming request. + IDType IDType `json:"idType"` + // 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. + ID string `json:"id"` + // Id for the for the workspace in case of multiple workspaces. + WorkspaceID *string `json:"workspaceId,omitempty"` + // The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. + Direction *Direction `json:"direction,omitempty"` + // Timestamp in millis of the reference message. Only applicable when using a message_id. + TimestampMillis *int64 `json:"timestampMillis,omitempty"` + // Whether to include root message in response. + IncludeRootMessage *bool `json:"includeRootMessage,omitempty"` + // The type of the data source. Missing field defaults to SLACK. + Datasource *Datasource `json:"datasource,omitempty"` + // The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. + DatasourceInstanceDisplayName *string `json:"datasourceInstanceDisplayName,omitempty"` +} + +func (o *MessagesRequest) GetIDType() IDType { + if o == nil { + return IDType("") + } + return o.IDType +} + +func (o *MessagesRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *MessagesRequest) GetWorkspaceID() *string { + if o == nil { + return nil + } + return o.WorkspaceID +} + +func (o *MessagesRequest) GetDirection() *Direction { + if o == nil { + return nil + } + return o.Direction +} + +func (o *MessagesRequest) GetTimestampMillis() *int64 { + if o == nil { + return nil + } + return o.TimestampMillis +} + +func (o *MessagesRequest) GetIncludeRootMessage() *bool { + if o == nil { + return nil + } + return o.IncludeRootMessage +} + +func (o *MessagesRequest) GetDatasource() *Datasource { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *MessagesRequest) GetDatasourceInstanceDisplayName() *string { + if o == nil { + return nil + } + return o.DatasourceInstanceDisplayName +} diff --git a/tests/mockserver/internal/sdk/models/components/messagesresponse.go b/tests/mockserver/internal/sdk/models/components/messagesresponse.go new file mode 100644 index 00000000..6d8bb063 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/messagesresponse.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type MessagesResponse struct { + // Whether there are more results for client to continue requesting. + HasMore bool `json:"hasMore"` + SearchResponse *SearchResponse `json:"searchResponse,omitempty"` + RootMessage *SearchResult `json:"rootMessage,omitempty"` +} + +func (o *MessagesResponse) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *MessagesResponse) GetSearchResponse() *SearchResponse { + if o == nil { + return nil + } + return o.SearchResponse +} + +func (o *MessagesResponse) GetRootMessage() *SearchResult { + if o == nil { + return nil + } + return o.RootMessage +} diff --git a/tests/mockserver/internal/sdk/models/components/objectdefinition.go b/tests/mockserver/internal/sdk/models/components/objectdefinition.go new file mode 100644 index 00000000..4c33e759 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/objectdefinition.go @@ -0,0 +1,137 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// DocCategory - The document category of this object type. +type DocCategory string + +const ( + DocCategoryUncategorized DocCategory = "UNCATEGORIZED" + DocCategoryTickets DocCategory = "TICKETS" + DocCategoryCrm DocCategory = "CRM" + DocCategoryPublishedContent DocCategory = "PUBLISHED_CONTENT" + DocCategoryCollaborativeContent DocCategory = "COLLABORATIVE_CONTENT" + DocCategoryQuestionAnswer DocCategory = "QUESTION_ANSWER" + DocCategoryMessaging DocCategory = "MESSAGING" + DocCategoryCodeRepository DocCategory = "CODE_REPOSITORY" + DocCategoryChangeManagement DocCategory = "CHANGE_MANAGEMENT" + DocCategoryPeople DocCategory = "PEOPLE" + DocCategoryEmail DocCategory = "EMAIL" + DocCategorySso DocCategory = "SSO" + DocCategoryAts DocCategory = "ATS" + DocCategoryKnowledgeHub DocCategory = "KNOWLEDGE_HUB" + DocCategoryExternalShortcut DocCategory = "EXTERNAL_SHORTCUT" + DocCategoryEntity DocCategory = "ENTITY" + DocCategoryCalendar DocCategory = "CALENDAR" +) + +func (e DocCategory) ToPointer() *DocCategory { + return &e +} +func (e *DocCategory) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "UNCATEGORIZED": + fallthrough + case "TICKETS": + fallthrough + case "CRM": + fallthrough + case "PUBLISHED_CONTENT": + fallthrough + case "COLLABORATIVE_CONTENT": + fallthrough + case "QUESTION_ANSWER": + fallthrough + case "MESSAGING": + fallthrough + case "CODE_REPOSITORY": + fallthrough + case "CHANGE_MANAGEMENT": + fallthrough + case "PEOPLE": + fallthrough + case "EMAIL": + fallthrough + case "SSO": + fallthrough + case "ATS": + fallthrough + case "KNOWLEDGE_HUB": + fallthrough + case "EXTERNAL_SHORTCUT": + fallthrough + case "ENTITY": + fallthrough + case "CALENDAR": + *e = DocCategory(v) + return nil + default: + return fmt.Errorf("invalid value for DocCategory: %v", v) + } +} + +// ObjectDefinition - The definition for an `DocumentMetadata.objectType` within a datasource. +type ObjectDefinition struct { + // Unique identifier for this `DocumentMetadata.objectType`. If omitted, this definition is used as a default for all unmatched `DocumentMetadata.objectType`s in this datasource. + Name *string `json:"name,omitempty"` + // The user-friendly name of the object for display. + DisplayLabel *string `json:"displayLabel,omitempty"` + // The document category of this object type. + DocCategory *DocCategory `json:"docCategory,omitempty"` + PropertyDefinitions []PropertyDefinition `json:"propertyDefinitions,omitempty"` + // A list of `PropertyGroup`s belonging to this object type, which will group properties to be displayed together in the UI. + PropertyGroups []PropertyGroup `json:"propertyGroups,omitempty"` + // Whether or not the object is summarizable + Summarizable *bool `json:"summarizable,omitempty"` +} + +func (o *ObjectDefinition) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *ObjectDefinition) GetDisplayLabel() *string { + if o == nil { + return nil + } + return o.DisplayLabel +} + +func (o *ObjectDefinition) GetDocCategory() *DocCategory { + if o == nil { + return nil + } + return o.DocCategory +} + +func (o *ObjectDefinition) GetPropertyDefinitions() []PropertyDefinition { + if o == nil { + return nil + } + return o.PropertyDefinitions +} + +func (o *ObjectDefinition) GetPropertyGroups() []PropertyGroup { + if o == nil { + return nil + } + return o.PropertyGroups +} + +func (o *ObjectDefinition) GetSummarizable() *bool { + if o == nil { + return nil + } + return o.Summarizable +} diff --git a/tests/mockserver/internal/sdk/models/components/objectpermissions.go b/tests/mockserver/internal/sdk/models/components/objectpermissions.go new file mode 100644 index 00000000..0988ab8f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/objectpermissions.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ObjectPermissions struct { + // Describes the write permissions levels that a user has for a specific feature + Write *WritePermission `json:"write,omitempty"` +} + +func (o *ObjectPermissions) GetWrite() *WritePermission { + if o == nil { + return nil + } + return o.Write +} diff --git a/tests/mockserver/internal/sdk/models/components/operatormetadata.go b/tests/mockserver/internal/sdk/models/components/operatormetadata.go new file mode 100644 index 00000000..01e632cd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/operatormetadata.go @@ -0,0 +1,102 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type OperatorType string + +const ( + OperatorTypeText OperatorType = "TEXT" + OperatorTypeDouble OperatorType = "DOUBLE" + OperatorTypeDate OperatorType = "DATE" + OperatorTypeUser OperatorType = "USER" +) + +func (e OperatorType) ToPointer() *OperatorType { + return &e +} +func (e *OperatorType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "TEXT": + fallthrough + case "DOUBLE": + fallthrough + case "DATE": + fallthrough + case "USER": + *e = OperatorType(v) + return nil + default: + return fmt.Errorf("invalid value for OperatorType: %v", v) + } +} + +type OperatorMetadata struct { + Name string `json:"name"` + // Whether this operator is supported by default or something that was created within a workplace app (e.g. custom jira field). + IsCustom *bool `json:"isCustom,omitempty"` + OperatorType *OperatorType `json:"operatorType,omitempty"` + HelpText *string `json:"helpText,omitempty"` + Scopes []OperatorScope `json:"scopes,omitempty"` + // Raw/canonical value of the operator. Only applies when result is an operator value. + Value *string `json:"value,omitempty"` + // Human readable value of the operator that can be shown to the user. Only applies when result is an operator value. + DisplayValue *string `json:"displayValue,omitempty"` +} + +func (o *OperatorMetadata) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *OperatorMetadata) GetIsCustom() *bool { + if o == nil { + return nil + } + return o.IsCustom +} + +func (o *OperatorMetadata) GetOperatorType() *OperatorType { + if o == nil { + return nil + } + return o.OperatorType +} + +func (o *OperatorMetadata) GetHelpText() *string { + if o == nil { + return nil + } + return o.HelpText +} + +func (o *OperatorMetadata) GetScopes() []OperatorScope { + if o == nil { + return nil + } + return o.Scopes +} + +func (o *OperatorMetadata) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *OperatorMetadata) GetDisplayValue() *string { + if o == nil { + return nil + } + return o.DisplayValue +} diff --git a/tests/mockserver/internal/sdk/models/components/operatorscope.go b/tests/mockserver/internal/sdk/models/components/operatorscope.go new file mode 100644 index 00000000..1432e9dd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/operatorscope.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type OperatorScope struct { + Datasource *string `json:"datasource,omitempty"` + DocType *string `json:"docType,omitempty"` +} + +func (o *OperatorScope) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *OperatorScope) GetDocType() *string { + if o == nil { + return nil + } + return o.DocType +} diff --git a/tests/mockserver/internal/sdk/models/components/peoplerequest.go b/tests/mockserver/internal/sdk/models/components/peoplerequest.go new file mode 100644 index 00000000..1240c00e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/peoplerequest.go @@ -0,0 +1,141 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type PeopleRequestIncludeField string + +const ( + PeopleRequestIncludeFieldBadges PeopleRequestIncludeField = "BADGES" + PeopleRequestIncludeFieldBusyEvents PeopleRequestIncludeField = "BUSY_EVENTS" + PeopleRequestIncludeFieldDocumentActivity PeopleRequestIncludeField = "DOCUMENT_ACTIVITY" + PeopleRequestIncludeFieldInviteInfo PeopleRequestIncludeField = "INVITE_INFO" + PeopleRequestIncludeFieldPeopleDistance PeopleRequestIncludeField = "PEOPLE_DISTANCE" + PeopleRequestIncludeFieldPermissions PeopleRequestIncludeField = "PERMISSIONS" + PeopleRequestIncludeFieldPeopleDetails PeopleRequestIncludeField = "PEOPLE_DETAILS" + PeopleRequestIncludeFieldManagementDetails PeopleRequestIncludeField = "MANAGEMENT_DETAILS" + PeopleRequestIncludeFieldPeopleProfileSettings PeopleRequestIncludeField = "PEOPLE_PROFILE_SETTINGS" + PeopleRequestIncludeFieldPeopleWithoutManager PeopleRequestIncludeField = "PEOPLE_WITHOUT_MANAGER" +) + +func (e PeopleRequestIncludeField) ToPointer() *PeopleRequestIncludeField { + return &e +} +func (e *PeopleRequestIncludeField) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BADGES": + fallthrough + case "BUSY_EVENTS": + fallthrough + case "DOCUMENT_ACTIVITY": + fallthrough + case "INVITE_INFO": + fallthrough + case "PEOPLE_DISTANCE": + fallthrough + case "PERMISSIONS": + fallthrough + case "PEOPLE_DETAILS": + fallthrough + case "MANAGEMENT_DETAILS": + fallthrough + case "PEOPLE_PROFILE_SETTINGS": + fallthrough + case "PEOPLE_WITHOUT_MANAGER": + *e = PeopleRequestIncludeField(v) + return nil + default: + return fmt.Errorf("invalid value for PeopleRequestIncludeField: %v", v) + } +} + +type IncludeType string + +const ( + IncludeTypePeopleWithoutManager IncludeType = "PEOPLE_WITHOUT_MANAGER" + IncludeTypeInvalidEntities IncludeType = "INVALID_ENTITIES" +) + +func (e IncludeType) ToPointer() *IncludeType { + return &e +} +func (e *IncludeType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PEOPLE_WITHOUT_MANAGER": + fallthrough + case "INVALID_ENTITIES": + *e = IncludeType(v) + return nil + default: + return fmt.Errorf("invalid value for IncludeType: %v", v) + } +} + +type PeopleRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `json:"timezoneOffset,omitempty"` + // The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. + ObfuscatedIds []string `json:"obfuscatedIds,omitempty"` + // The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. + EmailIds []string `json:"emailIds,omitempty"` + // List of PersonMetadata fields to return (that aren't returned by default) + IncludeFields []PeopleRequestIncludeField `json:"includeFields,omitempty"` + // The types of people entities to include in the response in addition to those returned by default. + IncludeTypes []IncludeType `json:"includeTypes,omitempty"` + // A string denoting the search surface from which the endpoint is called. + Source *string `json:"source,omitempty"` +} + +func (o *PeopleRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *PeopleRequest) GetObfuscatedIds() []string { + if o == nil { + return nil + } + return o.ObfuscatedIds +} + +func (o *PeopleRequest) GetEmailIds() []string { + if o == nil { + return nil + } + return o.EmailIds +} + +func (o *PeopleRequest) GetIncludeFields() []PeopleRequestIncludeField { + if o == nil { + return nil + } + return o.IncludeFields +} + +func (o *PeopleRequest) GetIncludeTypes() []IncludeType { + if o == nil { + return nil + } + return o.IncludeTypes +} + +func (o *PeopleRequest) GetSource() *string { + if o == nil { + return nil + } + return o.Source +} diff --git a/tests/mockserver/internal/sdk/models/components/peopleresponse.go b/tests/mockserver/internal/sdk/models/components/peopleresponse.go new file mode 100644 index 00000000..45267148 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/peopleresponse.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PeopleResponse struct { + // A Person for each ID in the request, each with PersonMetadata populated. + Results []Person `json:"results,omitempty"` + // 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. + RelatedDocuments []RelatedDocuments `json:"relatedDocuments,omitempty"` + // A list of IDs that could not be found. + Errors []string `json:"errors,omitempty"` +} + +func (o *PeopleResponse) GetResults() []Person { + if o == nil { + return nil + } + return o.Results +} + +func (o *PeopleResponse) GetRelatedDocuments() []RelatedDocuments { + if o == nil { + return nil + } + return o.RelatedDocuments +} + +func (o *PeopleResponse) GetErrors() []string { + if o == nil { + return nil + } + return o.Errors +} diff --git a/tests/mockserver/internal/sdk/models/components/period.go b/tests/mockserver/internal/sdk/models/components/period.go new file mode 100644 index 00000000..b91dda4d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/period.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Period struct { + // DEPRECATED - The number of days from now in the past to define upper boundary of time period. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + MinDaysFromNow *int64 `json:"minDaysFromNow,omitempty"` + // DEPRECATED - The number of days from now in the past to define lower boundary of time period. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + MaxDaysFromNow *int64 `json:"maxDaysFromNow,omitempty"` + Start *TimePoint `json:"start,omitempty"` + End *TimePoint `json:"end,omitempty"` +} + +func (o *Period) GetMinDaysFromNow() *int64 { + if o == nil { + return nil + } + return o.MinDaysFromNow +} + +func (o *Period) GetMaxDaysFromNow() *int64 { + if o == nil { + return nil + } + return o.MaxDaysFromNow +} + +func (o *Period) GetStart() *TimePoint { + if o == nil { + return nil + } + return o.Start +} + +func (o *Period) GetEnd() *TimePoint { + if o == nil { + return nil + } + return o.End +} diff --git a/tests/mockserver/internal/sdk/models/components/permissions.go b/tests/mockserver/internal/sdk/models/components/permissions.go new file mode 100644 index 00000000..7e80832a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/permissions.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// Permissions - 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. +type Permissions struct { + // TODO--deprecate in favor of the read and write properties. True if the user has access to /adminsearch + CanAdminSearch *bool `json:"canAdminSearch,omitempty"` + // TODO--deprecate in favor of the read and write properties. True if the user can administrate client API tokens with global scope + CanAdminClientAPIGlobalTokens *bool `json:"canAdminClientApiGlobalTokens,omitempty"` + // TODO--deprecate in favor of the read and write properties. True if the user has access to data loss prevention (DLP) features + CanDlp *bool `json:"canDlp,omitempty"` + // Describes the read permission levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject + Read map[string][]ReadPermission `json:"read,omitempty"` + // Describes the write permissions levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject + Write map[string][]WritePermission `json:"write,omitempty"` + // Describes the grant permission levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject + Grant map[string][]GrantPermission `json:"grant,omitempty"` + // The roleId of the canonical role a user has. The displayName is equal to the roleId. + Role *string `json:"role,omitempty"` + // The roleIds of the roles a user has. + Roles []string `json:"roles,omitempty"` +} + +func (o *Permissions) GetCanAdminSearch() *bool { + if o == nil { + return nil + } + return o.CanAdminSearch +} + +func (o *Permissions) GetCanAdminClientAPIGlobalTokens() *bool { + if o == nil { + return nil + } + return o.CanAdminClientAPIGlobalTokens +} + +func (o *Permissions) GetCanDlp() *bool { + if o == nil { + return nil + } + return o.CanDlp +} + +func (o *Permissions) GetRead() map[string][]ReadPermission { + if o == nil { + return nil + } + return o.Read +} + +func (o *Permissions) GetWrite() map[string][]WritePermission { + if o == nil { + return nil + } + return o.Write +} + +func (o *Permissions) GetGrant() map[string][]GrantPermission { + if o == nil { + return nil + } + return o.Grant +} + +func (o *Permissions) GetRole() *string { + if o == nil { + return nil + } + return o.Role +} + +func (o *Permissions) GetRoles() []string { + if o == nil { + return nil + } + return o.Roles +} diff --git a/tests/mockserver/internal/sdk/models/components/permissionsgroupintersectiondefinition.go b/tests/mockserver/internal/sdk/models/components/permissionsgroupintersectiondefinition.go new file mode 100644 index 00000000..f9056e4f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/permissionsgroupintersectiondefinition.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// PermissionsGroupIntersectionDefinition - describes a list of groups that are all required in a permissions constraint +type PermissionsGroupIntersectionDefinition struct { + RequiredGroups []string `json:"requiredGroups,omitempty"` +} + +func (o *PermissionsGroupIntersectionDefinition) GetRequiredGroups() []string { + if o == nil { + return nil + } + return o.RequiredGroups +} diff --git a/tests/mockserver/internal/sdk/models/components/person.go b/tests/mockserver/internal/sdk/models/components/person.go new file mode 100644 index 00000000..3715fbc0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/person.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Person struct { + // The display name. + Name string `json:"name"` + // An opaque identifier that can be used to request metadata for a Person. + ObfuscatedID string `json:"obfuscatedId"` + // A list of documents related to this person. + RelatedDocuments []RelatedDocuments `json:"relatedDocuments,omitempty"` + Metadata *PersonMetadata `json:"metadata,omitempty"` +} + +func (o *Person) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Person) GetObfuscatedID() string { + if o == nil { + return "" + } + return o.ObfuscatedID +} + +func (o *Person) GetRelatedDocuments() []RelatedDocuments { + if o == nil { + return nil + } + return o.RelatedDocuments +} + +func (o *Person) GetMetadata() *PersonMetadata { + if o == nil { + return nil + } + return o.Metadata +} diff --git a/tests/mockserver/internal/sdk/models/components/persondistance.go b/tests/mockserver/internal/sdk/models/components/persondistance.go new file mode 100644 index 00000000..6a6a9807 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/persondistance.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PersonDistance struct { + // The display name. + Name string `json:"name"` + // An opaque identifier that can be used to request metadata for a Person. + ObfuscatedID string `json:"obfuscatedId"` + // Distance to person, refer to PeopleDistance pipeline on interpretation of the value. + Distance float32 `json:"distance"` +} + +func (o *PersonDistance) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *PersonDistance) GetObfuscatedID() string { + if o == nil { + return "" + } + return o.ObfuscatedID +} + +func (o *PersonDistance) GetDistance() float32 { + if o == nil { + return 0.0 + } + return o.Distance +} diff --git a/tests/mockserver/internal/sdk/models/components/personmetadata.go b/tests/mockserver/internal/sdk/models/components/personmetadata.go new file mode 100644 index 00000000..1752664d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/personmetadata.go @@ -0,0 +1,450 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "time" +) + +type PersonMetadataType string + +const ( + PersonMetadataTypeFullTime PersonMetadataType = "FULL_TIME" + PersonMetadataTypeContractor PersonMetadataType = "CONTRACTOR" + PersonMetadataTypeNonEmployee PersonMetadataType = "NON_EMPLOYEE" + PersonMetadataTypeFormerEmployee PersonMetadataType = "FORMER_EMPLOYEE" +) + +func (e PersonMetadataType) ToPointer() *PersonMetadataType { + return &e +} +func (e *PersonMetadataType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "FULL_TIME": + fallthrough + case "CONTRACTOR": + fallthrough + case "NON_EMPLOYEE": + fallthrough + case "FORMER_EMPLOYEE": + *e = PersonMetadataType(v) + return nil + default: + return fmt.Errorf("invalid value for PersonMetadataType: %v", v) + } +} + +type PersonMetadata struct { + Type *PersonMetadataType `json:"type,omitempty"` + // The first name of the person + FirstName *string `json:"firstName,omitempty"` + // The last name of the person + LastName *string `json:"lastName,omitempty"` + // Job title. + Title *string `json:"title,omitempty"` + // Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. + BusinessUnit *string `json:"businessUnit,omitempty"` + // An organizational unit where everyone has a similar task, e.g. `Engineering`. + Department *string `json:"department,omitempty"` + // Info about the employee's team(s). + Teams []PersonTeam `json:"teams,omitempty"` + // The number of people in this person's department. + DepartmentCount *int64 `json:"departmentCount,omitempty"` + // The user's primary email address + Email *string `json:"email,omitempty"` + // Additional email addresses of this user beyond the primary, if any. + AliasEmails []string `json:"aliasEmails,omitempty"` + // User facing string representing the person's location. + Location *string `json:"location,omitempty"` + // Detailed location with information about country, state, city etc. + StructuredLocation *StructuredLocation `json:"structuredLocation,omitempty"` + // Link to a customer's internal profile page. This is set to '#' when no link is desired. + ExternalProfileLink *string `json:"externalProfileLink,omitempty"` + Manager *Person `json:"manager,omitempty"` + // The chain of reporting in the company as far up as it goes. The last entry is this person's direct manager. + ManagementChain []Person `json:"managementChain,omitempty"` + // Phone number as a number string. + Phone *string `json:"phone,omitempty"` + // The timezone of the person. E.g. "Pacific Daylight Time". + Timezone *string `json:"timezone,omitempty"` + // The offset of the person's timezone in seconds from UTC. + TimezoneOffset *int64 `json:"timezoneOffset,omitempty"` + // The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). + PhotoURL *string `json:"photoUrl,omitempty"` + // The original photo URL of the person's avatar before any edits they made are applied + UneditedPhotoURL *string `json:"uneditedPhotoUrl,omitempty"` + // The URL of the person's banner photo. + BannerURL *string `json:"bannerUrl,omitempty"` + Reports []Person `json:"reports,omitempty"` + // The date when the employee started. + StartDate *types.Date `json:"startDate,omitempty"` + // If a former employee, the last date of employment. + EndDate *types.Date `json:"endDate,omitempty"` + // Short biography or mission statement of the employee. + Bio *string `json:"bio,omitempty"` + // She/her, He/his or other pronoun. + Pronoun *string `json:"pronoun,omitempty"` + // The total recursive size of the people reporting to this person, or 1 + OrgSizeCount *int64 `json:"orgSizeCount,omitempty"` + // The total number of people who directly report to this person, or 0 + DirectReportsCount *int64 `json:"directReportsCount,omitempty"` + // The preferred name of the person, or a nickname. + PreferredName *string `json:"preferredName,omitempty"` + // List of social network profiles. + SocialNetwork []SocialNetwork `json:"socialNetwork,omitempty"` + // List of profiles this user has in different datasources / tools that they use. + DatasourceProfile []DatasourceProfile `json:"datasourceProfile,omitempty"` + QuerySuggestions *QuerySuggestionList `json:"querySuggestions,omitempty"` + // List of people and distances to those people from this person. Optionally with metadata. + PeopleDistance []PersonDistance `json:"peopleDistance,omitempty"` + // Information regarding the invite status of a person. + InviteInfo *InviteInfo `json:"inviteInfo,omitempty"` + // Whether the user has signed into Glean at least once. + IsSignedUp *bool `json:"isSignedUp,omitempty"` + // The last time the user has used the Glean extension in ISO 8601 format. + LastExtensionUse *time.Time `json:"lastExtensionUse,omitempty"` + // 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. + Permissions *Permissions `json:"permissions,omitempty"` + // User customizable fields for additional people information. + CustomFields []CustomFieldData `json:"customFields,omitempty"` + // The logging id of the person used in scrubbed logs, tracking GA metrics. + LoggingID *string `json:"loggingId,omitempty"` + // Percentage of the company that started strictly after this person. Between [0,100). + StartDatePercentile *float32 `json:"startDatePercentile,omitempty"` + // Intervals of busy time for this person, along with the type of event they're busy with. + BusyEvents []AnonymousEvent `json:"busyEvents,omitempty"` + // flag settings to indicate user profile settings for certain items + ProfileBoolSettings map[string]bool `json:"profileBoolSettings,omitempty"` + // The badges that a user has earned over their lifetime. + Badges []Badge `json:"badges,omitempty"` + // Whether this person is a "root" node in their organization's hierarchy. + IsOrgRoot *bool `json:"isOrgRoot,omitempty"` +} + +func (p PersonMetadata) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PersonMetadata) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { + return err + } + return nil +} + +func (o *PersonMetadata) GetType() *PersonMetadataType { + if o == nil { + return nil + } + return o.Type +} + +func (o *PersonMetadata) GetFirstName() *string { + if o == nil { + return nil + } + return o.FirstName +} + +func (o *PersonMetadata) GetLastName() *string { + if o == nil { + return nil + } + return o.LastName +} + +func (o *PersonMetadata) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *PersonMetadata) GetBusinessUnit() *string { + if o == nil { + return nil + } + return o.BusinessUnit +} + +func (o *PersonMetadata) GetDepartment() *string { + if o == nil { + return nil + } + return o.Department +} + +func (o *PersonMetadata) GetTeams() []PersonTeam { + if o == nil { + return nil + } + return o.Teams +} + +func (o *PersonMetadata) GetDepartmentCount() *int64 { + if o == nil { + return nil + } + return o.DepartmentCount +} + +func (o *PersonMetadata) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} + +func (o *PersonMetadata) GetAliasEmails() []string { + if o == nil { + return nil + } + return o.AliasEmails +} + +func (o *PersonMetadata) GetLocation() *string { + if o == nil { + return nil + } + return o.Location +} + +func (o *PersonMetadata) GetStructuredLocation() *StructuredLocation { + if o == nil { + return nil + } + return o.StructuredLocation +} + +func (o *PersonMetadata) GetExternalProfileLink() *string { + if o == nil { + return nil + } + return o.ExternalProfileLink +} + +func (o *PersonMetadata) GetManager() *Person { + if o == nil { + return nil + } + return o.Manager +} + +func (o *PersonMetadata) GetManagementChain() []Person { + if o == nil { + return nil + } + return o.ManagementChain +} + +func (o *PersonMetadata) GetPhone() *string { + if o == nil { + return nil + } + return o.Phone +} + +func (o *PersonMetadata) GetTimezone() *string { + if o == nil { + return nil + } + return o.Timezone +} + +func (o *PersonMetadata) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *PersonMetadata) GetPhotoURL() *string { + if o == nil { + return nil + } + return o.PhotoURL +} + +func (o *PersonMetadata) GetUneditedPhotoURL() *string { + if o == nil { + return nil + } + return o.UneditedPhotoURL +} + +func (o *PersonMetadata) GetBannerURL() *string { + if o == nil { + return nil + } + return o.BannerURL +} + +func (o *PersonMetadata) GetReports() []Person { + if o == nil { + return nil + } + return o.Reports +} + +func (o *PersonMetadata) GetStartDate() *types.Date { + if o == nil { + return nil + } + return o.StartDate +} + +func (o *PersonMetadata) GetEndDate() *types.Date { + if o == nil { + return nil + } + return o.EndDate +} + +func (o *PersonMetadata) GetBio() *string { + if o == nil { + return nil + } + return o.Bio +} + +func (o *PersonMetadata) GetPronoun() *string { + if o == nil { + return nil + } + return o.Pronoun +} + +func (o *PersonMetadata) GetOrgSizeCount() *int64 { + if o == nil { + return nil + } + return o.OrgSizeCount +} + +func (o *PersonMetadata) GetDirectReportsCount() *int64 { + if o == nil { + return nil + } + return o.DirectReportsCount +} + +func (o *PersonMetadata) GetPreferredName() *string { + if o == nil { + return nil + } + return o.PreferredName +} + +func (o *PersonMetadata) GetSocialNetwork() []SocialNetwork { + if o == nil { + return nil + } + return o.SocialNetwork +} + +func (o *PersonMetadata) GetDatasourceProfile() []DatasourceProfile { + if o == nil { + return nil + } + return o.DatasourceProfile +} + +func (o *PersonMetadata) GetQuerySuggestions() *QuerySuggestionList { + if o == nil { + return nil + } + return o.QuerySuggestions +} + +func (o *PersonMetadata) GetPeopleDistance() []PersonDistance { + if o == nil { + return nil + } + return o.PeopleDistance +} + +func (o *PersonMetadata) GetInviteInfo() *InviteInfo { + if o == nil { + return nil + } + return o.InviteInfo +} + +func (o *PersonMetadata) GetIsSignedUp() *bool { + if o == nil { + return nil + } + return o.IsSignedUp +} + +func (o *PersonMetadata) GetLastExtensionUse() *time.Time { + if o == nil { + return nil + } + return o.LastExtensionUse +} + +func (o *PersonMetadata) GetPermissions() *Permissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *PersonMetadata) GetCustomFields() []CustomFieldData { + if o == nil { + return nil + } + return o.CustomFields +} + +func (o *PersonMetadata) GetLoggingID() *string { + if o == nil { + return nil + } + return o.LoggingID +} + +func (o *PersonMetadata) GetStartDatePercentile() *float32 { + if o == nil { + return nil + } + return o.StartDatePercentile +} + +func (o *PersonMetadata) GetBusyEvents() []AnonymousEvent { + if o == nil { + return nil + } + return o.BusyEvents +} + +func (o *PersonMetadata) GetProfileBoolSettings() map[string]bool { + if o == nil { + return nil + } + return o.ProfileBoolSettings +} + +func (o *PersonMetadata) GetBadges() []Badge { + if o == nil { + return nil + } + return o.Badges +} + +func (o *PersonMetadata) GetIsOrgRoot() *bool { + if o == nil { + return nil + } + return o.IsOrgRoot +} diff --git a/tests/mockserver/internal/sdk/models/components/personobject.go b/tests/mockserver/internal/sdk/models/components/personobject.go new file mode 100644 index 00000000..cc403952 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/personobject.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PersonObject struct { + // The display name. + Name string `json:"name"` + // An opaque identifier that can be used to request metadata for a Person. + ObfuscatedID string `json:"obfuscatedId"` +} + +func (o *PersonObject) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *PersonObject) GetObfuscatedID() string { + if o == nil { + return "" + } + return o.ObfuscatedID +} diff --git a/tests/mockserver/internal/sdk/models/components/personteam.go b/tests/mockserver/internal/sdk/models/components/personteam.go new file mode 100644 index 00000000..bcc96612 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/personteam.go @@ -0,0 +1,106 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +// PersonTeamRelationship - The team member's relationship to the team. This defaults to MEMBER if not set. +type PersonTeamRelationship string + +const ( + PersonTeamRelationshipMember PersonTeamRelationship = "MEMBER" + PersonTeamRelationshipManager PersonTeamRelationship = "MANAGER" + PersonTeamRelationshipLead PersonTeamRelationship = "LEAD" + PersonTeamRelationshipPointOfContact PersonTeamRelationship = "POINT_OF_CONTACT" + PersonTeamRelationshipOther PersonTeamRelationship = "OTHER" +) + +func (e PersonTeamRelationship) ToPointer() *PersonTeamRelationship { + return &e +} +func (e *PersonTeamRelationship) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "MEMBER": + fallthrough + case "MANAGER": + fallthrough + case "LEAD": + fallthrough + case "POINT_OF_CONTACT": + fallthrough + case "OTHER": + *e = PersonTeamRelationship(v) + return nil + default: + return fmt.Errorf("invalid value for PersonTeamRelationship: %v", v) + } +} + +// PersonTeam - Use `id` if you index teams via Glean, and use `name` and `externalLink` if you want to use your own team pages +type PersonTeam struct { + // Unique identifier + ID *string `json:"id,omitempty"` + // Team name + Name *string `json:"name,omitempty"` + // Link to a team page on the internet or your company's intranet + ExternalLink *string `json:"externalLink,omitempty"` + // The team member's relationship to the team. This defaults to MEMBER if not set. + Relationship *PersonTeamRelationship `default:"MEMBER" json:"relationship"` + // The team member's start date + JoinDate *time.Time `json:"joinDate,omitempty"` +} + +func (p PersonTeam) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PersonTeam) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { + return err + } + return nil +} + +func (o *PersonTeam) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *PersonTeam) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *PersonTeam) GetExternalLink() *string { + if o == nil { + return nil + } + return o.ExternalLink +} + +func (o *PersonTeam) GetRelationship() *PersonTeamRelationship { + if o == nil { + return nil + } + return o.Relationship +} + +func (o *PersonTeam) GetJoinDate() *time.Time { + if o == nil { + return nil + } + return o.JoinDate +} diff --git a/tests/mockserver/internal/sdk/models/components/persontoteamrelationship.go b/tests/mockserver/internal/sdk/models/components/persontoteamrelationship.go new file mode 100644 index 00000000..f4a2bda2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/persontoteamrelationship.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +// PersonToTeamRelationshipRelationship - The team member's relationship to the team. This defaults to MEMBER if not set. +type PersonToTeamRelationshipRelationship string + +const ( + PersonToTeamRelationshipRelationshipMember PersonToTeamRelationshipRelationship = "MEMBER" + PersonToTeamRelationshipRelationshipManager PersonToTeamRelationshipRelationship = "MANAGER" + PersonToTeamRelationshipRelationshipLead PersonToTeamRelationshipRelationship = "LEAD" + PersonToTeamRelationshipRelationshipPointOfContact PersonToTeamRelationshipRelationship = "POINT_OF_CONTACT" + PersonToTeamRelationshipRelationshipOther PersonToTeamRelationshipRelationship = "OTHER" +) + +func (e PersonToTeamRelationshipRelationship) ToPointer() *PersonToTeamRelationshipRelationship { + return &e +} +func (e *PersonToTeamRelationshipRelationship) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "MEMBER": + fallthrough + case "MANAGER": + fallthrough + case "LEAD": + fallthrough + case "POINT_OF_CONTACT": + fallthrough + case "OTHER": + *e = PersonToTeamRelationshipRelationship(v) + return nil + default: + return fmt.Errorf("invalid value for PersonToTeamRelationshipRelationship: %v", v) + } +} + +// PersonToTeamRelationship - Metadata about the relationship of a person to a team. +type PersonToTeamRelationship struct { + Person Person `json:"person"` + // The team member's relationship to the team. This defaults to MEMBER if not set. + Relationship *PersonToTeamRelationshipRelationship `default:"MEMBER" json:"relationship"` + // Displayed name for the relationship if relationship is set to `OTHER`. + CustomRelationshipStr *string `json:"customRelationshipStr,omitempty"` + // The team member's start date + JoinDate *time.Time `json:"joinDate,omitempty"` +} + +func (p PersonToTeamRelationship) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PersonToTeamRelationship) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { + return err + } + return nil +} + +func (o *PersonToTeamRelationship) GetPerson() Person { + if o == nil { + return Person{} + } + return o.Person +} + +func (o *PersonToTeamRelationship) GetRelationship() *PersonToTeamRelationshipRelationship { + if o == nil { + return nil + } + return o.Relationship +} + +func (o *PersonToTeamRelationship) GetCustomRelationshipStr() *string { + if o == nil { + return nil + } + return o.CustomRelationshipStr +} + +func (o *PersonToTeamRelationship) GetJoinDate() *time.Time { + if o == nil { + return nil + } + return o.JoinDate +} diff --git a/tests/mockserver/internal/sdk/models/components/pindocument.go b/tests/mockserver/internal/sdk/models/components/pindocument.go new file mode 100644 index 00000000..76189f4d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/pindocument.go @@ -0,0 +1,90 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type PinDocument struct { + // The query strings for which the pinned result will show. + Queries []string `json:"queries,omitempty"` + // Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // The opaque id of the pin. + ID *string `json:"id,omitempty"` + // The document which should be a pinned result. + DocumentID string `json:"documentId"` + Attribution *Person `json:"attribution,omitempty"` + UpdatedBy *Person `json:"updatedBy,omitempty"` + CreateTime *time.Time `json:"createTime,omitempty"` + UpdateTime *time.Time `json:"updateTime,omitempty"` +} + +func (p PinDocument) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PinDocument) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil { + return err + } + return nil +} + +func (o *PinDocument) GetQueries() []string { + if o == nil { + return nil + } + return o.Queries +} + +func (o *PinDocument) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *PinDocument) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *PinDocument) GetDocumentID() string { + if o == nil { + return "" + } + return o.DocumentID +} + +func (o *PinDocument) GetAttribution() *Person { + if o == nil { + return nil + } + return o.Attribution +} + +func (o *PinDocument) GetUpdatedBy() *Person { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *PinDocument) GetCreateTime() *time.Time { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *PinDocument) GetUpdateTime() *time.Time { + if o == nil { + return nil + } + return o.UpdateTime +} diff --git a/tests/mockserver/internal/sdk/models/components/pinrequest.go b/tests/mockserver/internal/sdk/models/components/pinrequest.go new file mode 100644 index 00000000..7ef8d8e6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/pinrequest.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PinRequest struct { + // The query strings for which the pinned result will show. + Queries []string `json:"queries,omitempty"` + // Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // The document to be pinned. + DocumentID *string `json:"documentId,omitempty"` +} + +func (o *PinRequest) GetQueries() []string { + if o == nil { + return nil + } + return o.Queries +} + +func (o *PinRequest) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *PinRequest) GetDocumentID() *string { + if o == nil { + return nil + } + return o.DocumentID +} diff --git a/tests/mockserver/internal/sdk/models/components/possiblevalue.go b/tests/mockserver/internal/sdk/models/components/possiblevalue.go new file mode 100644 index 00000000..a2238c72 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/possiblevalue.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// PossibleValue - Possible value of a specific parameter +type PossibleValue struct { + // Possible value + Value *string `json:"value,omitempty"` + // User-friendly label associated with the value + Label *string `json:"label,omitempty"` +} + +func (o *PossibleValue) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *PossibleValue) GetLabel() *string { + if o == nil { + return nil + } + return o.Label +} diff --git a/tests/mockserver/internal/sdk/models/components/processalldocumentsrequest.go b/tests/mockserver/internal/sdk/models/components/processalldocumentsrequest.go new file mode 100644 index 00000000..3da693ea --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/processalldocumentsrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ProcessAllDocumentsRequest - Describes the request body of the /processalldocuments API call +type ProcessAllDocumentsRequest struct { + // If provided, process documents only for this custom datasource. Otherwise all uploaded documents are processed. + Datasource *string `json:"datasource,omitempty"` +} + +func (o *ProcessAllDocumentsRequest) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} diff --git a/tests/mockserver/internal/sdk/models/components/processallmembershipsrequest.go b/tests/mockserver/internal/sdk/models/components/processallmembershipsrequest.go new file mode 100644 index 00000000..baaa3e15 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/processallmembershipsrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ProcessAllMembershipsRequest - Describes the request body of the /processallmemberships API call +type ProcessAllMembershipsRequest struct { + // If provided, process group memberships only for this custom datasource. Otherwise all uploaded memberships are processed. + Datasource *string `json:"datasource,omitempty"` +} + +func (o *ProcessAllMembershipsRequest) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} diff --git a/tests/mockserver/internal/sdk/models/components/processinghistoryevent.go b/tests/mockserver/internal/sdk/models/components/processinghistoryevent.go new file mode 100644 index 00000000..e808139c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/processinghistoryevent.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ProcessingHistoryEvent - Processing history event for a datasource +type ProcessingHistoryEvent struct { + // The start time of the processing in ISO 8601 format + StartTime *string `json:"startTime,omitempty"` + // The end time of the processing in ISO 8601 format, 'NA' if still in progress + EndTime *string `json:"endTime,omitempty"` +} + +func (o *ProcessingHistoryEvent) GetStartTime() *string { + if o == nil { + return nil + } + return o.StartTime +} + +func (o *ProcessingHistoryEvent) GetEndTime() *string { + if o == nil { + return nil + } + return o.EndTime +} diff --git a/tests/mockserver/internal/sdk/models/components/prompttemplate.go b/tests/mockserver/internal/sdk/models/components/prompttemplate.go new file mode 100644 index 00000000..ad65ceb6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/prompttemplate.go @@ -0,0 +1,119 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PromptTemplate struct { + // The user-given identifier for this prompt template. + Name *string `json:"name,omitempty"` + // The actual template string. + Template string `json:"template"` + // The Application Id the prompt template should be created under. Empty for default assistant. + ApplicationID *string `json:"applicationId,omitempty"` + Inclusions *ChatRestrictionFilters `json:"inclusions,omitempty"` + // A list of added user roles for the Workflow. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of removed user roles for the Workflow. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + // Opaque id for this prompt template + ID *string `json:"id,omitempty"` + Author *Person `json:"author,omitempty"` + // Server Unix timestamp of the creation time. + CreateTimestamp *int64 `json:"createTimestamp,omitempty"` + // Server Unix timestamp of the last update time. + LastUpdateTimestamp *int64 `json:"lastUpdateTimestamp,omitempty"` + LastUpdatedBy *Person `json:"lastUpdatedBy,omitempty"` + // A list of roles for this prompt template explicitly granted. + Roles []UserRoleSpecification `json:"roles,omitempty"` +} + +func (o *PromptTemplate) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *PromptTemplate) GetTemplate() string { + if o == nil { + return "" + } + return o.Template +} + +func (o *PromptTemplate) GetApplicationID() *string { + if o == nil { + return nil + } + return o.ApplicationID +} + +func (o *PromptTemplate) GetInclusions() *ChatRestrictionFilters { + if o == nil { + return nil + } + return o.Inclusions +} + +func (o *PromptTemplate) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *PromptTemplate) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} + +func (o *PromptTemplate) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *PromptTemplate) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *PromptTemplate) GetAuthor() *Person { + if o == nil { + return nil + } + return o.Author +} + +func (o *PromptTemplate) GetCreateTimestamp() *int64 { + if o == nil { + return nil + } + return o.CreateTimestamp +} + +func (o *PromptTemplate) GetLastUpdateTimestamp() *int64 { + if o == nil { + return nil + } + return o.LastUpdateTimestamp +} + +func (o *PromptTemplate) GetLastUpdatedBy() *Person { + if o == nil { + return nil + } + return o.LastUpdatedBy +} + +func (o *PromptTemplate) GetRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.Roles +} diff --git a/tests/mockserver/internal/sdk/models/components/prompttemplateresult.go b/tests/mockserver/internal/sdk/models/components/prompttemplateresult.go new file mode 100644 index 00000000..9ef3447d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/prompttemplateresult.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PromptTemplateResult struct { + PromptTemplate *PromptTemplate `json:"promptTemplate,omitempty"` + // An opaque token that represents this prompt template + TrackingToken *string `json:"trackingToken,omitempty"` + FavoriteInfo *FavoriteInfo `json:"favoriteInfo,omitempty"` + RunCount *CountInfo `json:"runCount,omitempty"` +} + +func (o *PromptTemplateResult) GetPromptTemplate() *PromptTemplate { + if o == nil { + return nil + } + return o.PromptTemplate +} + +func (o *PromptTemplateResult) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *PromptTemplateResult) GetFavoriteInfo() *FavoriteInfo { + if o == nil { + return nil + } + return o.FavoriteInfo +} + +func (o *PromptTemplateResult) GetRunCount() *CountInfo { + if o == nil { + return nil + } + return o.RunCount +} diff --git a/tests/mockserver/internal/sdk/models/components/propertydefinition.go b/tests/mockserver/internal/sdk/models/components/propertydefinition.go new file mode 100644 index 00000000..d1631c91 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/propertydefinition.go @@ -0,0 +1,162 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// PropertyType - The type of custom property - this governs the search and faceting behavior. Note that MULTIPICKLIST is not yet supported. +type PropertyType string + +const ( + PropertyTypeText PropertyType = "TEXT" + PropertyTypeDate PropertyType = "DATE" + PropertyTypeInt PropertyType = "INT" + PropertyTypeUserid PropertyType = "USERID" + PropertyTypePicklist PropertyType = "PICKLIST" + PropertyTypeTextlist PropertyType = "TEXTLIST" + PropertyTypeMultipicklist PropertyType = "MULTIPICKLIST" +) + +func (e PropertyType) ToPointer() *PropertyType { + return &e +} +func (e *PropertyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "TEXT": + fallthrough + case "DATE": + fallthrough + case "INT": + fallthrough + case "USERID": + fallthrough + case "PICKLIST": + fallthrough + case "TEXTLIST": + fallthrough + case "MULTIPICKLIST": + *e = PropertyType(v) + return nil + default: + return fmt.Errorf("invalid value for PropertyType: %v", v) + } +} + +type UIOptions string + +const ( + UIOptionsNone UIOptions = "NONE" + UIOptionsSearchResult UIOptions = "SEARCH_RESULT" + UIOptionsDocHovercard UIOptions = "DOC_HOVERCARD" +) + +func (e UIOptions) ToPointer() *UIOptions { + return &e +} +func (e *UIOptions) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NONE": + fallthrough + case "SEARCH_RESULT": + fallthrough + case "DOC_HOVERCARD": + *e = UIOptions(v) + return nil + default: + return fmt.Errorf("invalid value for UIOptions: %v", v) + } +} + +type PropertyDefinition struct { + // The name of the property in the `DocumentMetadata` (e.g. 'createTime', 'updateTime', 'author', 'container'). In the future, this will support custom properties too. + Name *string `json:"name,omitempty"` + // The user friendly label for the property. + DisplayLabel *string `json:"displayLabel,omitempty"` + // The user friendly label for the property that will be used if a plural context. + DisplayLabelPlural *string `json:"displayLabelPlural,omitempty"` + // The type of custom property - this governs the search and faceting behavior. Note that MULTIPICKLIST is not yet supported. + PropertyType *PropertyType `json:"propertyType,omitempty"` + UIOptions *UIOptions `json:"uiOptions,omitempty"` + // If true then the property will not show up as a facet in the UI. + HideUIFacet *bool `json:"hideUiFacet,omitempty"` + // 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. + UIFacetOrder *int64 `json:"uiFacetOrder,omitempty"` + // If true then the property will not be indexed for retrieval and ranking. + SkipIndexing *bool `json:"skipIndexing,omitempty"` + // The unique identifier of the `PropertyGroup` to which this property belongs. + Group *string `json:"group,omitempty"` +} + +func (o *PropertyDefinition) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *PropertyDefinition) GetDisplayLabel() *string { + if o == nil { + return nil + } + return o.DisplayLabel +} + +func (o *PropertyDefinition) GetDisplayLabelPlural() *string { + if o == nil { + return nil + } + return o.DisplayLabelPlural +} + +func (o *PropertyDefinition) GetPropertyType() *PropertyType { + if o == nil { + return nil + } + return o.PropertyType +} + +func (o *PropertyDefinition) GetUIOptions() *UIOptions { + if o == nil { + return nil + } + return o.UIOptions +} + +func (o *PropertyDefinition) GetHideUIFacet() *bool { + if o == nil { + return nil + } + return o.HideUIFacet +} + +func (o *PropertyDefinition) GetUIFacetOrder() *int64 { + if o == nil { + return nil + } + return o.UIFacetOrder +} + +func (o *PropertyDefinition) GetSkipIndexing() *bool { + if o == nil { + return nil + } + return o.SkipIndexing +} + +func (o *PropertyDefinition) GetGroup() *string { + if o == nil { + return nil + } + return o.Group +} diff --git a/tests/mockserver/internal/sdk/models/components/propertygroup.go b/tests/mockserver/internal/sdk/models/components/propertygroup.go new file mode 100644 index 00000000..173332a5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/propertygroup.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// PropertyGroup - A grouping for multiple PropertyDefinition. Grouped properties will be displayed together in the UI. +type PropertyGroup struct { + // The unique identifier of the group. + Name *string `json:"name,omitempty"` + // The user-friendly group label to display. + DisplayLabel *string `json:"displayLabel,omitempty"` +} + +func (o *PropertyGroup) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *PropertyGroup) GetDisplayLabel() *string { + if o == nil { + return nil + } + return o.DisplayLabel +} diff --git a/tests/mockserver/internal/sdk/models/components/queryinsight.go b/tests/mockserver/internal/sdk/models/components/queryinsight.go new file mode 100644 index 00000000..faaa01fb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/queryinsight.go @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type QueryInsight struct { + // The query string the information is about. + Query string `json:"query"` + SearchCount *CountInfo `json:"searchCount,omitempty"` + SearchorCount *CountInfo `json:"searchorCount,omitempty"` + SearchWithClickCount *CountInfo `json:"searchWithClickCount,omitempty"` + ClickCount *CountInfo `json:"clickCount,omitempty"` + // list of similar queries to current one. + SimilarQueries []QueryInsight `json:"similarQueries,omitempty"` +} + +func (o *QueryInsight) GetQuery() string { + if o == nil { + return "" + } + return o.Query +} + +func (o *QueryInsight) GetSearchCount() *CountInfo { + if o == nil { + return nil + } + return o.SearchCount +} + +func (o *QueryInsight) GetSearchorCount() *CountInfo { + if o == nil { + return nil + } + return o.SearchorCount +} + +func (o *QueryInsight) GetSearchWithClickCount() *CountInfo { + if o == nil { + return nil + } + return o.SearchWithClickCount +} + +func (o *QueryInsight) GetClickCount() *CountInfo { + if o == nil { + return nil + } + return o.ClickCount +} + +func (o *QueryInsight) GetSimilarQueries() []QueryInsight { + if o == nil { + return nil + } + return o.SimilarQueries +} diff --git a/tests/mockserver/internal/sdk/models/components/queryinsightsresponse.go b/tests/mockserver/internal/sdk/models/components/queryinsightsresponse.go new file mode 100644 index 00000000..6f6c8ef2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/queryinsightsresponse.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type QueryInsightsResponse struct { + // Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). + LastLogTimestamp *int64 `json:"lastLogTimestamp,omitempty"` + // Insights for queries. + QueryInsights []QueryInsight `json:"queryInsights,omitempty"` + // Insights for low performing queries without good results. + LowPerformingQueryInsights []QueryInsight `json:"lowPerformingQueryInsights,omitempty"` + // list of departments applicable for queries tab. + Departments []string `json:"departments,omitempty"` + // Min threshold in number of visitors while populating results, otherwise 0. + MinVisitorThreshold *int64 `json:"minVisitorThreshold,omitempty"` +} + +func (o *QueryInsightsResponse) GetLastLogTimestamp() *int64 { + if o == nil { + return nil + } + return o.LastLogTimestamp +} + +func (o *QueryInsightsResponse) GetQueryInsights() []QueryInsight { + if o == nil { + return nil + } + return o.QueryInsights +} + +func (o *QueryInsightsResponse) GetLowPerformingQueryInsights() []QueryInsight { + if o == nil { + return nil + } + return o.LowPerformingQueryInsights +} + +func (o *QueryInsightsResponse) GetDepartments() []string { + if o == nil { + return nil + } + return o.Departments +} + +func (o *QueryInsightsResponse) GetMinVisitorThreshold() *int64 { + if o == nil { + return nil + } + return o.MinVisitorThreshold +} diff --git a/tests/mockserver/internal/sdk/models/components/querysuggestion.go b/tests/mockserver/internal/sdk/models/components/querysuggestion.go new file mode 100644 index 00000000..68f95f2a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/querysuggestion.go @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type QuerySuggestion struct { + // A query term missing from the original query on which this suggestion is based. + MissingTerm *string `json:"missingTerm,omitempty"` + // The query being suggested (e.g. enforcing the missing term from the original query). + Query string `json:"query"` + SearchProviderInfo *SearchProviderInfo `json:"searchProviderInfo,omitempty"` + // A user-facing description to display for the suggestion. + Label *string `json:"label,omitempty"` + // The datasource associated with the suggestion. + Datasource *string `json:"datasource,omitempty"` + RequestOptions *SearchRequestOptions `json:"requestOptions,omitempty"` + // The bolded ranges within the query of the QuerySuggestion. + Ranges []TextRange `json:"ranges,omitempty"` + InputDetails *SearchRequestInputDetails `json:"inputDetails,omitempty"` +} + +func (o *QuerySuggestion) GetMissingTerm() *string { + if o == nil { + return nil + } + return o.MissingTerm +} + +func (o *QuerySuggestion) GetQuery() string { + if o == nil { + return "" + } + return o.Query +} + +func (o *QuerySuggestion) GetSearchProviderInfo() *SearchProviderInfo { + if o == nil { + return nil + } + return o.SearchProviderInfo +} + +func (o *QuerySuggestion) GetLabel() *string { + if o == nil { + return nil + } + return o.Label +} + +func (o *QuerySuggestion) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *QuerySuggestion) GetRequestOptions() *SearchRequestOptions { + if o == nil { + return nil + } + return o.RequestOptions +} + +func (o *QuerySuggestion) GetRanges() []TextRange { + if o == nil { + return nil + } + return o.Ranges +} + +func (o *QuerySuggestion) GetInputDetails() *SearchRequestInputDetails { + if o == nil { + return nil + } + return o.InputDetails +} diff --git a/tests/mockserver/internal/sdk/models/components/querysuggestionlist.go b/tests/mockserver/internal/sdk/models/components/querysuggestionlist.go new file mode 100644 index 00000000..899a9aed --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/querysuggestionlist.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type QuerySuggestionList struct { + Suggestions []QuerySuggestion `json:"suggestions,omitempty"` + Person *Person `json:"person,omitempty"` +} + +func (o *QuerySuggestionList) GetSuggestions() []QuerySuggestion { + if o == nil { + return nil + } + return o.Suggestions +} + +func (o *QuerySuggestionList) GetPerson() *Person { + if o == nil { + return nil + } + return o.Person +} diff --git a/tests/mockserver/internal/sdk/models/components/quicklink.go b/tests/mockserver/internal/sdk/models/components/quicklink.go new file mode 100644 index 00000000..7387d909 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/quicklink.go @@ -0,0 +1,101 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type Scope string + +const ( + ScopeAppCard Scope = "APP_CARD" + ScopeAutocompleteExactMatch Scope = "AUTOCOMPLETE_EXACT_MATCH" + ScopeAutocompleteFuzzyMatch Scope = "AUTOCOMPLETE_FUZZY_MATCH" + ScopeAutocompleteZeroQuery Scope = "AUTOCOMPLETE_ZERO_QUERY" + ScopeNewTabPage Scope = "NEW_TAB_PAGE" +) + +func (e Scope) ToPointer() *Scope { + return &e +} +func (e *Scope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "APP_CARD": + fallthrough + case "AUTOCOMPLETE_EXACT_MATCH": + fallthrough + case "AUTOCOMPLETE_FUZZY_MATCH": + fallthrough + case "AUTOCOMPLETE_ZERO_QUERY": + fallthrough + case "NEW_TAB_PAGE": + *e = Scope(v) + return nil + default: + return fmt.Errorf("invalid value for Scope: %v", v) + } +} + +// Quicklink - An action for a specific datasource that will show up in autocomplete and app card, e.g. "Create new issue" for jira. +type Quicklink struct { + // Full action name. Used in autocomplete. + Name *string `json:"name,omitempty"` + // Shortened name. Used in app cards. + ShortName *string `json:"shortName,omitempty"` + // The URL of the action. + URL *string `json:"url,omitempty"` + // Defines how to render an icon + IconConfig *IconConfig `json:"iconConfig,omitempty"` + // Unique identifier of this quicklink + ID *string `json:"id,omitempty"` + // The scopes for which this quicklink is applicable + Scopes []Scope `json:"scopes,omitempty"` +} + +func (o *Quicklink) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *Quicklink) GetShortName() *string { + if o == nil { + return nil + } + return o.ShortName +} + +func (o *Quicklink) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *Quicklink) GetIconConfig() *IconConfig { + if o == nil { + return nil + } + return o.IconConfig +} + +func (o *Quicklink) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *Quicklink) GetScopes() []Scope { + if o == nil { + return nil + } + return o.Scopes +} diff --git a/tests/mockserver/internal/sdk/models/components/reaction.go b/tests/mockserver/internal/sdk/models/components/reaction.go new file mode 100644 index 00000000..173018e6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/reaction.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Reaction struct { + Type *string `json:"type,omitempty"` + // The count of the reaction type on the document. + Count *int64 `json:"count,omitempty"` + Reactors []Person `json:"reactors,omitempty"` + // Whether the user in context reacted with this type to the document. + ReactedByViewer *bool `json:"reactedByViewer,omitempty"` +} + +func (o *Reaction) GetType() *string { + if o == nil { + return nil + } + return o.Type +} + +func (o *Reaction) GetCount() *int64 { + if o == nil { + return nil + } + return o.Count +} + +func (o *Reaction) GetReactors() []Person { + if o == nil { + return nil + } + return o.Reactors +} + +func (o *Reaction) GetReactedByViewer() *bool { + if o == nil { + return nil + } + return o.ReactedByViewer +} diff --git a/tests/mockserver/internal/sdk/models/components/readpermission.go b/tests/mockserver/internal/sdk/models/components/readpermission.go new file mode 100644 index 00000000..3c19d6f0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/readpermission.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ReadPermission - Describes the read permission level that a user has for a specific feature +type ReadPermission struct { + // Describes the scope for a ReadPermission, WritePermission, or GrantPermission object + ScopeType *ScopeType `json:"scopeType,omitempty"` +} + +func (o *ReadPermission) GetScopeType() *ScopeType { + if o == nil { + return nil + } + return o.ScopeType +} diff --git a/tests/mockserver/internal/sdk/models/components/recommendationsrequest.go b/tests/mockserver/internal/sdk/models/components/recommendationsrequest.go new file mode 100644 index 00000000..707ad547 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/recommendationsrequest.go @@ -0,0 +1,90 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type RecommendationsRequest struct { + // The ISO 8601 timestamp associated with the client request. + Timestamp *time.Time `json:"timestamp,omitempty"` + // A previously received trackingToken for a search associated with the same query. Useful for more requests and requests for other tabs. + TrackingToken *string `json:"trackingToken,omitempty"` + SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` + SourceDocument *Document `json:"sourceDocument,omitempty"` + // 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. + PageSize *int64 `json:"pageSize,omitempty"` + // Hint to the server about how many characters long a snippet may be. Server may return less or more. + MaxSnippetSize *int64 `json:"maxSnippetSize,omitempty"` + RecommendationDocumentSpec *DocumentSpecUnion `json:"recommendationDocumentSpec,omitempty"` + RequestOptions *RecommendationsRequestOptions `json:"requestOptions,omitempty"` +} + +func (r RecommendationsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(r, "", false) +} + +func (r *RecommendationsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &r, "", false, false); err != nil { + return err + } + return nil +} + +func (o *RecommendationsRequest) GetTimestamp() *time.Time { + if o == nil { + return nil + } + return o.Timestamp +} + +func (o *RecommendationsRequest) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *RecommendationsRequest) GetSessionInfo() *SessionInfo { + if o == nil { + return nil + } + return o.SessionInfo +} + +func (o *RecommendationsRequest) GetSourceDocument() *Document { + if o == nil { + return nil + } + return o.SourceDocument +} + +func (o *RecommendationsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *RecommendationsRequest) GetMaxSnippetSize() *int64 { + if o == nil { + return nil + } + return o.MaxSnippetSize +} + +func (o *RecommendationsRequest) GetRecommendationDocumentSpec() *DocumentSpecUnion { + if o == nil { + return nil + } + return o.RecommendationDocumentSpec +} + +func (o *RecommendationsRequest) GetRequestOptions() *RecommendationsRequestOptions { + if o == nil { + return nil + } + return o.RequestOptions +} diff --git a/tests/mockserver/internal/sdk/models/components/recommendationsrequestoptions.go b/tests/mockserver/internal/sdk/models/components/recommendationsrequestoptions.go new file mode 100644 index 00000000..15fd1bbd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/recommendationsrequestoptions.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type RecommendationsRequestOptions struct { + // Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. + DatasourceFilter *string `json:"datasourceFilter,omitempty"` + // Filter results to only those relevant to one or more datasources (e.g. jira, gdrive). All results are returned if missing. + DatasourcesFilter []string `json:"datasourcesFilter,omitempty"` + // A list of facet filter sets that will be OR'ed together. + FacetFilterSets []FacetFilterSet `json:"facetFilterSets,omitempty"` + Context *Document `json:"context,omitempty"` + // The types of prominence wanted in results returned. Default is any type. + ResultProminence []SearchResultProminenceEnum `json:"resultProminence,omitempty"` +} + +func (o *RecommendationsRequestOptions) GetDatasourceFilter() *string { + if o == nil { + return nil + } + return o.DatasourceFilter +} + +func (o *RecommendationsRequestOptions) GetDatasourcesFilter() []string { + if o == nil { + return nil + } + return o.DatasourcesFilter +} + +func (o *RecommendationsRequestOptions) GetFacetFilterSets() []FacetFilterSet { + if o == nil { + return nil + } + return o.FacetFilterSets +} + +func (o *RecommendationsRequestOptions) GetContext() *Document { + if o == nil { + return nil + } + return o.Context +} + +func (o *RecommendationsRequestOptions) GetResultProminence() []SearchResultProminenceEnum { + if o == nil { + return nil + } + return o.ResultProminence +} diff --git a/tests/mockserver/internal/sdk/models/components/referencerange.go b/tests/mockserver/internal/sdk/models/components/referencerange.go new file mode 100644 index 00000000..7fe5e73a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/referencerange.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ReferenceRange - Each text range from the response can correspond to an array of snippets from the citation source. +type ReferenceRange struct { + // A subsection of a given string to which some special formatting should be applied. + TextRange *TextRange `json:"textRange,omitempty"` + Snippets []SearchResultSnippet `json:"snippets,omitempty"` +} + +func (o *ReferenceRange) GetTextRange() *TextRange { + if o == nil { + return nil + } + return o.TextRange +} + +func (o *ReferenceRange) GetSnippets() []SearchResultSnippet { + if o == nil { + return nil + } + return o.Snippets +} diff --git a/tests/mockserver/internal/sdk/models/components/relateddocuments.go b/tests/mockserver/internal/sdk/models/components/relateddocuments.go new file mode 100644 index 00000000..338e8429 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/relateddocuments.go @@ -0,0 +1,120 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// Relation - How this document relates to the including entity. +type Relation string + +const ( + RelationAttachment Relation = "ATTACHMENT" + RelationCanonical Relation = "CANONICAL" + RelationCase Relation = "CASE" + RelationContact Relation = "CONTACT" + RelationConversationMessages Relation = "CONVERSATION_MESSAGES" + RelationExpert Relation = "EXPERT" + RelationFrom Relation = "FROM" + RelationHighlight Relation = "HIGHLIGHT" + RelationOpportunity Relation = "OPPORTUNITY" + RelationRecent Relation = "RECENT" + RelationSource Relation = "SOURCE" + RelationTicket Relation = "TICKET" + RelationTranscript Relation = "TRANSCRIPT" + RelationWith Relation = "WITH" +) + +func (e Relation) ToPointer() *Relation { + return &e +} +func (e *Relation) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ATTACHMENT": + fallthrough + case "CANONICAL": + fallthrough + case "CASE": + fallthrough + case "CONTACT": + fallthrough + case "CONVERSATION_MESSAGES": + fallthrough + case "EXPERT": + fallthrough + case "FROM": + fallthrough + case "HIGHLIGHT": + fallthrough + case "OPPORTUNITY": + fallthrough + case "RECENT": + fallthrough + case "SOURCE": + fallthrough + case "TICKET": + fallthrough + case "TRANSCRIPT": + fallthrough + case "WITH": + *e = Relation(v) + return nil + default: + return fmt.Errorf("invalid value for Relation: %v", v) + } +} + +type RelatedDocuments struct { + // How this document relates to the including entity. + Relation *Relation `json:"relation,omitempty"` + // Which entity in the response that this entity relates to. Relevant when there are multiple entities associated with the response (such as merged customers) + AssociatedEntityID *string `json:"associatedEntityId,omitempty"` + QuerySuggestion *QuerySuggestion `json:"querySuggestion,omitempty"` + // A truncated list of documents with this relation. TO BE DEPRECATED. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + Documents []Document `json:"documents,omitempty"` + // A truncated list of documents associated with this relation. To be used in favor of `documents` because it contains a trackingToken. + Results []SearchResult `json:"results,omitempty"` +} + +func (o *RelatedDocuments) GetRelation() *Relation { + if o == nil { + return nil + } + return o.Relation +} + +func (o *RelatedDocuments) GetAssociatedEntityID() *string { + if o == nil { + return nil + } + return o.AssociatedEntityID +} + +func (o *RelatedDocuments) GetQuerySuggestion() *QuerySuggestion { + if o == nil { + return nil + } + return o.QuerySuggestion +} + +func (o *RelatedDocuments) GetDocuments() []Document { + if o == nil { + return nil + } + return o.Documents +} + +func (o *RelatedDocuments) GetResults() []SearchResult { + if o == nil { + return nil + } + return o.Results +} diff --git a/tests/mockserver/internal/sdk/models/components/relatedobject.go b/tests/mockserver/internal/sdk/models/components/relatedobject.go new file mode 100644 index 00000000..0a02c754 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/relatedobject.go @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// RelatedObjectMetadata - Some metadata of the object which can be displayed, while not having the actual object. +type RelatedObjectMetadata struct { + // Placeholder name of the object, not the relationship. + Name *string `json:"name,omitempty"` +} + +func (o *RelatedObjectMetadata) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +type RelatedObject struct { + // The ID of the related object + ID string `json:"id"` + // Some metadata of the object which can be displayed, while not having the actual object. + Metadata *RelatedObjectMetadata `json:"metadata,omitempty"` +} + +func (o *RelatedObject) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *RelatedObject) GetMetadata() *RelatedObjectMetadata { + if o == nil { + return nil + } + return o.Metadata +} diff --git a/tests/mockserver/internal/sdk/models/components/relatedobjectedge.go b/tests/mockserver/internal/sdk/models/components/relatedobjectedge.go new file mode 100644 index 00000000..a261a4a0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/relatedobjectedge.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type RelatedObjectEdge struct { + Objects []RelatedObject `json:"objects,omitempty"` +} + +func (o *RelatedObjectEdge) GetObjects() []RelatedObject { + if o == nil { + return nil + } + return o.Objects +} diff --git a/tests/mockserver/internal/sdk/models/components/relatedquestion.go b/tests/mockserver/internal/sdk/models/components/relatedquestion.go new file mode 100644 index 00000000..79f2219e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/relatedquestion.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type RelatedQuestion struct { + // The text of the related question + Question *string `json:"question,omitempty"` + // The answer for the related question + Answer *string `json:"answer,omitempty"` + // Subsections of the answer string to which some special formatting should be applied (eg. bold) + Ranges []TextRange `json:"ranges,omitempty"` +} + +func (o *RelatedQuestion) GetQuestion() *string { + if o == nil { + return nil + } + return o.Question +} + +func (o *RelatedQuestion) GetAnswer() *string { + if o == nil { + return nil + } + return o.Answer +} + +func (o *RelatedQuestion) GetRanges() []TextRange { + if o == nil { + return nil + } + return o.Ranges +} diff --git a/tests/mockserver/internal/sdk/models/components/reminder.go b/tests/mockserver/internal/sdk/models/components/reminder.go new file mode 100644 index 00000000..74162aa4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/reminder.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Reminder struct { + Assignee Person `json:"assignee"` + Requestor *Person `json:"requestor,omitempty"` + // Unix timestamp for when the reminder should trigger (in seconds since epoch UTC). + RemindAt int64 `json:"remindAt"` + // Unix timestamp for when the reminder was first created (in seconds since epoch UTC). + CreatedAt *int64 `json:"createdAt,omitempty"` + // 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"). + Reason *string `json:"reason,omitempty"` +} + +func (o *Reminder) GetAssignee() Person { + if o == nil { + return Person{} + } + return o.Assignee +} + +func (o *Reminder) GetRequestor() *Person { + if o == nil { + return nil + } + return o.Requestor +} + +func (o *Reminder) GetRemindAt() int64 { + if o == nil { + return 0 + } + return o.RemindAt +} + +func (o *Reminder) GetCreatedAt() *int64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *Reminder) GetReason() *string { + if o == nil { + return nil + } + return o.Reason +} diff --git a/tests/mockserver/internal/sdk/models/components/reminderrequest.go b/tests/mockserver/internal/sdk/models/components/reminderrequest.go new file mode 100644 index 00000000..d501a754 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/reminderrequest.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ReminderRequest struct { + // The document which the verification is for new reminders and/or update. + DocumentID string `json:"documentId"` + // The obfuscated id of the person this verification is assigned to. + Assignee *string `json:"assignee,omitempty"` + // Reminder for the next verifications in terms of days. For deletion, this will be omitted. + RemindInDays *int64 `json:"remindInDays,omitempty"` + // 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"). + Reason *string `json:"reason,omitempty"` +} + +func (o *ReminderRequest) GetDocumentID() string { + if o == nil { + return "" + } + return o.DocumentID +} + +func (o *ReminderRequest) GetAssignee() *string { + if o == nil { + return nil + } + return o.Assignee +} + +func (o *ReminderRequest) GetRemindInDays() *int64 { + if o == nil { + return nil + } + return o.RemindInDays +} + +func (o *ReminderRequest) GetReason() *string { + if o == nil { + return nil + } + return o.Reason +} diff --git a/tests/mockserver/internal/sdk/models/components/reportstatusresponse.go b/tests/mockserver/internal/sdk/models/components/reportstatusresponse.go new file mode 100644 index 00000000..e2603ee4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/reportstatusresponse.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type ReportStatusResponseStatus string + +const ( + ReportStatusResponseStatusPending ReportStatusResponseStatus = "PENDING" + ReportStatusResponseStatusSuccess ReportStatusResponseStatus = "SUCCESS" + ReportStatusResponseStatusFailure ReportStatusResponseStatus = "FAILURE" + ReportStatusResponseStatusCancelled ReportStatusResponseStatus = "CANCELLED" + ReportStatusResponseStatusCancelling ReportStatusResponseStatus = "CANCELLING" + ReportStatusResponseStatusActive ReportStatusResponseStatus = "ACTIVE" +) + +func (e ReportStatusResponseStatus) ToPointer() *ReportStatusResponseStatus { + return &e +} +func (e *ReportStatusResponseStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PENDING": + fallthrough + case "SUCCESS": + fallthrough + case "FAILURE": + fallthrough + case "CANCELLED": + fallthrough + case "CANCELLING": + fallthrough + case "ACTIVE": + *e = ReportStatusResponseStatus(v) + return nil + default: + return fmt.Errorf("invalid value for ReportStatusResponseStatus: %v", v) + } +} + +type ReportStatusResponse struct { + Status *ReportStatusResponseStatus `json:"status,omitempty"` + // The timestamp at which the report's run/scan began. + StartTime *string `json:"startTime,omitempty"` +} + +func (o *ReportStatusResponse) GetStatus() *ReportStatusResponseStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *ReportStatusResponse) GetStartTime() *string { + if o == nil { + return nil + } + return o.StartTime +} diff --git a/tests/mockserver/internal/sdk/models/components/restrictionfilters.go b/tests/mockserver/internal/sdk/models/components/restrictionfilters.go new file mode 100644 index 00000000..2befcce9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/restrictionfilters.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type RestrictionFilters struct { + // 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. + ContainerSpecs []DocumentSpecUnion `json:"containerSpecs,omitempty"` +} + +func (o *RestrictionFilters) GetContainerSpecs() []DocumentSpecUnion { + if o == nil { + return nil + } + return o.ContainerSpecs +} diff --git a/tests/mockserver/internal/sdk/models/components/resultsdescription.go b/tests/mockserver/internal/sdk/models/components/resultsdescription.go new file mode 100644 index 00000000..4b626663 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/resultsdescription.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ResultsDescription struct { + // 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. + Text *string `json:"text,omitempty"` + // Defines how to render an icon + IconConfig *IconConfig `json:"iconConfig,omitempty"` +} + +func (o *ResultsDescription) GetText() *string { + if o == nil { + return nil + } + return o.Text +} + +func (o *ResultsDescription) GetIconConfig() *IconConfig { + if o == nil { + return nil + } + return o.IconConfig +} diff --git a/tests/mockserver/internal/sdk/models/components/resultsresponse.go b/tests/mockserver/internal/sdk/models/components/resultsresponse.go new file mode 100644 index 00000000..903402c8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/resultsresponse.go @@ -0,0 +1,73 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ResultsResponse struct { + // A token that should be passed for additional requests related to this request (such as more results requests). + TrackingToken *string `json:"trackingToken,omitempty"` + SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` + Results []SearchResult `json:"results,omitempty"` + StructuredResults []StructuredResult `json:"structuredResults,omitempty"` + GeneratedQnaResult *GeneratedQna `json:"generatedQnaResult,omitempty"` + GleanDataError *GleanDataError `json:"errorInfo,omitempty"` + // A platform-generated request ID to correlate backend logs. + RequestID *string `json:"requestID,omitempty"` + // Time in milliseconds the backend took to respond to the request. + BackendTimeMillis *int64 `json:"backendTimeMillis,omitempty"` +} + +func (o *ResultsResponse) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *ResultsResponse) GetSessionInfo() *SessionInfo { + if o == nil { + return nil + } + return o.SessionInfo +} + +func (o *ResultsResponse) GetResults() []SearchResult { + if o == nil { + return nil + } + return o.Results +} + +func (o *ResultsResponse) GetStructuredResults() []StructuredResult { + if o == nil { + return nil + } + return o.StructuredResults +} + +func (o *ResultsResponse) GetGeneratedQnaResult() *GeneratedQna { + if o == nil { + return nil + } + return o.GeneratedQnaResult +} + +func (o *ResultsResponse) GetGleanDataError() *GleanDataError { + if o == nil { + return nil + } + return o.GleanDataError +} + +func (o *ResultsResponse) GetRequestID() *string { + if o == nil { + return nil + } + return o.RequestID +} + +func (o *ResultsResponse) GetBackendTimeMillis() *int64 { + if o == nil { + return nil + } + return o.BackendTimeMillis +} diff --git a/tests/mockserver/internal/sdk/models/components/resulttab.go b/tests/mockserver/internal/sdk/models/components/resulttab.go new file mode 100644 index 00000000..4f2d94ff --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/resulttab.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ResultTab struct { + // The unique ID of the tab. Can be passed in a search request to get results for that tab. + ID *string `json:"id,omitempty"` + // The number of results in this tab for the current query. + Count *int64 `json:"count,omitempty"` + // The datasource associated with the tab, if any. + Datasource *string `json:"datasource,omitempty"` + // The datasource instance associated with the tab, if any. + DatasourceInstance *string `json:"datasourceInstance,omitempty"` +} + +func (o *ResultTab) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *ResultTab) GetCount() *int64 { + if o == nil { + return nil + } + return o.Count +} + +func (o *ResultTab) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *ResultTab) GetDatasourceInstance() *string { + if o == nil { + return nil + } + return o.DatasourceInstance +} diff --git a/tests/mockserver/internal/sdk/models/components/rotatetokenresponse.go b/tests/mockserver/internal/sdk/models/components/rotatetokenresponse.go new file mode 100644 index 00000000..7c751f25 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/rotatetokenresponse.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// RotateTokenResponse - Describes the response body of the /rotatetoken API call +type RotateTokenResponse struct { + // New raw secret + RawSecret *string `json:"rawSecret,omitempty"` + // 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. + CreatedAt *int64 `json:"createdAt,omitempty"` + // 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 + RotationPeriodMinutes *int64 `json:"rotationPeriodMinutes,omitempty"` +} + +func (o *RotateTokenResponse) GetRawSecret() *string { + if o == nil { + return nil + } + return o.RawSecret +} + +func (o *RotateTokenResponse) GetCreatedAt() *int64 { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *RotateTokenResponse) GetRotationPeriodMinutes() *int64 { + if o == nil { + return nil + } + return o.RotationPeriodMinutes +} diff --git a/tests/mockserver/internal/sdk/models/components/scopetype.go b/tests/mockserver/internal/sdk/models/components/scopetype.go new file mode 100644 index 00000000..b0f9c8a4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/scopetype.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ScopeType - Describes the scope for a ReadPermission, WritePermission, or GrantPermission object +type ScopeType string + +const ( + ScopeTypeGlobal ScopeType = "GLOBAL" + ScopeTypeOwn ScopeType = "OWN" +) + +func (e ScopeType) ToPointer() *ScopeType { + return &e +} +func (e *ScopeType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "GLOBAL": + fallthrough + case "OWN": + *e = ScopeType(v) + return nil + default: + return fmt.Errorf("invalid value for ScopeType: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/searchagentsrequest.go b/tests/mockserver/internal/sdk/models/components/searchagentsrequest.go new file mode 100644 index 00000000..121e0c7b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchagentsrequest.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type SearchAgentsRequest struct { + // Filters on the name of the agent. The keyword search is case-insensitive. If search string is ommited or empty, acts as no filter. + Name *string `json:"name,omitempty"` +} + +func (o *SearchAgentsRequest) GetName() *string { + if o == nil { + return nil + } + return o.Name +} diff --git a/tests/mockserver/internal/sdk/models/components/searchagentsresponse.go b/tests/mockserver/internal/sdk/models/components/searchagentsresponse.go new file mode 100644 index 00000000..7c26e614 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchagentsresponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type SearchAgentsResponse struct { + Agents []Agent `json:"agents,omitempty"` +} + +func (o *SearchAgentsResponse) GetAgents() []Agent { + if o == nil { + return nil + } + return o.Agents +} diff --git a/tests/mockserver/internal/sdk/models/components/searchproviderinfo.go b/tests/mockserver/internal/sdk/models/components/searchproviderinfo.go new file mode 100644 index 00000000..f2aca559 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchproviderinfo.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type SearchProviderInfo struct { + // Name of the search provider. + Name *string `json:"name,omitempty"` + // URL to the provider's logo. + LogoURL *string `json:"logoUrl,omitempty"` + // URL template that can be used to perform the suggested search by replacing the {query} placeholder with the query suggestion. + SearchLinkURLTemplate *string `json:"searchLinkUrlTemplate,omitempty"` +} + +func (o *SearchProviderInfo) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *SearchProviderInfo) GetLogoURL() *string { + if o == nil { + return nil + } + return o.LogoURL +} + +func (o *SearchProviderInfo) GetSearchLinkURLTemplate() *string { + if o == nil { + return nil + } + return o.SearchLinkURLTemplate +} diff --git a/tests/mockserver/internal/sdk/models/components/searchrequest.go b/tests/mockserver/internal/sdk/models/components/searchrequest.go new file mode 100644 index 00000000..322f0bf8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchrequest.go @@ -0,0 +1,144 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type SearchRequest struct { + // The ISO 8601 timestamp associated with the client request. + Timestamp *time.Time `json:"timestamp,omitempty"` + // A previously received trackingToken for a search associated with the same query. Useful for more requests and requests for other tabs. + TrackingToken *string `json:"trackingToken,omitempty"` + SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` + SourceDocument *Document `json:"sourceDocument,omitempty"` + // 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. + PageSize *int64 `json:"pageSize,omitempty"` + // Hint to the server about how many characters long a snippet may be. Server may return less or more. + MaxSnippetSize *int64 `json:"maxSnippetSize,omitempty"` + // The search terms. + Query string `json:"query"` + // Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. + Cursor *string `json:"cursor,omitempty"` + // 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. + ResultTabIds []string `json:"resultTabIds,omitempty"` + InputDetails *SearchRequestInputDetails `json:"inputDetails,omitempty"` + RequestOptions *SearchRequestOptions `json:"requestOptions,omitempty"` + // Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. + TimeoutMillis *int64 `json:"timeoutMillis,omitempty"` + // 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. + People []Person `json:"people,omitempty"` + // Whether or not to disable spellcheck. + DisableSpellcheck *bool `json:"disableSpellcheck,omitempty"` +} + +func (s SearchRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SearchRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SearchRequest) GetTimestamp() *time.Time { + if o == nil { + return nil + } + return o.Timestamp +} + +func (o *SearchRequest) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *SearchRequest) GetSessionInfo() *SessionInfo { + if o == nil { + return nil + } + return o.SessionInfo +} + +func (o *SearchRequest) GetSourceDocument() *Document { + if o == nil { + return nil + } + return o.SourceDocument +} + +func (o *SearchRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *SearchRequest) GetMaxSnippetSize() *int64 { + if o == nil { + return nil + } + return o.MaxSnippetSize +} + +func (o *SearchRequest) GetQuery() string { + if o == nil { + return "" + } + return o.Query +} + +func (o *SearchRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *SearchRequest) GetResultTabIds() []string { + if o == nil { + return nil + } + return o.ResultTabIds +} + +func (o *SearchRequest) GetInputDetails() *SearchRequestInputDetails { + if o == nil { + return nil + } + return o.InputDetails +} + +func (o *SearchRequest) GetRequestOptions() *SearchRequestOptions { + if o == nil { + return nil + } + return o.RequestOptions +} + +func (o *SearchRequest) GetTimeoutMillis() *int64 { + if o == nil { + return nil + } + return o.TimeoutMillis +} + +func (o *SearchRequest) GetPeople() []Person { + if o == nil { + return nil + } + return o.People +} + +func (o *SearchRequest) GetDisableSpellcheck() *bool { + if o == nil { + return nil + } + return o.DisableSpellcheck +} diff --git a/tests/mockserver/internal/sdk/models/components/searchrequestinputdetails.go b/tests/mockserver/internal/sdk/models/components/searchrequestinputdetails.go new file mode 100644 index 00000000..a5e098fd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchrequestinputdetails.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type SearchRequestInputDetails struct { + // 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. + HasCopyPaste *bool `json:"hasCopyPaste,omitempty"` +} + +func (o *SearchRequestInputDetails) GetHasCopyPaste() *bool { + if o == nil { + return nil + } + return o.HasCopyPaste +} diff --git a/tests/mockserver/internal/sdk/models/components/searchrequestoptions.go b/tests/mockserver/internal/sdk/models/components/searchrequestoptions.go new file mode 100644 index 00000000..748f820e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchrequestoptions.go @@ -0,0 +1,197 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ResponseHint - Hints for the response content. +type ResponseHint string + +const ( + ResponseHintAllResultCounts ResponseHint = "ALL_RESULT_COUNTS" + ResponseHintFacetResults ResponseHint = "FACET_RESULTS" + ResponseHintQueryMetadata ResponseHint = "QUERY_METADATA" + ResponseHintResults ResponseHint = "RESULTS" + ResponseHintSpellcheckMetadata ResponseHint = "SPELLCHECK_METADATA" +) + +func (e ResponseHint) ToPointer() *ResponseHint { + return &e +} +func (e *ResponseHint) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ALL_RESULT_COUNTS": + fallthrough + case "FACET_RESULTS": + fallthrough + case "QUERY_METADATA": + fallthrough + case "RESULTS": + fallthrough + case "SPELLCHECK_METADATA": + *e = ResponseHint(v) + return nil + default: + return fmt.Errorf("invalid value for ResponseHint: %v", v) + } +} + +type SearchRequestOptions struct { + // Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. + DatasourceFilter *string `json:"datasourceFilter,omitempty"` + // Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. + DatasourcesFilter []string `json:"datasourcesFilter,omitempty"` + // 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. + QueryOverridesFacetFilters *bool `json:"queryOverridesFacetFilters,omitempty"` + // 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. + FacetFilters []FacetFilter `json:"facetFilters,omitempty"` + // 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. + FacetFilterSets []FacetFilterSet `json:"facetFilterSets,omitempty"` + FacetBucketFilter *FacetBucketFilter `json:"facetBucketFilter,omitempty"` + // The maximum number of FacetBuckets to return in each FacetResult. + FacetBucketSize int64 `json:"facetBucketSize"` + // 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. + DefaultFacets []string `json:"defaultFacets,omitempty"` + // Auth tokens which may be used for non-indexed, federated results (e.g. Gmail). + AuthTokens []AuthToken `json:"authTokens,omitempty"` + // 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 + FetchAllDatasourceCounts *bool `json:"fetchAllDatasourceCounts,omitempty"` + // Array of hints containing which fields should be populated in the response. + ResponseHints []ResponseHint `json:"responseHints,omitempty"` + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `json:"timezoneOffset,omitempty"` + // Whether or not to disable spellcheck. + DisableSpellcheck *bool `json:"disableSpellcheck,omitempty"` + // Disables automatic adjustment of the input query for spelling corrections or other reasons. + DisableQueryAutocorrect *bool `json:"disableQueryAutocorrect,omitempty"` + // [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. + ReturnLlmContentOverSnippets *bool `json:"returnLlmContentOverSnippets,omitempty"` + Inclusions *RestrictionFilters `json:"inclusions,omitempty"` + Exclusions *RestrictionFilters `json:"exclusions,omitempty"` +} + +func (o *SearchRequestOptions) GetDatasourceFilter() *string { + if o == nil { + return nil + } + return o.DatasourceFilter +} + +func (o *SearchRequestOptions) GetDatasourcesFilter() []string { + if o == nil { + return nil + } + return o.DatasourcesFilter +} + +func (o *SearchRequestOptions) GetQueryOverridesFacetFilters() *bool { + if o == nil { + return nil + } + return o.QueryOverridesFacetFilters +} + +func (o *SearchRequestOptions) GetFacetFilters() []FacetFilter { + if o == nil { + return nil + } + return o.FacetFilters +} + +func (o *SearchRequestOptions) GetFacetFilterSets() []FacetFilterSet { + if o == nil { + return nil + } + return o.FacetFilterSets +} + +func (o *SearchRequestOptions) GetFacetBucketFilter() *FacetBucketFilter { + if o == nil { + return nil + } + return o.FacetBucketFilter +} + +func (o *SearchRequestOptions) GetFacetBucketSize() int64 { + if o == nil { + return 0 + } + return o.FacetBucketSize +} + +func (o *SearchRequestOptions) GetDefaultFacets() []string { + if o == nil { + return nil + } + return o.DefaultFacets +} + +func (o *SearchRequestOptions) GetAuthTokens() []AuthToken { + if o == nil { + return nil + } + return o.AuthTokens +} + +func (o *SearchRequestOptions) GetFetchAllDatasourceCounts() *bool { + if o == nil { + return nil + } + return o.FetchAllDatasourceCounts +} + +func (o *SearchRequestOptions) GetResponseHints() []ResponseHint { + if o == nil { + return nil + } + return o.ResponseHints +} + +func (o *SearchRequestOptions) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *SearchRequestOptions) GetDisableSpellcheck() *bool { + if o == nil { + return nil + } + return o.DisableSpellcheck +} + +func (o *SearchRequestOptions) GetDisableQueryAutocorrect() *bool { + if o == nil { + return nil + } + return o.DisableQueryAutocorrect +} + +func (o *SearchRequestOptions) GetReturnLlmContentOverSnippets() *bool { + if o == nil { + return nil + } + return o.ReturnLlmContentOverSnippets +} + +func (o *SearchRequestOptions) GetInclusions() *RestrictionFilters { + if o == nil { + return nil + } + return o.Inclusions +} + +func (o *SearchRequestOptions) GetExclusions() *RestrictionFilters { + if o == nil { + return nil + } + return o.Exclusions +} diff --git a/tests/mockserver/internal/sdk/models/components/searchresponse.go b/tests/mockserver/internal/sdk/models/components/searchresponse.go new file mode 100644 index 00000000..7da8d59a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchresponse.go @@ -0,0 +1,151 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type SearchResponse struct { + // A token that should be passed for additional requests related to this request (such as more results requests). + TrackingToken *string `json:"trackingToken,omitempty"` + SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` + Results []SearchResult `json:"results,omitempty"` + StructuredResults []StructuredResult `json:"structuredResults,omitempty"` + GeneratedQnaResult *GeneratedQna `json:"generatedQnaResult,omitempty"` + GleanDataError *GleanDataError `json:"errorInfo,omitempty"` + // A platform-generated request ID to correlate backend logs. + RequestID *string `json:"requestID,omitempty"` + // Time in milliseconds the backend took to respond to the request. + BackendTimeMillis *int64 `json:"backendTimeMillis,omitempty"` + // List of experiment ids for the corresponding request. + ExperimentIds []int64 `json:"experimentIds,omitempty"` + Metadata *SearchResponseMetadata `json:"metadata,omitempty"` + FacetResults []FacetResult `json:"facetResults,omitempty"` + // All result tabs available for the current query. Populated if QUERY_METADATA is specified in the request. + ResultTabs []ResultTab `json:"resultTabs,omitempty"` + // The unique IDs of the result tabs to which this response belongs. + ResultTabIds []string `json:"resultTabIds,omitempty"` + ResultsDescription *ResultsDescription `json:"resultsDescription,omitempty"` + // The actual applied facet filters based on the operators and facetFilters in the query. Useful for mapping typed operators to visual facets. + RewrittenFacetFilters []FacetFilter `json:"rewrittenFacetFilters,omitempty"` + // Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query. + Cursor *string `json:"cursor,omitempty"` + // Whether more results are available. Use cursor to retrieve them. + HasMoreResults *bool `json:"hasMoreResults,omitempty"` +} + +func (o *SearchResponse) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *SearchResponse) GetSessionInfo() *SessionInfo { + if o == nil { + return nil + } + return o.SessionInfo +} + +func (o *SearchResponse) GetResults() []SearchResult { + if o == nil { + return nil + } + return o.Results +} + +func (o *SearchResponse) GetStructuredResults() []StructuredResult { + if o == nil { + return nil + } + return o.StructuredResults +} + +func (o *SearchResponse) GetGeneratedQnaResult() *GeneratedQna { + if o == nil { + return nil + } + return o.GeneratedQnaResult +} + +func (o *SearchResponse) GetGleanDataError() *GleanDataError { + if o == nil { + return nil + } + return o.GleanDataError +} + +func (o *SearchResponse) GetRequestID() *string { + if o == nil { + return nil + } + return o.RequestID +} + +func (o *SearchResponse) GetBackendTimeMillis() *int64 { + if o == nil { + return nil + } + return o.BackendTimeMillis +} + +func (o *SearchResponse) GetExperimentIds() []int64 { + if o == nil { + return nil + } + return o.ExperimentIds +} + +func (o *SearchResponse) GetMetadata() *SearchResponseMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *SearchResponse) GetFacetResults() []FacetResult { + if o == nil { + return nil + } + return o.FacetResults +} + +func (o *SearchResponse) GetResultTabs() []ResultTab { + if o == nil { + return nil + } + return o.ResultTabs +} + +func (o *SearchResponse) GetResultTabIds() []string { + if o == nil { + return nil + } + return o.ResultTabIds +} + +func (o *SearchResponse) GetResultsDescription() *ResultsDescription { + if o == nil { + return nil + } + return o.ResultsDescription +} + +func (o *SearchResponse) GetRewrittenFacetFilters() []FacetFilter { + if o == nil { + return nil + } + return o.RewrittenFacetFilters +} + +func (o *SearchResponse) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *SearchResponse) GetHasMoreResults() *bool { + if o == nil { + return nil + } + return o.HasMoreResults +} diff --git a/tests/mockserver/internal/sdk/models/components/searchresponsemetadata.go b/tests/mockserver/internal/sdk/models/components/searchresponsemetadata.go new file mode 100644 index 00000000..0d64b4b3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchresponsemetadata.go @@ -0,0 +1,111 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type SearchResponseMetadata struct { + // A cleaned up or updated version of the query to be displayed in the query box. Useful for mapping visual facets to search operators. + RewrittenQuery *string `json:"rewrittenQuery,omitempty"` + // The actual query used to perform search and return results. + SearchedQuery *string `json:"searchedQuery,omitempty"` + // The bolded ranges within the searched query. + SearchedQueryRanges []TextRange `json:"searchedQueryRanges,omitempty"` + // The query text sent by the client in the request. + OriginalQuery *string `json:"originalQuery,omitempty"` + QuerySuggestion *QuerySuggestion `json:"querySuggestion,omitempty"` + AdditionalQuerySuggestions *QuerySuggestionList `json:"additionalQuerySuggestions,omitempty"` + // A list of terms that were negated when processing the query. + NegatedTerms []string `json:"negatedTerms,omitempty"` + // A different query was performed than the one requested. + ModifiedQueryWasUsed *bool `json:"modifiedQueryWasUsed,omitempty"` + // 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. + OriginalQueryHadNoResults *bool `json:"originalQueryHadNoResults,omitempty"` + SearchWarning *SearchWarning `json:"searchWarning,omitempty"` + // Whether the query triggered expert detection results in the People tab. + TriggeredExpertDetection *bool `json:"triggeredExpertDetection,omitempty"` + // Whether the query was modified to remove quotes + IsNoQuotesSuggestion *bool `json:"isNoQuotesSuggestion,omitempty"` +} + +func (o *SearchResponseMetadata) GetRewrittenQuery() *string { + if o == nil { + return nil + } + return o.RewrittenQuery +} + +func (o *SearchResponseMetadata) GetSearchedQuery() *string { + if o == nil { + return nil + } + return o.SearchedQuery +} + +func (o *SearchResponseMetadata) GetSearchedQueryRanges() []TextRange { + if o == nil { + return nil + } + return o.SearchedQueryRanges +} + +func (o *SearchResponseMetadata) GetOriginalQuery() *string { + if o == nil { + return nil + } + return o.OriginalQuery +} + +func (o *SearchResponseMetadata) GetQuerySuggestion() *QuerySuggestion { + if o == nil { + return nil + } + return o.QuerySuggestion +} + +func (o *SearchResponseMetadata) GetAdditionalQuerySuggestions() *QuerySuggestionList { + if o == nil { + return nil + } + return o.AdditionalQuerySuggestions +} + +func (o *SearchResponseMetadata) GetNegatedTerms() []string { + if o == nil { + return nil + } + return o.NegatedTerms +} + +func (o *SearchResponseMetadata) GetModifiedQueryWasUsed() *bool { + if o == nil { + return nil + } + return o.ModifiedQueryWasUsed +} + +func (o *SearchResponseMetadata) GetOriginalQueryHadNoResults() *bool { + if o == nil { + return nil + } + return o.OriginalQueryHadNoResults +} + +func (o *SearchResponseMetadata) GetSearchWarning() *SearchWarning { + if o == nil { + return nil + } + return o.SearchWarning +} + +func (o *SearchResponseMetadata) GetTriggeredExpertDetection() *bool { + if o == nil { + return nil + } + return o.TriggeredExpertDetection +} + +func (o *SearchResponseMetadata) GetIsNoQuotesSuggestion() *bool { + if o == nil { + return nil + } + return o.IsNoQuotesSuggestion +} diff --git a/tests/mockserver/internal/sdk/models/components/searchresult.go b/tests/mockserver/internal/sdk/models/components/searchresult.go new file mode 100644 index 00000000..074430df --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchresult.go @@ -0,0 +1,191 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type SearchResult struct { + // An array of entities in the work graph retrieved via a data request. + StructuredResults []StructuredResult `json:"structuredResults,omitempty"` + // An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. + TrackingToken *string `json:"trackingToken,omitempty"` + Document *Document `json:"document,omitempty"` + Title *string `json:"title,omitempty"` + URL string `json:"url"` + // A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://...). + NativeAppURL *string `json:"nativeAppUrl,omitempty"` + // Text content from the result document which contains search query terms, if available. + Snippets []SearchResultSnippet `json:"snippets,omitempty"` + // 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). + FullText *string `json:"fullText,omitempty"` + // 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). + FullTextList []string `json:"fullTextList,omitempty"` + // 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. + RelatedResults []RelatedDocuments `json:"relatedResults,omitempty"` + // A list of results that should be displayed as associated with this result. + ClusteredResults []SearchResult `json:"clusteredResults,omitempty"` + // A list of results that should be displayed as associated with this result. + AllClusteredResults []ClusterGroup `json:"allClusteredResults,omitempty"` + // The total number of attachments. + AttachmentCount *int64 `json:"attachmentCount,omitempty"` + // A (potentially partial) list of results representing documents attached to the main result document. + Attachments []SearchResult `json:"attachments,omitempty"` + // A list of results that should be displayed as backlinks of this result in reverse chronological order. + BacklinkResults []SearchResult `json:"backlinkResults,omitempty"` + // The reason for inclusion of clusteredResults. + ClusterType *ClusterTypeEnum `json:"clusterType,omitempty"` + MustIncludeSuggestions *QuerySuggestionList `json:"mustIncludeSuggestions,omitempty"` + QuerySuggestion *QuerySuggestion `json:"querySuggestion,omitempty"` + // The level of visual distinction that should be given to a result. + // + Prominence *SearchResultProminenceEnum `json:"prominence,omitempty"` + // Additional context for the relationship between the result and the document it's attached to. + AttachmentContext *string `json:"attachmentContext,omitempty"` + // A list of pins associated with this search result. + Pins []PinDocument `json:"pins,omitempty"` +} + +func (o *SearchResult) GetStructuredResults() []StructuredResult { + if o == nil { + return nil + } + return o.StructuredResults +} + +func (o *SearchResult) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *SearchResult) GetDocument() *Document { + if o == nil { + return nil + } + return o.Document +} + +func (o *SearchResult) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *SearchResult) GetURL() string { + if o == nil { + return "" + } + return o.URL +} + +func (o *SearchResult) GetNativeAppURL() *string { + if o == nil { + return nil + } + return o.NativeAppURL +} + +func (o *SearchResult) GetSnippets() []SearchResultSnippet { + if o == nil { + return nil + } + return o.Snippets +} + +func (o *SearchResult) GetFullText() *string { + if o == nil { + return nil + } + return o.FullText +} + +func (o *SearchResult) GetFullTextList() []string { + if o == nil { + return nil + } + return o.FullTextList +} + +func (o *SearchResult) GetRelatedResults() []RelatedDocuments { + if o == nil { + return nil + } + return o.RelatedResults +} + +func (o *SearchResult) GetClusteredResults() []SearchResult { + if o == nil { + return nil + } + return o.ClusteredResults +} + +func (o *SearchResult) GetAllClusteredResults() []ClusterGroup { + if o == nil { + return nil + } + return o.AllClusteredResults +} + +func (o *SearchResult) GetAttachmentCount() *int64 { + if o == nil { + return nil + } + return o.AttachmentCount +} + +func (o *SearchResult) GetAttachments() []SearchResult { + if o == nil { + return nil + } + return o.Attachments +} + +func (o *SearchResult) GetBacklinkResults() []SearchResult { + if o == nil { + return nil + } + return o.BacklinkResults +} + +func (o *SearchResult) GetClusterType() *ClusterTypeEnum { + if o == nil { + return nil + } + return o.ClusterType +} + +func (o *SearchResult) GetMustIncludeSuggestions() *QuerySuggestionList { + if o == nil { + return nil + } + return o.MustIncludeSuggestions +} + +func (o *SearchResult) GetQuerySuggestion() *QuerySuggestion { + if o == nil { + return nil + } + return o.QuerySuggestion +} + +func (o *SearchResult) GetProminence() *SearchResultProminenceEnum { + if o == nil { + return nil + } + return o.Prominence +} + +func (o *SearchResult) GetAttachmentContext() *string { + if o == nil { + return nil + } + return o.AttachmentContext +} + +func (o *SearchResult) GetPins() []PinDocument { + if o == nil { + return nil + } + return o.Pins +} diff --git a/tests/mockserver/internal/sdk/models/components/searchresultprominenceenum.go b/tests/mockserver/internal/sdk/models/components/searchresultprominenceenum.go new file mode 100644 index 00000000..789b4f27 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchresultprominenceenum.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// SearchResultProminenceEnum - The level of visual distinction that should be given to a result. +type SearchResultProminenceEnum string + +const ( + SearchResultProminenceEnumHero SearchResultProminenceEnum = "HERO" + SearchResultProminenceEnumPromoted SearchResultProminenceEnum = "PROMOTED" + SearchResultProminenceEnumStandard SearchResultProminenceEnum = "STANDARD" +) + +func (e SearchResultProminenceEnum) ToPointer() *SearchResultProminenceEnum { + return &e +} +func (e *SearchResultProminenceEnum) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "HERO": + fallthrough + case "PROMOTED": + fallthrough + case "STANDARD": + *e = SearchResultProminenceEnum(v) + return nil + default: + return fmt.Errorf("invalid value for SearchResultProminenceEnum: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/searchresultsnippet.go b/tests/mockserver/internal/sdk/models/components/searchresultsnippet.go new file mode 100644 index 00000000..02eeda63 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchresultsnippet.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type SearchResultSnippet struct { + // A matching snippet from the document. Query term matches are marked by the unicode characters uE006 and uE007. + Snippet string `json:"snippet"` + // The mime type of the snippets, currently either text/plain or text/html. + MimeType *string `json:"mimeType,omitempty"` + // A matching snippet from the document with no highlights. + Text *string `json:"text,omitempty"` + // Used for sorting based off the snippet's location within all_snippetable_text + SnippetTextOrdering *int64 `json:"snippetTextOrdering,omitempty"` + // The bolded ranges within text. + Ranges []TextRange `json:"ranges,omitempty"` + // A URL, generated based on availability, that links to the position of the snippet text or to the nearest header above the snippet text. + URL *string `json:"url,omitempty"` +} + +func (o *SearchResultSnippet) GetSnippet() string { + if o == nil { + return "" + } + return o.Snippet +} + +func (o *SearchResultSnippet) GetMimeType() *string { + if o == nil { + return nil + } + return o.MimeType +} + +func (o *SearchResultSnippet) GetText() *string { + if o == nil { + return nil + } + return o.Text +} + +func (o *SearchResultSnippet) GetSnippetTextOrdering() *int64 { + if o == nil { + return nil + } + return o.SnippetTextOrdering +} + +func (o *SearchResultSnippet) GetRanges() []TextRange { + if o == nil { + return nil + } + return o.Ranges +} + +func (o *SearchResultSnippet) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} diff --git a/tests/mockserver/internal/sdk/models/components/searchwarning.go b/tests/mockserver/internal/sdk/models/components/searchwarning.go new file mode 100644 index 00000000..48d20d77 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/searchwarning.go @@ -0,0 +1,86 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// WarningType - The type of the warning. +type WarningType string + +const ( + WarningTypeLongQuery WarningType = "LONG_QUERY" + WarningTypeQuotedPunctuation WarningType = "QUOTED_PUNCTUATION" + WarningTypePunctuationOnly WarningType = "PUNCTUATION_ONLY" + WarningTypeCopypastedQuotes WarningType = "COPYPASTED_QUOTES" + WarningTypeInvalidOperator WarningType = "INVALID_OPERATOR" + WarningTypeMaybeInvalidFacetQuery WarningType = "MAYBE_INVALID_FACET_QUERY" +) + +func (e WarningType) ToPointer() *WarningType { + return &e +} +func (e *WarningType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LONG_QUERY": + fallthrough + case "QUOTED_PUNCTUATION": + fallthrough + case "PUNCTUATION_ONLY": + fallthrough + case "COPYPASTED_QUOTES": + fallthrough + case "INVALID_OPERATOR": + fallthrough + case "MAYBE_INVALID_FACET_QUERY": + *e = WarningType(v) + return nil + default: + return fmt.Errorf("invalid value for WarningType: %v", v) + } +} + +type SearchWarning struct { + // The type of the warning. + WarningType WarningType `json:"warningType"` + // The last term we considered in the user's long query. + LastUsedTerm *string `json:"lastUsedTerm,omitempty"` + // The query after ignoring/removing quotes. + QuotesIgnoredQuery *string `json:"quotesIgnoredQuery,omitempty"` + // 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. + IgnoredTerms []string `json:"ignoredTerms,omitempty"` +} + +func (o *SearchWarning) GetWarningType() WarningType { + if o == nil { + return WarningType("") + } + return o.WarningType +} + +func (o *SearchWarning) GetLastUsedTerm() *string { + if o == nil { + return nil + } + return o.LastUsedTerm +} + +func (o *SearchWarning) GetQuotesIgnoredQuery() *string { + if o == nil { + return nil + } + return o.QuotesIgnoredQuery +} + +func (o *SearchWarning) GetIgnoredTerms() []string { + if o == nil { + return nil + } + return o.IgnoredTerms +} diff --git a/tests/mockserver/internal/sdk/models/components/security.go b/tests/mockserver/internal/sdk/models/components/security.go new file mode 100644 index 00000000..bc7c1954 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/security.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Security struct { + APIToken string `security:"scheme,type=http,subtype=bearer,name=Authorization"` +} + +func (o *Security) GetAPIToken() string { + if o == nil { + return "" + } + return o.APIToken +} diff --git a/tests/mockserver/internal/sdk/models/components/seenfeedbackinfo.go b/tests/mockserver/internal/sdk/models/components/seenfeedbackinfo.go new file mode 100644 index 00000000..c1aa85e9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/seenfeedbackinfo.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type SeenFeedbackInfo struct { + // 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. + IsExplicit *bool `json:"isExplicit,omitempty"` +} + +func (o *SeenFeedbackInfo) GetIsExplicit() *bool { + if o == nil { + return nil + } + return o.IsExplicit +} diff --git a/tests/mockserver/internal/sdk/models/components/sensitivecontentoptions.go b/tests/mockserver/internal/sdk/models/components/sensitivecontentoptions.go new file mode 100644 index 00000000..d08baa0c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/sensitivecontentoptions.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// SensitiveContentOptions - Options for defining sensitive content within scanned documents. +type SensitiveContentOptions struct { + // Predefined categories of terms to consider as sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available types. + SensitiveInfoTypes []SensitiveInfoType `json:"sensitiveInfoTypes,omitempty"` + // list of words and phrases to consider as sensitive content + SensitiveTerms []SensitiveExpression `json:"sensitiveTerms,omitempty"` + // list of regular expressions to consider as sensitive content + SensitiveRegexes []SensitiveExpression `json:"sensitiveRegexes,omitempty"` +} + +func (o *SensitiveContentOptions) GetSensitiveInfoTypes() []SensitiveInfoType { + if o == nil { + return nil + } + return o.SensitiveInfoTypes +} + +func (o *SensitiveContentOptions) GetSensitiveTerms() []SensitiveExpression { + if o == nil { + return nil + } + return o.SensitiveTerms +} + +func (o *SensitiveContentOptions) GetSensitiveRegexes() []SensitiveExpression { + if o == nil { + return nil + } + return o.SensitiveRegexes +} diff --git a/tests/mockserver/internal/sdk/models/components/sensitiveexpression.go b/tests/mockserver/internal/sdk/models/components/sensitiveexpression.go new file mode 100644 index 00000000..a38113a3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/sensitiveexpression.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type SensitiveExpression struct { + // Sensitive word, phrase, or regular expression. + Expression *string `json:"expression,omitempty"` + // Zero to three proximate regular expressions necessary to consider an expression as sensitive content. + Hotwords []Hotword `json:"hotwords,omitempty"` +} + +func (o *SensitiveExpression) GetExpression() *string { + if o == nil { + return nil + } + return o.Expression +} + +func (o *SensitiveExpression) GetHotwords() []Hotword { + if o == nil { + return nil + } + return o.Hotwords +} diff --git a/tests/mockserver/internal/sdk/models/components/sensitiveinfotype.go b/tests/mockserver/internal/sdk/models/components/sensitiveinfotype.go new file mode 100644 index 00000000..683a1e84 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/sensitiveinfotype.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// LikelihoodThreshold +// +// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. +type LikelihoodThreshold string + +const ( + LikelihoodThresholdLikely LikelihoodThreshold = "LIKELY" + LikelihoodThresholdVeryLikely LikelihoodThreshold = "VERY_LIKELY" +) + +func (e LikelihoodThreshold) ToPointer() *LikelihoodThreshold { + return &e +} +func (e *LikelihoodThreshold) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "LIKELY": + fallthrough + case "VERY_LIKELY": + *e = LikelihoodThreshold(v) + return nil + default: + return fmt.Errorf("invalid value for LikelihoodThreshold: %v", v) + } +} + +type SensitiveInfoType struct { + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + LikelihoodThreshold *LikelihoodThreshold `json:"likelihoodThreshold,omitempty"` + // Text representation of an info-type to scan for. + InfoType *string `json:"infoType,omitempty"` +} + +func (o *SensitiveInfoType) GetLikelihoodThreshold() *LikelihoodThreshold { + if o == nil { + return nil + } + return o.LikelihoodThreshold +} + +func (o *SensitiveInfoType) GetInfoType() *string { + if o == nil { + return nil + } + return o.InfoType +} diff --git a/tests/mockserver/internal/sdk/models/components/sessioninfo.go b/tests/mockserver/internal/sdk/models/components/sessioninfo.go new file mode 100644 index 00000000..769e9308 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/sessioninfo.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type SessionInfo struct { + // 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. + SessionTrackingToken *string `json:"sessionTrackingToken,omitempty"` + // 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. + TabID *string `json:"tabId,omitempty"` + // The last time the server saw this token. + LastSeen *time.Time `json:"lastSeen,omitempty"` + // The last query seen by the server. + LastQuery *string `json:"lastQuery,omitempty"` +} + +func (s SessionInfo) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SessionInfo) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SessionInfo) GetSessionTrackingToken() *string { + if o == nil { + return nil + } + return o.SessionTrackingToken +} + +func (o *SessionInfo) GetTabID() *string { + if o == nil { + return nil + } + return o.TabID +} + +func (o *SessionInfo) GetLastSeen() *time.Time { + if o == nil { + return nil + } + return o.LastSeen +} + +func (o *SessionInfo) GetLastQuery() *string { + if o == nil { + return nil + } + return o.LastQuery +} diff --git a/tests/mockserver/internal/sdk/models/components/share.go b/tests/mockserver/internal/sdk/models/components/share.go new file mode 100644 index 00000000..9473f79d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/share.go @@ -0,0 +1,32 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// Share - 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 +type Share struct { + // The number of days that has passed since the share happened + NumDaysAgo int64 `json:"numDaysAgo"` + Sharer *Person `json:"sharer,omitempty"` + SharingDocument *Document `json:"sharingDocument,omitempty"` +} + +func (o *Share) GetNumDaysAgo() int64 { + if o == nil { + return 0 + } + return o.NumDaysAgo +} + +func (o *Share) GetSharer() *Person { + if o == nil { + return nil + } + return o.Sharer +} + +func (o *Share) GetSharingDocument() *Document { + if o == nil { + return nil + } + return o.SharingDocument +} diff --git a/tests/mockserver/internal/sdk/models/components/sharingoptions.go b/tests/mockserver/internal/sdk/models/components/sharingoptions.go new file mode 100644 index 00000000..a290b453 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/sharingoptions.go @@ -0,0 +1,79 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// SharingOptions - Controls how "shared" a document must be to get picked for scans. +type SharingOptions struct { + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + Enabled *bool `json:"enabled,omitempty"` + // The minimum number of users the document is shared with. + Threshold *int64 `json:"threshold,omitempty"` + // Documents will be filtered based on how many people have access to it. + ThresholdEnabled *bool `json:"thresholdEnabled,omitempty"` + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + AnyoneWithLinkEnabled *bool `json:"anyoneWithLinkEnabled,omitempty"` + // Only users within the organization can access the document. + AnyoneInternalEnabled *bool `json:"anyoneInternalEnabled,omitempty"` + // Anyone on the internet can access the document. + AnonymousAccessEnabled *bool `json:"anonymousAccessEnabled,omitempty"` + // Enable user access check + UserAccessEnabled *bool `json:"userAccessEnabled,omitempty"` + // Any one of the specified users can access the document. + UserIds []string `json:"userIds,omitempty"` +} + +func (o *SharingOptions) GetEnabled() *bool { + if o == nil { + return nil + } + return o.Enabled +} + +func (o *SharingOptions) GetThreshold() *int64 { + if o == nil { + return nil + } + return o.Threshold +} + +func (o *SharingOptions) GetThresholdEnabled() *bool { + if o == nil { + return nil + } + return o.ThresholdEnabled +} + +func (o *SharingOptions) GetAnyoneWithLinkEnabled() *bool { + if o == nil { + return nil + } + return o.AnyoneWithLinkEnabled +} + +func (o *SharingOptions) GetAnyoneInternalEnabled() *bool { + if o == nil { + return nil + } + return o.AnyoneInternalEnabled +} + +func (o *SharingOptions) GetAnonymousAccessEnabled() *bool { + if o == nil { + return nil + } + return o.AnonymousAccessEnabled +} + +func (o *SharingOptions) GetUserAccessEnabled() *bool { + if o == nil { + return nil + } + return o.UserAccessEnabled +} + +func (o *SharingOptions) GetUserIds() []string { + if o == nil { + return nil + } + return o.UserIds +} diff --git a/tests/mockserver/internal/sdk/models/components/shortcut.go b/tests/mockserver/internal/sdk/models/components/shortcut.go new file mode 100644 index 00000000..625c7659 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/shortcut.go @@ -0,0 +1,216 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type Shortcut struct { + // The opaque id of the user generated content. + ID *int64 `json:"id,omitempty"` + // Link text following go/ prefix as entered by the user. + InputAlias string `json:"inputAlias"` + // Destination URL for the shortcut. + DestinationURL *string `json:"destinationUrl,omitempty"` + // Glean Document ID for the URL, if known. + DestinationDocumentID *string `json:"destinationDocumentId,omitempty"` + // A short, plain text blurb to help people understand the intent of the shortcut. + Description *string `json:"description,omitempty"` + // Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only. + Unlisted *bool `json:"unlisted,omitempty"` + // For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. + URLTemplate *string `json:"urlTemplate,omitempty"` + // A list of user roles added for the Shortcut. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of user roles removed for the Shortcut. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + CreatedBy *Person `json:"createdBy,omitempty"` + // The time the shortcut was created in ISO format (ISO 8601). + CreateTime *time.Time `json:"createTime,omitempty"` + UpdatedBy *Person `json:"updatedBy,omitempty"` + // The time the shortcut was updated in ISO format (ISO 8601). + UpdateTime *time.Time `json:"updateTime,omitempty"` + DestinationDocument *Document `json:"destinationDocument,omitempty"` + // The URL from which the user is then redirected to the destination URL. Full replacement for https://go/. + IntermediateURL *string `json:"intermediateUrl,omitempty"` + // 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. + ViewPrefix *string `json:"viewPrefix,omitempty"` + // Indicates whether a shortcut is native or external. + IsExternal *bool `json:"isExternal,omitempty"` + // The URL using which the user can access the edit page of the shortcut. + EditURL *string `json:"editUrl,omitempty"` + // canonical link text following go/ prefix where hyphen/underscore is removed. + Alias *string `json:"alias,omitempty"` + // Title for the Go Link + Title *string `json:"title,omitempty"` + // A list of user roles for the Go Link. + Roles []UserRoleSpecification `json:"roles,omitempty"` +} + +func (s Shortcut) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *Shortcut) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Shortcut) GetID() *int64 { + if o == nil { + return nil + } + return o.ID +} + +func (o *Shortcut) GetInputAlias() string { + if o == nil { + return "" + } + return o.InputAlias +} + +func (o *Shortcut) GetDestinationURL() *string { + if o == nil { + return nil + } + return o.DestinationURL +} + +func (o *Shortcut) GetDestinationDocumentID() *string { + if o == nil { + return nil + } + return o.DestinationDocumentID +} + +func (o *Shortcut) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *Shortcut) GetUnlisted() *bool { + if o == nil { + return nil + } + return o.Unlisted +} + +func (o *Shortcut) GetURLTemplate() *string { + if o == nil { + return nil + } + return o.URLTemplate +} + +func (o *Shortcut) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *Shortcut) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} + +func (o *Shortcut) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *Shortcut) GetCreatedBy() *Person { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *Shortcut) GetCreateTime() *time.Time { + if o == nil { + return nil + } + return o.CreateTime +} + +func (o *Shortcut) GetUpdatedBy() *Person { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *Shortcut) GetUpdateTime() *time.Time { + if o == nil { + return nil + } + return o.UpdateTime +} + +func (o *Shortcut) GetDestinationDocument() *Document { + if o == nil { + return nil + } + return o.DestinationDocument +} + +func (o *Shortcut) GetIntermediateURL() *string { + if o == nil { + return nil + } + return o.IntermediateURL +} + +func (o *Shortcut) GetViewPrefix() *string { + if o == nil { + return nil + } + return o.ViewPrefix +} + +func (o *Shortcut) GetIsExternal() *bool { + if o == nil { + return nil + } + return o.IsExternal +} + +func (o *Shortcut) GetEditURL() *string { + if o == nil { + return nil + } + return o.EditURL +} + +func (o *Shortcut) GetAlias() *string { + if o == nil { + return nil + } + return o.Alias +} + +func (o *Shortcut) GetTitle() *string { + if o == nil { + return nil + } + return o.Title +} + +func (o *Shortcut) GetRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.Roles +} diff --git a/tests/mockserver/internal/sdk/models/components/shortcuterror.go b/tests/mockserver/internal/sdk/models/components/shortcuterror.go new file mode 100644 index 00000000..5ecd3e9e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/shortcuterror.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type ShortcutErrorErrorType string + +const ( + ShortcutErrorErrorTypeNoPermission ShortcutErrorErrorType = "NO_PERMISSION" + ShortcutErrorErrorTypeInvalidID ShortcutErrorErrorType = "INVALID_ID" + ShortcutErrorErrorTypeExistingShortcut ShortcutErrorErrorType = "EXISTING_SHORTCUT" + ShortcutErrorErrorTypeInvalidChars ShortcutErrorErrorType = "INVALID_CHARS" +) + +func (e ShortcutErrorErrorType) ToPointer() *ShortcutErrorErrorType { + return &e +} +func (e *ShortcutErrorErrorType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NO_PERMISSION": + fallthrough + case "INVALID_ID": + fallthrough + case "EXISTING_SHORTCUT": + fallthrough + case "INVALID_CHARS": + *e = ShortcutErrorErrorType(v) + return nil + default: + return fmt.Errorf("invalid value for ShortcutErrorErrorType: %v", v) + } +} + +type ShortcutError struct { + ErrorType *ShortcutErrorErrorType `json:"errorType,omitempty"` +} + +func (o *ShortcutError) GetErrorType() *ShortcutErrorErrorType { + if o == nil { + return nil + } + return o.ErrorType +} diff --git a/tests/mockserver/internal/sdk/models/components/shortcutinsight.go b/tests/mockserver/internal/sdk/models/components/shortcutinsight.go new file mode 100644 index 00000000..e4a60038 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/shortcutinsight.go @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ShortcutInsight struct { + Shortcut Shortcut `json:"shortcut"` + VisitCount *CountInfo `json:"visitCount,omitempty"` + VisitorCount *CountInfo `json:"visitorCount,omitempty"` +} + +func (o *ShortcutInsight) GetShortcut() Shortcut { + if o == nil { + return Shortcut{} + } + return o.Shortcut +} + +func (o *ShortcutInsight) GetVisitCount() *CountInfo { + if o == nil { + return nil + } + return o.VisitCount +} + +func (o *ShortcutInsight) GetVisitorCount() *CountInfo { + if o == nil { + return nil + } + return o.VisitorCount +} diff --git a/tests/mockserver/internal/sdk/models/components/shortcutinsightsresponse.go b/tests/mockserver/internal/sdk/models/components/shortcutinsightsresponse.go new file mode 100644 index 00000000..b2edf8e3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/shortcutinsightsresponse.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ShortcutInsightsResponse struct { + // Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). + LastLogTimestamp *int64 `json:"lastLogTimestamp,omitempty"` + // Insights for shortcuts. + ShortcutInsights []ShortcutInsight `json:"shortcutInsights,omitempty"` + // list of departments applicable for shortcuts tab. + Departments []string `json:"departments,omitempty"` + // Min threshold in number of visitors while populating results, otherwise 0. + MinVisitorThreshold *int64 `json:"minVisitorThreshold,omitempty"` +} + +func (o *ShortcutInsightsResponse) GetLastLogTimestamp() *int64 { + if o == nil { + return nil + } + return o.LastLogTimestamp +} + +func (o *ShortcutInsightsResponse) GetShortcutInsights() []ShortcutInsight { + if o == nil { + return nil + } + return o.ShortcutInsights +} + +func (o *ShortcutInsightsResponse) GetDepartments() []string { + if o == nil { + return nil + } + return o.Departments +} + +func (o *ShortcutInsightsResponse) GetMinVisitorThreshold() *int64 { + if o == nil { + return nil + } + return o.MinVisitorThreshold +} diff --git a/tests/mockserver/internal/sdk/models/components/shortcutmutableproperties.go b/tests/mockserver/internal/sdk/models/components/shortcutmutableproperties.go new file mode 100644 index 00000000..00cb907c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/shortcutmutableproperties.go @@ -0,0 +1,78 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ShortcutMutableProperties struct { + // Link text following go/ prefix as entered by the user. + InputAlias *string `json:"inputAlias,omitempty"` + // Destination URL for the shortcut. + DestinationURL *string `json:"destinationUrl,omitempty"` + // Glean Document ID for the URL, if known. + DestinationDocumentID *string `json:"destinationDocumentId,omitempty"` + // A short, plain text blurb to help people understand the intent of the shortcut. + Description *string `json:"description,omitempty"` + // Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only. + Unlisted *bool `json:"unlisted,omitempty"` + // For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. + URLTemplate *string `json:"urlTemplate,omitempty"` + // A list of user roles added for the Shortcut. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of user roles removed for the Shortcut. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` +} + +func (o *ShortcutMutableProperties) GetInputAlias() *string { + if o == nil { + return nil + } + return o.InputAlias +} + +func (o *ShortcutMutableProperties) GetDestinationURL() *string { + if o == nil { + return nil + } + return o.DestinationURL +} + +func (o *ShortcutMutableProperties) GetDestinationDocumentID() *string { + if o == nil { + return nil + } + return o.DestinationDocumentID +} + +func (o *ShortcutMutableProperties) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *ShortcutMutableProperties) GetUnlisted() *bool { + if o == nil { + return nil + } + return o.Unlisted +} + +func (o *ShortcutMutableProperties) GetURLTemplate() *string { + if o == nil { + return nil + } + return o.URLTemplate +} + +func (o *ShortcutMutableProperties) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *ShortcutMutableProperties) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} diff --git a/tests/mockserver/internal/sdk/models/components/shortcutspaginationmetadata.go b/tests/mockserver/internal/sdk/models/components/shortcutspaginationmetadata.go new file mode 100644 index 00000000..6732831e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/shortcutspaginationmetadata.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ShortcutsPaginationMetadata struct { + // Cursor indicates the start of the next page of results + Cursor *string `json:"cursor,omitempty"` + HasNextPage *bool `json:"hasNextPage,omitempty"` + TotalItemCount *int64 `json:"totalItemCount,omitempty"` +} + +func (o *ShortcutsPaginationMetadata) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +func (o *ShortcutsPaginationMetadata) GetHasNextPage() *bool { + if o == nil { + return nil + } + return o.HasNextPage +} + +func (o *ShortcutsPaginationMetadata) GetTotalItemCount() *int64 { + if o == nil { + return nil + } + return o.TotalItemCount +} diff --git a/tests/mockserver/internal/sdk/models/components/socialnetwork.go b/tests/mockserver/internal/sdk/models/components/socialnetwork.go new file mode 100644 index 00000000..d632e406 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/socialnetwork.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type SocialNetwork struct { + // Possible values are "twitter", "linkedin". + Name string `json:"name"` + // Human-readable profile name. + ProfileName *string `json:"profileName,omitempty"` + // Link to profile. + ProfileURL string `json:"profileUrl"` +} + +func (o *SocialNetwork) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *SocialNetwork) GetProfileName() *string { + if o == nil { + return nil + } + return o.ProfileName +} + +func (o *SocialNetwork) GetProfileURL() string { + if o == nil { + return "" + } + return o.ProfileURL +} diff --git a/tests/mockserver/internal/sdk/models/components/socialnetworkdefinition.go b/tests/mockserver/internal/sdk/models/components/socialnetworkdefinition.go new file mode 100644 index 00000000..668935e3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/socialnetworkdefinition.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// SocialNetworkDefinition - Employee's social network profile +type SocialNetworkDefinition struct { + // Possible values are "twitter", "linkedin". + Name *string `json:"name,omitempty"` + // Human-readable profile name. + ProfileName *string `json:"profileName,omitempty"` + // Link to profile. + ProfileURL *string `json:"profileUrl,omitempty"` +} + +func (o *SocialNetworkDefinition) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *SocialNetworkDefinition) GetProfileName() *string { + if o == nil { + return nil + } + return o.ProfileName +} + +func (o *SocialNetworkDefinition) GetProfileURL() *string { + if o == nil { + return nil + } + return o.ProfileURL +} diff --git a/tests/mockserver/internal/sdk/models/components/sortoptions.go b/tests/mockserver/internal/sdk/models/components/sortoptions.go new file mode 100644 index 00000000..0f3949f1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/sortoptions.go @@ -0,0 +1,53 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type OrderBy string + +const ( + OrderByAsc OrderBy = "ASC" + OrderByDesc OrderBy = "DESC" +) + +func (e OrderBy) ToPointer() *OrderBy { + return &e +} +func (e *OrderBy) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ASC": + fallthrough + case "DESC": + *e = OrderBy(v) + return nil + default: + return fmt.Errorf("invalid value for OrderBy: %v", v) + } +} + +type SortOptions struct { + OrderBy *OrderBy `json:"orderBy,omitempty"` + SortBy *string `json:"sortBy,omitempty"` +} + +func (o *SortOptions) GetOrderBy() *OrderBy { + if o == nil { + return nil + } + return o.OrderBy +} + +func (o *SortOptions) GetSortBy() *string { + if o == nil { + return nil + } + return o.SortBy +} diff --git a/tests/mockserver/internal/sdk/models/components/structuredlink.go b/tests/mockserver/internal/sdk/models/components/structuredlink.go new file mode 100644 index 00000000..00f03620 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/structuredlink.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// StructuredLink - The display configuration for a link. +type StructuredLink struct { + // The display name for the link + Name *string `json:"name,omitempty"` + // The URL for the link. + URL *string `json:"url,omitempty"` + // Defines how to render an icon + IconConfig *IconConfig `json:"iconConfig,omitempty"` +} + +func (o *StructuredLink) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *StructuredLink) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *StructuredLink) GetIconConfig() *IconConfig { + if o == nil { + return nil + } + return o.IconConfig +} diff --git a/tests/mockserver/internal/sdk/models/components/structuredlocation.go b/tests/mockserver/internal/sdk/models/components/structuredlocation.go new file mode 100644 index 00000000..83567b11 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/structuredlocation.go @@ -0,0 +1,88 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// StructuredLocation - Detailed location with information about country, state, city etc. +type StructuredLocation struct { + // Desk number. + DeskLocation *string `json:"deskLocation,omitempty"` + // Location's timezone, e.g. UTC, PST. + Timezone *string `json:"timezone,omitempty"` + // Office address or name. + Address *string `json:"address,omitempty"` + // Name of the city. + City *string `json:"city,omitempty"` + // State code. + State *string `json:"state,omitempty"` + // Region information, e.g. NORAM, APAC. + Region *string `json:"region,omitempty"` + // ZIP Code for the address. + ZipCode *string `json:"zipCode,omitempty"` + // Country name. + Country *string `json:"country,omitempty"` + // Alpha-2 or Alpha-3 ISO 3166 country code, e.g. US or USA. + CountryCode *string `json:"countryCode,omitempty"` +} + +func (o *StructuredLocation) GetDeskLocation() *string { + if o == nil { + return nil + } + return o.DeskLocation +} + +func (o *StructuredLocation) GetTimezone() *string { + if o == nil { + return nil + } + return o.Timezone +} + +func (o *StructuredLocation) GetAddress() *string { + if o == nil { + return nil + } + return o.Address +} + +func (o *StructuredLocation) GetCity() *string { + if o == nil { + return nil + } + return o.City +} + +func (o *StructuredLocation) GetState() *string { + if o == nil { + return nil + } + return o.State +} + +func (o *StructuredLocation) GetRegion() *string { + if o == nil { + return nil + } + return o.Region +} + +func (o *StructuredLocation) GetZipCode() *string { + if o == nil { + return nil + } + return o.ZipCode +} + +func (o *StructuredLocation) GetCountry() *string { + if o == nil { + return nil + } + return o.Country +} + +func (o *StructuredLocation) GetCountryCode() *string { + if o == nil { + return nil + } + return o.CountryCode +} diff --git a/tests/mockserver/internal/sdk/models/components/structuredresult.go b/tests/mockserver/internal/sdk/models/components/structuredresult.go new file mode 100644 index 00000000..4d67fec7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/structuredresult.go @@ -0,0 +1,243 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// Prominence - The level of visual distinction that should be given to a result. +type Prominence string + +const ( + ProminenceHero Prominence = "HERO" + ProminencePromoted Prominence = "PROMOTED" + ProminenceStandard Prominence = "STANDARD" +) + +func (e Prominence) ToPointer() *Prominence { + return &e +} +func (e *Prominence) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "HERO": + fallthrough + case "PROMOTED": + fallthrough + case "STANDARD": + *e = Prominence(v) + return nil + default: + return fmt.Errorf("invalid value for Prominence: %v", v) + } +} + +// StructuredResultSource - Source context for this result. Possible values depend on the result type. +type StructuredResultSource string + +const ( + StructuredResultSourceExpertDetection StructuredResultSource = "EXPERT_DETECTION" + StructuredResultSourceEntityNlq StructuredResultSource = "ENTITY_NLQ" +) + +func (e StructuredResultSource) ToPointer() *StructuredResultSource { + return &e +} +func (e *StructuredResultSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "EXPERT_DETECTION": + fallthrough + case "ENTITY_NLQ": + *e = StructuredResultSource(v) + return nil + default: + return fmt.Errorf("invalid value for StructuredResultSource: %v", v) + } +} + +// StructuredResult - A single object that can support any object in the work graph. Only a single object will be populated. +type StructuredResult struct { + Document *Document `json:"document,omitempty"` + Person *Person `json:"person,omitempty"` + Customer *Customer `json:"customer,omitempty"` + Team *Team `json:"team,omitempty"` + CustomEntity *CustomEntity `json:"customEntity,omitempty"` + Answer *Answer `json:"answer,omitempty"` + ExtractedQnA *ExtractedQnA `json:"extractedQnA,omitempty"` + Meeting *Meeting `json:"meeting,omitempty"` + App *AppResult `json:"app,omitempty"` + Collection *Collection `json:"collection,omitempty"` + AnswerBoard *AnswerBoard `json:"answerBoard,omitempty"` + Code *Code `json:"code,omitempty"` + Shortcut *Shortcut `json:"shortcut,omitempty"` + QuerySuggestions *QuerySuggestionList `json:"querySuggestions,omitempty"` + // A list of documents related to this structured result. + RelatedDocuments []RelatedDocuments `json:"relatedDocuments,omitempty"` + RelatedQuestion *RelatedQuestion `json:"relatedQuestion,omitempty"` + // A disambiguation between multiple entities with the same name + Disambiguation *Disambiguation `json:"disambiguation,omitempty"` + // Any snippets associated to the populated object. + Snippets []SearchResultSnippet `json:"snippets,omitempty"` + // An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. + TrackingToken *string `json:"trackingToken,omitempty"` + // The level of visual distinction that should be given to a result. + Prominence *Prominence `json:"prominence,omitempty"` + // Source context for this result. Possible values depend on the result type. + Source *StructuredResultSource `json:"source,omitempty"` +} + +func (o *StructuredResult) GetDocument() *Document { + if o == nil { + return nil + } + return o.Document +} + +func (o *StructuredResult) GetPerson() *Person { + if o == nil { + return nil + } + return o.Person +} + +func (o *StructuredResult) GetCustomer() *Customer { + if o == nil { + return nil + } + return o.Customer +} + +func (o *StructuredResult) GetTeam() *Team { + if o == nil { + return nil + } + return o.Team +} + +func (o *StructuredResult) GetCustomEntity() *CustomEntity { + if o == nil { + return nil + } + return o.CustomEntity +} + +func (o *StructuredResult) GetAnswer() *Answer { + if o == nil { + return nil + } + return o.Answer +} + +func (o *StructuredResult) GetExtractedQnA() *ExtractedQnA { + if o == nil { + return nil + } + return o.ExtractedQnA +} + +func (o *StructuredResult) GetMeeting() *Meeting { + if o == nil { + return nil + } + return o.Meeting +} + +func (o *StructuredResult) GetApp() *AppResult { + if o == nil { + return nil + } + return o.App +} + +func (o *StructuredResult) GetCollection() *Collection { + if o == nil { + return nil + } + return o.Collection +} + +func (o *StructuredResult) GetAnswerBoard() *AnswerBoard { + if o == nil { + return nil + } + return o.AnswerBoard +} + +func (o *StructuredResult) GetCode() *Code { + if o == nil { + return nil + } + return o.Code +} + +func (o *StructuredResult) GetShortcut() *Shortcut { + if o == nil { + return nil + } + return o.Shortcut +} + +func (o *StructuredResult) GetQuerySuggestions() *QuerySuggestionList { + if o == nil { + return nil + } + return o.QuerySuggestions +} + +func (o *StructuredResult) GetRelatedDocuments() []RelatedDocuments { + if o == nil { + return nil + } + return o.RelatedDocuments +} + +func (o *StructuredResult) GetRelatedQuestion() *RelatedQuestion { + if o == nil { + return nil + } + return o.RelatedQuestion +} + +func (o *StructuredResult) GetDisambiguation() *Disambiguation { + if o == nil { + return nil + } + return o.Disambiguation +} + +func (o *StructuredResult) GetSnippets() []SearchResultSnippet { + if o == nil { + return nil + } + return o.Snippets +} + +func (o *StructuredResult) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} + +func (o *StructuredResult) GetProminence() *Prominence { + if o == nil { + return nil + } + return o.Prominence +} + +func (o *StructuredResult) GetSource() *StructuredResultSource { + if o == nil { + return nil + } + return o.Source +} diff --git a/tests/mockserver/internal/sdk/models/components/structuredtext.go b/tests/mockserver/internal/sdk/models/components/structuredtext.go new file mode 100644 index 00000000..0502a822 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/structuredtext.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type StructuredText struct { + Text string `json:"text"` + // An array of objects each of which contains either a string or a link which optionally corresponds to a document. + StructuredList []StructuredTextItem `json:"structuredList,omitempty"` +} + +func (o *StructuredText) GetText() string { + if o == nil { + return "" + } + return o.Text +} + +func (o *StructuredText) GetStructuredList() []StructuredTextItem { + if o == nil { + return nil + } + return o.StructuredList +} diff --git a/tests/mockserver/internal/sdk/models/components/structuredtextitem.go b/tests/mockserver/internal/sdk/models/components/structuredtextitem.go new file mode 100644 index 00000000..684a10cf --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/structuredtextitem.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type StructuredTextItem struct { + Link *string `json:"link,omitempty"` + Document *Document `json:"document,omitempty"` + Text *string `json:"text,omitempty"` + // A single object that can support any object in the work graph. Only a single object will be populated. + StructuredResult *StructuredResult `json:"structuredResult,omitempty"` +} + +func (o *StructuredTextItem) GetLink() *string { + if o == nil { + return nil + } + return o.Link +} + +func (o *StructuredTextItem) GetDocument() *Document { + if o == nil { + return nil + } + return o.Document +} + +func (o *StructuredTextItem) GetText() *string { + if o == nil { + return nil + } + return o.Text +} + +func (o *StructuredTextItem) GetStructuredResult() *StructuredResult { + if o == nil { + return nil + } + return o.StructuredResult +} diff --git a/tests/mockserver/internal/sdk/models/components/structuredtextmutableproperties.go b/tests/mockserver/internal/sdk/models/components/structuredtextmutableproperties.go new file mode 100644 index 00000000..ab29bfc2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/structuredtextmutableproperties.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type StructuredTextMutableProperties struct { + Text string `json:"text"` +} + +func (o *StructuredTextMutableProperties) GetText() string { + if o == nil { + return "" + } + return o.Text +} diff --git a/tests/mockserver/internal/sdk/models/components/summarizerequest.go b/tests/mockserver/internal/sdk/models/components/summarizerequest.go new file mode 100644 index 00000000..451b202e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/summarizerequest.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +// SummarizeRequest - Summary of the document +type SummarizeRequest struct { + // The ISO 8601 timestamp associated with the client request. + Timestamp *time.Time `json:"timestamp,omitempty"` + // Optional query that the summary should be about + Query *string `json:"query,omitempty"` + // Optional length of summary output. If not given, defaults to 500 chars. + PreferredSummaryLength *int64 `json:"preferredSummaryLength,omitempty"` + // Specifications of documents to summarize + DocumentSpecs []DocumentSpecUnion `json:"documentSpecs"` + // An opaque token that represents this particular result. To be used for /feedback reporting. + TrackingToken *string `json:"trackingToken,omitempty"` +} + +func (s SummarizeRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SummarizeRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SummarizeRequest) GetTimestamp() *time.Time { + if o == nil { + return nil + } + return o.Timestamp +} + +func (o *SummarizeRequest) GetQuery() *string { + if o == nil { + return nil + } + return o.Query +} + +func (o *SummarizeRequest) GetPreferredSummaryLength() *int64 { + if o == nil { + return nil + } + return o.PreferredSummaryLength +} + +func (o *SummarizeRequest) GetDocumentSpecs() []DocumentSpecUnion { + if o == nil { + return []DocumentSpecUnion{} + } + return o.DocumentSpecs +} + +func (o *SummarizeRequest) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} diff --git a/tests/mockserver/internal/sdk/models/components/summarizeresponse.go b/tests/mockserver/internal/sdk/models/components/summarizeresponse.go new file mode 100644 index 00000000..b196ab2d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/summarizeresponse.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Error struct { + Message *string `json:"message,omitempty"` +} + +func (o *Error) GetMessage() *string { + if o == nil { + return nil + } + return o.Message +} + +type SummarizeResponse struct { + Error *Error `json:"error,omitempty"` + Summary *Summary `json:"summary,omitempty"` + // An opaque token that represents this summary in this particular query. To be used for /feedback reporting. + TrackingToken *string `json:"trackingToken,omitempty"` +} + +func (o *SummarizeResponse) GetError() *Error { + if o == nil { + return nil + } + return o.Error +} + +func (o *SummarizeResponse) GetSummary() *Summary { + if o == nil { + return nil + } + return o.Summary +} + +func (o *SummarizeResponse) GetTrackingToken() *string { + if o == nil { + return nil + } + return o.TrackingToken +} diff --git a/tests/mockserver/internal/sdk/models/components/summary.go b/tests/mockserver/internal/sdk/models/components/summary.go new file mode 100644 index 00000000..1e715524 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/summary.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Summary struct { + Text *string `json:"text,omitempty"` + // Follow-up prompts based on the summarized doc + FollowUpPrompts []string `json:"followUpPrompts,omitempty"` +} + +func (o *Summary) GetText() *string { + if o == nil { + return nil + } + return o.Text +} + +func (o *Summary) GetFollowUpPrompts() []string { + if o == nil { + return nil + } + return o.FollowUpPrompts +} diff --git a/tests/mockserver/internal/sdk/models/components/team.go b/tests/mockserver/internal/sdk/models/components/team.go new file mode 100644 index 00000000..889ca29a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/team.go @@ -0,0 +1,242 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +// TeamStatus - whether this team is fully processed or there are still unprocessed operations that'll affect it +type TeamStatus string + +const ( + TeamStatusProcessed TeamStatus = "PROCESSED" + TeamStatusQueuedForCreation TeamStatus = "QUEUED_FOR_CREATION" + TeamStatusQueuedForDeletion TeamStatus = "QUEUED_FOR_DELETION" +) + +func (e TeamStatus) ToPointer() *TeamStatus { + return &e +} +func (e *TeamStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PROCESSED": + fallthrough + case "QUEUED_FOR_CREATION": + fallthrough + case "QUEUED_FOR_DELETION": + *e = TeamStatus(v) + return nil + default: + return fmt.Errorf("invalid value for TeamStatus: %v", v) + } +} + +type Team struct { + // A list of objects related to a source object. + RelatedObjects map[string]RelatedObjectEdge `json:"relatedObjects,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + // Unique identifier + ID string `json:"id"` + // Team name + Name string `json:"name"` + // A description of the team + Description *string `json:"description,omitempty"` + // Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. + BusinessUnit *string `json:"businessUnit,omitempty"` + // An organizational unit where everyone has a similar task, e.g. `Engineering`. + Department *string `json:"department,omitempty"` + // A link to the team's photo. + PhotoURL *string `json:"photoUrl,omitempty"` + // A link to the team's banner photo. + BannerURL *string `json:"bannerUrl,omitempty"` + // Link to a team page on the internet or your company's intranet + ExternalLink *string `json:"externalLink,omitempty"` + // The members on this team + Members []PersonToTeamRelationship `json:"members,omitempty"` + // 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) + MemberCount *int64 `json:"memberCount,omitempty"` + // The emails for this team + Emails []TeamEmail `json:"emails,omitempty"` + // Customizable fields for additional team information. + CustomFields []CustomFieldData `json:"customFields,omitempty"` + // The datasource profiles of the team + DatasourceProfiles []DatasourceProfile `json:"datasourceProfiles,omitempty"` + // the data source of the team, e.g. GDRIVE + Datasource *string `json:"datasource,omitempty"` + // For teams created from docs, the doc title. Otherwise empty. + CreatedFrom *string `json:"createdFrom,omitempty"` + // when this team was last updated. + LastUpdatedAt *time.Time `json:"lastUpdatedAt,omitempty"` + // whether this team is fully processed or there are still unprocessed operations that'll affect it + Status *TeamStatus `default:"PROCESSED" json:"status"` + // can this team be deleted. Some manually ingested teams like GCS_CSV or PUSH_API cannot + CanBeDeleted *bool `default:"true" json:"canBeDeleted"` + // The logging id of the team used in scrubbed logs, client analytics, and metrics. + LoggingID *string `json:"loggingId,omitempty"` +} + +func (t Team) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *Team) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, false); err != nil { + return err + } + return nil +} + +func (o *Team) GetRelatedObjects() map[string]RelatedObjectEdge { + if o == nil { + return nil + } + return o.RelatedObjects +} + +func (o *Team) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *Team) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *Team) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Team) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *Team) GetBusinessUnit() *string { + if o == nil { + return nil + } + return o.BusinessUnit +} + +func (o *Team) GetDepartment() *string { + if o == nil { + return nil + } + return o.Department +} + +func (o *Team) GetPhotoURL() *string { + if o == nil { + return nil + } + return o.PhotoURL +} + +func (o *Team) GetBannerURL() *string { + if o == nil { + return nil + } + return o.BannerURL +} + +func (o *Team) GetExternalLink() *string { + if o == nil { + return nil + } + return o.ExternalLink +} + +func (o *Team) GetMembers() []PersonToTeamRelationship { + if o == nil { + return nil + } + return o.Members +} + +func (o *Team) GetMemberCount() *int64 { + if o == nil { + return nil + } + return o.MemberCount +} + +func (o *Team) GetEmails() []TeamEmail { + if o == nil { + return nil + } + return o.Emails +} + +func (o *Team) GetCustomFields() []CustomFieldData { + if o == nil { + return nil + } + return o.CustomFields +} + +func (o *Team) GetDatasourceProfiles() []DatasourceProfile { + if o == nil { + return nil + } + return o.DatasourceProfiles +} + +func (o *Team) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *Team) GetCreatedFrom() *string { + if o == nil { + return nil + } + return o.CreatedFrom +} + +func (o *Team) GetLastUpdatedAt() *time.Time { + if o == nil { + return nil + } + return o.LastUpdatedAt +} + +func (o *Team) GetStatus() *TeamStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *Team) GetCanBeDeleted() *bool { + if o == nil { + return nil + } + return o.CanBeDeleted +} + +func (o *Team) GetLoggingID() *string { + if o == nil { + return nil + } + return o.LoggingID +} diff --git a/tests/mockserver/internal/sdk/models/components/teamemail.go b/tests/mockserver/internal/sdk/models/components/teamemail.go new file mode 100644 index 00000000..fed529e0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/teamemail.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" +) + +// TeamEmail - Information about a team's email +type TeamEmail struct { + // An email address + Email string `json:"email"` + // An enum of `PRIMARY`, `SECONDARY`, `ONCALL`, `OTHER` + Type *string `default:"OTHER" json:"type"` +} + +func (t TeamEmail) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TeamEmail) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, false); err != nil { + return err + } + return nil +} + +func (o *TeamEmail) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *TeamEmail) GetType() *string { + if o == nil { + return nil + } + return o.Type +} diff --git a/tests/mockserver/internal/sdk/models/components/teaminfodefinition.go b/tests/mockserver/internal/sdk/models/components/teaminfodefinition.go new file mode 100644 index 00000000..9dea6e19 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/teaminfodefinition.go @@ -0,0 +1,107 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// TeamInfoDefinition - Information about an employee's team +type TeamInfoDefinition struct { + // The unique ID of the team + ID string `json:"id"` + // Human-readable team name + Name string `json:"name"` + // The description of this team + Description *string `json:"description,omitempty"` + // Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. + BusinessUnit *string `json:"businessUnit,omitempty"` + // An organizational unit where everyone has a similar task, e.g. `Engineering`. + Department *string `json:"department,omitempty"` + // A link to the team's photo + PhotoURL *string `json:"photoUrl,omitempty"` + // A link to an external team page. If set, team results will link to it. + // + ExternalLink *string `json:"externalLink,omitempty"` + // The emails of the team + Emails []TeamEmail `json:"emails,omitempty"` + // The datasource profiles of the team, e.g. `Slack`,`Github`. + DatasourceProfiles []DatasourceProfile `json:"datasourceProfiles,omitempty"` + // The members of the team + Members []TeamMember `json:"members"` + // List of additional fields with more information about the team. + AdditionalFields []AdditionalFieldDefinition `json:"additionalFields,omitempty"` +} + +func (o *TeamInfoDefinition) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *TeamInfoDefinition) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *TeamInfoDefinition) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *TeamInfoDefinition) GetBusinessUnit() *string { + if o == nil { + return nil + } + return o.BusinessUnit +} + +func (o *TeamInfoDefinition) GetDepartment() *string { + if o == nil { + return nil + } + return o.Department +} + +func (o *TeamInfoDefinition) GetPhotoURL() *string { + if o == nil { + return nil + } + return o.PhotoURL +} + +func (o *TeamInfoDefinition) GetExternalLink() *string { + if o == nil { + return nil + } + return o.ExternalLink +} + +func (o *TeamInfoDefinition) GetEmails() []TeamEmail { + if o == nil { + return nil + } + return o.Emails +} + +func (o *TeamInfoDefinition) GetDatasourceProfiles() []DatasourceProfile { + if o == nil { + return nil + } + return o.DatasourceProfiles +} + +func (o *TeamInfoDefinition) GetMembers() []TeamMember { + if o == nil { + return []TeamMember{} + } + return o.Members +} + +func (o *TeamInfoDefinition) GetAdditionalFields() []AdditionalFieldDefinition { + if o == nil { + return nil + } + return o.AdditionalFields +} diff --git a/tests/mockserver/internal/sdk/models/components/teammember.go b/tests/mockserver/internal/sdk/models/components/teammember.go new file mode 100644 index 00000000..7b846e8e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/teammember.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" +) + +// TeamMember - Information about a team's member +type TeamMember struct { + // The member's email + Email string `json:"email"` + // The member's relationship to the team, an enum of `MEMBER`, `MANAGER`, `LEAD`, `POINT_OF_CONTACT`, `OTHER` + Relationship *string `default:"MEMBER" json:"relationship"` + // The member's start date + JoinDate *types.Date `json:"join_date,omitempty"` +} + +func (t TeamMember) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TeamMember) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, false); err != nil { + return err + } + return nil +} + +func (o *TeamMember) GetEmail() string { + if o == nil { + return "" + } + return o.Email +} + +func (o *TeamMember) GetRelationship() *string { + if o == nil { + return nil + } + return o.Relationship +} + +func (o *TeamMember) GetJoinDate() *types.Date { + if o == nil { + return nil + } + return o.JoinDate +} diff --git a/tests/mockserver/internal/sdk/models/components/textrange.go b/tests/mockserver/internal/sdk/models/components/textrange.go new file mode 100644 index 00000000..1d226226 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/textrange.go @@ -0,0 +1,87 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type TextRangeType string + +const ( + TextRangeTypeBold TextRangeType = "BOLD" + TextRangeTypeCitation TextRangeType = "CITATION" + TextRangeTypeHighlight TextRangeType = "HIGHLIGHT" + TextRangeTypeLink TextRangeType = "LINK" +) + +func (e TextRangeType) ToPointer() *TextRangeType { + return &e +} +func (e *TextRangeType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BOLD": + fallthrough + case "CITATION": + fallthrough + case "HIGHLIGHT": + fallthrough + case "LINK": + *e = TextRangeType(v) + return nil + default: + return fmt.Errorf("invalid value for TextRangeType: %v", v) + } +} + +// TextRange - A subsection of a given string to which some special formatting should be applied. +type TextRange struct { + // The inclusive start index of the range. + StartIndex int64 `json:"startIndex"` + // The exclusive end index of the range. + EndIndex *int64 `json:"endIndex,omitempty"` + Type *TextRangeType `json:"type,omitempty"` + // The URL associated with the range, if applicable. For example, the linked URL for a LINK range. + URL *string `json:"url,omitempty"` + Document *Document `json:"document,omitempty"` +} + +func (o *TextRange) GetStartIndex() int64 { + if o == nil { + return 0 + } + return o.StartIndex +} + +func (o *TextRange) GetEndIndex() *int64 { + if o == nil { + return nil + } + return o.EndIndex +} + +func (o *TextRange) GetType() *TextRangeType { + if o == nil { + return nil + } + return o.Type +} + +func (o *TextRange) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} + +func (o *TextRange) GetDocument() *Document { + if o == nil { + return nil + } + return o.Document +} diff --git a/tests/mockserver/internal/sdk/models/components/thumbnail.go b/tests/mockserver/internal/sdk/models/components/thumbnail.go new file mode 100644 index 00000000..6f97f3ea --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/thumbnail.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Thumbnail struct { + // Photo id if the thumbnail is from splash. + PhotoID *string `json:"photoId,omitempty"` + // Thumbnail URL. This can be user provided image and/or from downloaded images hosted by Glean. + URL *string `json:"url,omitempty"` +} + +func (o *Thumbnail) GetPhotoID() *string { + if o == nil { + return nil + } + return o.PhotoID +} + +func (o *Thumbnail) GetURL() *string { + if o == nil { + return nil + } + return o.URL +} diff --git a/tests/mockserver/internal/sdk/models/components/timeinterval.go b/tests/mockserver/internal/sdk/models/components/timeinterval.go new file mode 100644 index 00000000..48a70efb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/timeinterval.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type TimeInterval struct { + // The RFC3339 timestamp formatted start time of this event. + Start string `json:"start"` + // The RFC3339 timestamp formatted end time of this event. + End string `json:"end"` +} + +func (o *TimeInterval) GetStart() string { + if o == nil { + return "" + } + return o.Start +} + +func (o *TimeInterval) GetEnd() string { + if o == nil { + return "" + } + return o.End +} diff --git a/tests/mockserver/internal/sdk/models/components/timepoint.go b/tests/mockserver/internal/sdk/models/components/timepoint.go new file mode 100644 index 00000000..1fa1a072 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/timepoint.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type TimePoint struct { + // Epoch seconds. Has precedence over daysFromNow. + EpochSeconds *int64 `json:"epochSeconds,omitempty"` + // The number of days from now. Specification relative to current time. Can be negative. + DaysFromNow *int64 `json:"daysFromNow,omitempty"` +} + +func (o *TimePoint) GetEpochSeconds() *int64 { + if o == nil { + return nil + } + return o.EpochSeconds +} + +func (o *TimePoint) GetDaysFromNow() *int64 { + if o == nil { + return nil + } + return o.DaysFromNow +} diff --git a/tests/mockserver/internal/sdk/models/components/timerange.go b/tests/mockserver/internal/sdk/models/components/timerange.go new file mode 100644 index 00000000..1c198603 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/timerange.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type TimeRange struct { + // start time of the time range, applicable for the CUSTOM type. + StartTime *time.Time `json:"startTime,omitempty"` + // end time of the time range, applicable for the CUSTOM type. + EndTime *time.Time `json:"endTime,omitempty"` +} + +func (t TimeRange) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TimeRange) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, false); err != nil { + return err + } + return nil +} + +func (o *TimeRange) GetStartTime() *time.Time { + if o == nil { + return nil + } + return o.StartTime +} + +func (o *TimeRange) GetEndTime() *time.Time { + if o == nil { + return nil + } + return o.EndTime +} diff --git a/tests/mockserver/internal/sdk/models/components/tool.go b/tests/mockserver/internal/sdk/models/components/tool.go new file mode 100644 index 00000000..ed0eadfe --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/tool.go @@ -0,0 +1,83 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ToolType - Type of tool (READ, WRITE) +type ToolType string + +const ( + ToolTypeRead ToolType = "READ" + ToolTypeWrite ToolType = "WRITE" +) + +func (e ToolType) ToPointer() *ToolType { + return &e +} +func (e *ToolType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "READ": + fallthrough + case "WRITE": + *e = ToolType(v) + return nil + default: + return fmt.Errorf("invalid value for ToolType: %v", v) + } +} + +type Tool struct { + // Type of tool (READ, WRITE) + Type *ToolType `json:"type,omitempty"` + // Unique identifier for the tool + Name *string `json:"name,omitempty"` + // Human-readable name + DisplayName *string `json:"displayName,omitempty"` + // LLM friendly description of the tool + Description *string `json:"description,omitempty"` + // The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. + Parameters map[string]ToolParameter `json:"parameters,omitempty"` +} + +func (o *Tool) GetType() *ToolType { + if o == nil { + return nil + } + return o.Type +} + +func (o *Tool) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *Tool) GetDisplayName() *string { + if o == nil { + return nil + } + return o.DisplayName +} + +func (o *Tool) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *Tool) GetParameters() map[string]ToolParameter { + if o == nil { + return nil + } + return o.Parameters +} diff --git a/tests/mockserver/internal/sdk/models/components/toolinfo.go b/tests/mockserver/internal/sdk/models/components/toolinfo.go new file mode 100644 index 00000000..dea3298b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/toolinfo.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ToolInfo struct { + // The manifest for a tool that can be used to augment Glean Assistant. + Metadata *ToolMetadata `json:"metadata,omitempty"` + // Parameters supported by the tool. + Parameters map[string]WriteActionParameter `json:"parameters,omitempty"` +} + +func (o *ToolInfo) GetMetadata() *ToolMetadata { + if o == nil { + return nil + } + return o.Metadata +} + +func (o *ToolInfo) GetParameters() map[string]WriteActionParameter { + if o == nil { + return nil + } + return o.Parameters +} diff --git a/tests/mockserver/internal/sdk/models/components/toolmetadata.go b/tests/mockserver/internal/sdk/models/components/toolmetadata.go new file mode 100644 index 00000000..ddc888f0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/toolmetadata.go @@ -0,0 +1,316 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +// ToolMetadataType - The type of tool. +type ToolMetadataType string + +const ( + ToolMetadataTypeRetrieval ToolMetadataType = "RETRIEVAL" + ToolMetadataTypeAction ToolMetadataType = "ACTION" +) + +func (e ToolMetadataType) ToPointer() *ToolMetadataType { + return &e +} +func (e *ToolMetadataType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "RETRIEVAL": + fallthrough + case "ACTION": + *e = ToolMetadataType(v) + return nil + default: + return fmt.Errorf("invalid value for ToolMetadataType: %v", v) + } +} + +// KnowledgeType - Indicates the kind of knowledge a tool would access or modify. +type KnowledgeType string + +const ( + KnowledgeTypeNeutralKnowledge KnowledgeType = "NEUTRAL_KNOWLEDGE" + KnowledgeTypeCompanyKnowledge KnowledgeType = "COMPANY_KNOWLEDGE" + KnowledgeTypeWorldKnowledge KnowledgeType = "WORLD_KNOWLEDGE" +) + +func (e KnowledgeType) ToPointer() *KnowledgeType { + return &e +} +func (e *KnowledgeType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NEUTRAL_KNOWLEDGE": + fallthrough + case "COMPANY_KNOWLEDGE": + fallthrough + case "WORLD_KNOWLEDGE": + *e = KnowledgeType(v) + return nil + default: + return fmt.Errorf("invalid value for KnowledgeType: %v", v) + } +} + +// WriteActionType - 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. +type WriteActionType string + +const ( + WriteActionTypeRedirect WriteActionType = "REDIRECT" + WriteActionTypeExecution WriteActionType = "EXECUTION" +) + +func (e WriteActionType) ToPointer() *WriteActionType { + return &e +} +func (e *WriteActionType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "REDIRECT": + fallthrough + case "EXECUTION": + *e = WriteActionType(v) + return nil + default: + return fmt.Errorf("invalid value for WriteActionType: %v", v) + } +} + +// AuthType - 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. +// 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. +// 'OAUTH_USER' uses individual user tokens for external API calls. +// 'DWD' refers to domain wide delegation. +type AuthType string + +const ( + AuthTypeNone AuthType = "NONE" + AuthTypeOauthUser AuthType = "OAUTH_USER" + AuthTypeOauthAdmin AuthType = "OAUTH_ADMIN" + AuthTypeAPIKey AuthType = "API_KEY" + AuthTypeBasicAuth AuthType = "BASIC_AUTH" + AuthTypeDwd AuthType = "DWD" +) + +func (e AuthType) ToPointer() *AuthType { + return &e +} +func (e *AuthType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NONE": + fallthrough + case "OAUTH_USER": + fallthrough + case "OAUTH_ADMIN": + fallthrough + case "API_KEY": + fallthrough + case "BASIC_AUTH": + fallthrough + case "DWD": + *e = AuthType(v) + return nil + default: + return fmt.Errorf("invalid value for AuthType: %v", v) + } +} + +// ToolMetadata - The manifest for a tool that can be used to augment Glean Assistant. +type ToolMetadata struct { + // The type of tool. + Type ToolMetadataType `json:"type"` + // Unique identifier for the tool. Name should be understandable by the LLM, and will be used to invoke a tool. + Name string `json:"name"` + // Human understandable name of the tool. Max 50 characters. + DisplayName string `json:"displayName"` + // An opaque id which is unique identifier for the tool. + ToolID *string `json:"toolId,omitempty"` + // Description of the tool meant for a human. + DisplayDescription string `json:"displayDescription"` + // URL used to fetch the logo. + LogoURL *string `json:"logoUrl,omitempty"` + // Name of the generated object. This will be used to indicate to the end user what the generated object contains. + ObjectName *string `json:"objectName,omitempty"` + // Indicates the kind of knowledge a tool would access or modify. + KnowledgeType *KnowledgeType `json:"knowledgeType,omitempty"` + CreatedBy *PersonObject `json:"createdBy,omitempty"` + LastUpdatedBy *PersonObject `json:"lastUpdatedBy,omitempty"` + // The time the tool was created in ISO format (ISO 8601) + CreatedAt *time.Time `json:"createdAt,omitempty"` + // The time the tool was last updated in ISO format (ISO 8601) + LastUpdatedAt *time.Time `json:"lastUpdatedAt,omitempty"` + // 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. + WriteActionType *WriteActionType `json:"writeActionType,omitempty"` + // 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. + // 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. + // 'OAUTH_USER' uses individual user tokens for external API calls. + // 'DWD' refers to domain wide delegation. + // + AuthType *AuthType `json:"authType,omitempty"` + // Config for tool's authentication method. + Auth *AuthConfig `json:"auth,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + // Usage instructions for the LLM to use this action. + UsageInstructions *string `json:"usageInstructions,omitempty"` + // Whether this action has been fully configured and validated. + IsSetupFinished *bool `json:"isSetupFinished,omitempty"` +} + +func (t ToolMetadata) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *ToolMetadata) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ToolMetadata) GetType() ToolMetadataType { + if o == nil { + return ToolMetadataType("") + } + return o.Type +} + +func (o *ToolMetadata) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *ToolMetadata) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *ToolMetadata) GetToolID() *string { + if o == nil { + return nil + } + return o.ToolID +} + +func (o *ToolMetadata) GetDisplayDescription() string { + if o == nil { + return "" + } + return o.DisplayDescription +} + +func (o *ToolMetadata) GetLogoURL() *string { + if o == nil { + return nil + } + return o.LogoURL +} + +func (o *ToolMetadata) GetObjectName() *string { + if o == nil { + return nil + } + return o.ObjectName +} + +func (o *ToolMetadata) GetKnowledgeType() *KnowledgeType { + if o == nil { + return nil + } + return o.KnowledgeType +} + +func (o *ToolMetadata) GetCreatedBy() *PersonObject { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *ToolMetadata) GetLastUpdatedBy() *PersonObject { + if o == nil { + return nil + } + return o.LastUpdatedBy +} + +func (o *ToolMetadata) GetCreatedAt() *time.Time { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *ToolMetadata) GetLastUpdatedAt() *time.Time { + if o == nil { + return nil + } + return o.LastUpdatedAt +} + +func (o *ToolMetadata) GetWriteActionType() *WriteActionType { + if o == nil { + return nil + } + return o.WriteActionType +} + +func (o *ToolMetadata) GetAuthType() *AuthType { + if o == nil { + return nil + } + return o.AuthType +} + +func (o *ToolMetadata) GetAuth() *AuthConfig { + if o == nil { + return nil + } + return o.Auth +} + +func (o *ToolMetadata) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *ToolMetadata) GetUsageInstructions() *string { + if o == nil { + return nil + } + return o.UsageInstructions +} + +func (o *ToolMetadata) GetIsSetupFinished() *bool { + if o == nil { + return nil + } + return o.IsSetupFinished +} diff --git a/tests/mockserver/internal/sdk/models/components/toolparameter.go b/tests/mockserver/internal/sdk/models/components/toolparameter.go new file mode 100644 index 00000000..fd0c3c73 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/toolparameter.go @@ -0,0 +1,109 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ToolParameterType - Parameter type (string, number, boolean, object, array) +type ToolParameterType string + +const ( + ToolParameterTypeString ToolParameterType = "string" + ToolParameterTypeNumber ToolParameterType = "number" + ToolParameterTypeBoolean ToolParameterType = "boolean" + ToolParameterTypeObject ToolParameterType = "object" + ToolParameterTypeArray ToolParameterType = "array" +) + +func (e ToolParameterType) ToPointer() *ToolParameterType { + return &e +} +func (e *ToolParameterType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "string": + fallthrough + case "number": + fallthrough + case "boolean": + fallthrough + case "object": + fallthrough + case "array": + *e = ToolParameterType(v) + return nil + default: + return fmt.Errorf("invalid value for ToolParameterType: %v", v) + } +} + +type ToolParameter struct { + // Parameter type (string, number, boolean, object, array) + Type *ToolParameterType `json:"type,omitempty"` + // The name of the parameter + Name *string `json:"name,omitempty"` + // The description of the parameter + Description *string `json:"description,omitempty"` + // Whether the parameter is required + IsRequired *bool `json:"isRequired,omitempty"` + // The possible values for the parameter. Can contain only primitive values or arrays of primitive values. + PossibleValues []string `json:"possibleValues,omitempty"` + Items *ToolParameter `json:"items,omitempty"` + // When type is 'object', this describes the structure of the object. + Properties map[string]ToolParameter `json:"properties,omitempty"` +} + +func (o *ToolParameter) GetType() *ToolParameterType { + if o == nil { + return nil + } + return o.Type +} + +func (o *ToolParameter) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *ToolParameter) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *ToolParameter) GetIsRequired() *bool { + if o == nil { + return nil + } + return o.IsRequired +} + +func (o *ToolParameter) GetPossibleValues() []string { + if o == nil { + return nil + } + return o.PossibleValues +} + +func (o *ToolParameter) GetItems() *ToolParameter { + if o == nil { + return nil + } + return o.Items +} + +func (o *ToolParameter) GetProperties() map[string]ToolParameter { + if o == nil { + return nil + } + return o.Properties +} diff --git a/tests/mockserver/internal/sdk/models/components/toolscallparameter.go b/tests/mockserver/internal/sdk/models/components/toolscallparameter.go new file mode 100644 index 00000000..ddfbe5f9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/toolscallparameter.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ToolsCallParameter struct { + // The name of the parameter + Name string `json:"name"` + // The value of the parameter (for primitive types) + Value string `json:"value"` + // The value of the parameter (for array types) + Items []ToolsCallParameter `json:"items,omitempty"` + // The value of the parameter (for object types) + Properties map[string]ToolsCallParameter `json:"properties,omitempty"` +} + +func (o *ToolsCallParameter) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *ToolsCallParameter) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *ToolsCallParameter) GetItems() []ToolsCallParameter { + if o == nil { + return nil + } + return o.Items +} + +func (o *ToolsCallParameter) GetProperties() map[string]ToolsCallParameter { + if o == nil { + return nil + } + return o.Properties +} diff --git a/tests/mockserver/internal/sdk/models/components/toolscallrequest.go b/tests/mockserver/internal/sdk/models/components/toolscallrequest.go new file mode 100644 index 00000000..4678acfc --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/toolscallrequest.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ToolsCallRequest struct { + // Required name of the tool to execute + Name string `json:"name"` + // The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. + Parameters map[string]ToolsCallParameter `json:"parameters"` +} + +func (o *ToolsCallRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *ToolsCallRequest) GetParameters() map[string]ToolsCallParameter { + if o == nil { + return map[string]ToolsCallParameter{} + } + return o.Parameters +} diff --git a/tests/mockserver/internal/sdk/models/components/toolscallresponse.go b/tests/mockserver/internal/sdk/models/components/toolscallresponse.go new file mode 100644 index 00000000..03e9af73 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/toolscallresponse.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ToolsCallResponse struct { + // The raw response from the tool + RawResponse map[string]any `json:"rawResponse,omitempty"` + // The error message if applicable + Error *string `json:"error,omitempty"` +} + +func (o *ToolsCallResponse) GetRawResponse() map[string]any { + if o == nil { + return nil + } + return o.RawResponse +} + +func (o *ToolsCallResponse) GetError() *string { + if o == nil { + return nil + } + return o.Error +} diff --git a/tests/mockserver/internal/sdk/models/components/toolslistresponse.go b/tests/mockserver/internal/sdk/models/components/toolslistresponse.go new file mode 100644 index 00000000..7a6a8980 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/toolslistresponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type ToolsListResponse struct { + Tools []Tool `json:"tools,omitempty"` +} + +func (o *ToolsListResponse) GetTools() []Tool { + if o == nil { + return nil + } + return o.Tools +} diff --git a/tests/mockserver/internal/sdk/models/components/ugctype.go b/tests/mockserver/internal/sdk/models/components/ugctype.go new file mode 100644 index 00000000..e1cdc164 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/ugctype.go @@ -0,0 +1,46 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +type UgcType string + +const ( + UgcTypeAnnouncementsType UgcType = "ANNOUNCEMENTS_TYPE" + UgcTypeAnswersType UgcType = "ANSWERS_TYPE" + UgcTypeCollectionsType UgcType = "COLLECTIONS_TYPE" + UgcTypeShortcutsType UgcType = "SHORTCUTS_TYPE" + UgcTypeWorkflowsType UgcType = "WORKFLOWS_TYPE" + UgcTypePromptTemplatesType UgcType = "PROMPT_TEMPLATES_TYPE" +) + +func (e UgcType) ToPointer() *UgcType { + return &e +} +func (e *UgcType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ANNOUNCEMENTS_TYPE": + fallthrough + case "ANSWERS_TYPE": + fallthrough + case "COLLECTIONS_TYPE": + fallthrough + case "SHORTCUTS_TYPE": + fallthrough + case "WORKFLOWS_TYPE": + fallthrough + case "PROMPT_TEMPLATES_TYPE": + *e = UgcType(v) + return nil + default: + return fmt.Errorf("invalid value for UgcType: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/unpin.go b/tests/mockserver/internal/sdk/models/components/unpin.go new file mode 100644 index 00000000..c7d34319 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/unpin.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Unpin struct { + // The opaque id of the pin to be unpinned. + ID *string `json:"id,omitempty"` +} + +func (o *Unpin) GetID() *string { + if o == nil { + return nil + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/updateannouncementrequest.go b/tests/mockserver/internal/sdk/models/components/updateannouncementrequest.go new file mode 100644 index 00000000..d12b1add --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/updateannouncementrequest.go @@ -0,0 +1,210 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +// UpdateAnnouncementRequestChannel - This determines whether this is a Social Feed post or a regular announcement. +type UpdateAnnouncementRequestChannel string + +const ( + UpdateAnnouncementRequestChannelMain UpdateAnnouncementRequestChannel = "MAIN" + UpdateAnnouncementRequestChannelSocialFeed UpdateAnnouncementRequestChannel = "SOCIAL_FEED" +) + +func (e UpdateAnnouncementRequestChannel) ToPointer() *UpdateAnnouncementRequestChannel { + return &e +} +func (e *UpdateAnnouncementRequestChannel) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "MAIN": + fallthrough + case "SOCIAL_FEED": + *e = UpdateAnnouncementRequestChannel(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateAnnouncementRequestChannel: %v", v) + } +} + +// UpdateAnnouncementRequestPostType - 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. +type UpdateAnnouncementRequestPostType string + +const ( + UpdateAnnouncementRequestPostTypeText UpdateAnnouncementRequestPostType = "TEXT" + UpdateAnnouncementRequestPostTypeLink UpdateAnnouncementRequestPostType = "LINK" +) + +func (e UpdateAnnouncementRequestPostType) ToPointer() *UpdateAnnouncementRequestPostType { + return &e +} +func (e *UpdateAnnouncementRequestPostType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "TEXT": + fallthrough + case "LINK": + *e = UpdateAnnouncementRequestPostType(v) + return nil + default: + return fmt.Errorf("invalid value for UpdateAnnouncementRequestPostType: %v", v) + } +} + +type UpdateAnnouncementRequest struct { + // The date and time at which the announcement becomes active. + StartTime time.Time `json:"startTime"` + // The date and time at which the announcement expires. + EndTime time.Time `json:"endTime"` + // The headline of the announcement. + Title string `json:"title"` + Body *StructuredText `json:"body,omitempty"` + // An emoji used to indicate the nature of the announcement. + Emoji *string `json:"emoji,omitempty"` + Thumbnail *Thumbnail `json:"thumbnail,omitempty"` + Banner *Thumbnail `json:"banner,omitempty"` + // Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search. + AudienceFilters []FacetFilter `json:"audienceFilters,omitempty"` + // The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread). + SourceDocumentID *string `json:"sourceDocumentId,omitempty"` + // Whether or not to hide an author attribution. + HideAttribution *bool `json:"hideAttribution,omitempty"` + // This determines whether this is a Social Feed post or a regular announcement. + Channel *UpdateAnnouncementRequestChannel `json:"channel,omitempty"` + // 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. + PostType *UpdateAnnouncementRequestPostType `json:"postType,omitempty"` + // Used by the Social Feed to pin posts to the front of the feed. + IsPrioritized *bool `json:"isPrioritized,omitempty"` + // 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". + ViewURL *string `json:"viewUrl,omitempty"` + // The opaque id of the announcement. + ID int64 `json:"id"` +} + +func (u UpdateAnnouncementRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(u, "", false) +} + +func (u *UpdateAnnouncementRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &u, "", false, false); err != nil { + return err + } + return nil +} + +func (o *UpdateAnnouncementRequest) GetStartTime() time.Time { + if o == nil { + return time.Time{} + } + return o.StartTime +} + +func (o *UpdateAnnouncementRequest) GetEndTime() time.Time { + if o == nil { + return time.Time{} + } + return o.EndTime +} + +func (o *UpdateAnnouncementRequest) GetTitle() string { + if o == nil { + return "" + } + return o.Title +} + +func (o *UpdateAnnouncementRequest) GetBody() *StructuredText { + if o == nil { + return nil + } + return o.Body +} + +func (o *UpdateAnnouncementRequest) GetEmoji() *string { + if o == nil { + return nil + } + return o.Emoji +} + +func (o *UpdateAnnouncementRequest) GetThumbnail() *Thumbnail { + if o == nil { + return nil + } + return o.Thumbnail +} + +func (o *UpdateAnnouncementRequest) GetBanner() *Thumbnail { + if o == nil { + return nil + } + return o.Banner +} + +func (o *UpdateAnnouncementRequest) GetAudienceFilters() []FacetFilter { + if o == nil { + return nil + } + return o.AudienceFilters +} + +func (o *UpdateAnnouncementRequest) GetSourceDocumentID() *string { + if o == nil { + return nil + } + return o.SourceDocumentID +} + +func (o *UpdateAnnouncementRequest) GetHideAttribution() *bool { + if o == nil { + return nil + } + return o.HideAttribution +} + +func (o *UpdateAnnouncementRequest) GetChannel() *UpdateAnnouncementRequestChannel { + if o == nil { + return nil + } + return o.Channel +} + +func (o *UpdateAnnouncementRequest) GetPostType() *UpdateAnnouncementRequestPostType { + if o == nil { + return nil + } + return o.PostType +} + +func (o *UpdateAnnouncementRequest) GetIsPrioritized() *bool { + if o == nil { + return nil + } + return o.IsPrioritized +} + +func (o *UpdateAnnouncementRequest) GetViewURL() *string { + if o == nil { + return nil + } + return o.ViewURL +} + +func (o *UpdateAnnouncementRequest) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/updatedlpconfigrequest.go b/tests/mockserver/internal/sdk/models/components/updatedlpconfigrequest.go new file mode 100644 index 00000000..676fbf0c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/updatedlpconfigrequest.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UpdateDlpConfigRequest struct { + // Detailed configuration of what documents and sensitive content will be scanned. + Config *DlpConfig `json:"config,omitempty"` + // Only "ONCE" is supported for reports. + Frequency *string `json:"frequency,omitempty"` +} + +func (o *UpdateDlpConfigRequest) GetConfig() *DlpConfig { + if o == nil { + return nil + } + return o.Config +} + +func (o *UpdateDlpConfigRequest) GetFrequency() *string { + if o == nil { + return nil + } + return o.Frequency +} diff --git a/tests/mockserver/internal/sdk/models/components/updatedlpconfigresponse.go b/tests/mockserver/internal/sdk/models/components/updatedlpconfigresponse.go new file mode 100644 index 00000000..7f2dceec --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/updatedlpconfigresponse.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UpdateDlpConfigResponse struct { + Result *DlpSimpleResult `json:"result,omitempty"` + // The id of the report that was just created and run. + ReportID *string `json:"reportId,omitempty"` +} + +func (o *UpdateDlpConfigResponse) GetResult() *DlpSimpleResult { + if o == nil { + return nil + } + return o.Result +} + +func (o *UpdateDlpConfigResponse) GetReportID() *string { + if o == nil { + return nil + } + return o.ReportID +} diff --git a/tests/mockserver/internal/sdk/models/components/updatedlpreportrequest.go b/tests/mockserver/internal/sdk/models/components/updatedlpreportrequest.go new file mode 100644 index 00000000..7b8e524e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/updatedlpreportrequest.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UpdateDlpReportRequest struct { + // Detailed configuration of what documents and sensitive content will be scanned. + Config *DlpConfig `json:"config,omitempty"` + // Interval between scans. DAILY is deprecated. + Frequency *DlpFrequency `json:"frequency,omitempty"` + // The status of the policy/report. Only ACTIVE status will be picked for scans. + Status *DlpReportStatus `json:"status,omitempty"` + // The new autoHideDoc boolean the policy will be updated to if provided. + AutoHideDocs *bool `json:"autoHideDocs,omitempty"` + // The new name of the policy if provided. + ReportName *string `json:"reportName,omitempty"` +} + +func (o *UpdateDlpReportRequest) GetConfig() *DlpConfig { + if o == nil { + return nil + } + return o.Config +} + +func (o *UpdateDlpReportRequest) GetFrequency() *DlpFrequency { + if o == nil { + return nil + } + return o.Frequency +} + +func (o *UpdateDlpReportRequest) GetStatus() *DlpReportStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *UpdateDlpReportRequest) GetAutoHideDocs() *bool { + if o == nil { + return nil + } + return o.AutoHideDocs +} + +func (o *UpdateDlpReportRequest) GetReportName() *string { + if o == nil { + return nil + } + return o.ReportName +} diff --git a/tests/mockserver/internal/sdk/models/components/updatedlpreportresponse.go b/tests/mockserver/internal/sdk/models/components/updatedlpreportresponse.go new file mode 100644 index 00000000..beff94eb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/updatedlpreportresponse.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UpdateDlpReportResponse struct { + Result *DlpSimpleResult `json:"result,omitempty"` +} + +func (o *UpdateDlpReportResponse) GetResult() *DlpSimpleResult { + if o == nil { + return nil + } + return o.Result +} diff --git a/tests/mockserver/internal/sdk/models/components/updatedocumentvisibilityoverridesrequest.go b/tests/mockserver/internal/sdk/models/components/updatedocumentvisibilityoverridesrequest.go new file mode 100644 index 00000000..e26ea504 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/updatedocumentvisibilityoverridesrequest.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UpdateDocumentVisibilityOverridesRequest struct { + VisibilityOverrides []DocumentVisibilityOverride `json:"visibilityOverrides,omitempty"` +} + +func (o *UpdateDocumentVisibilityOverridesRequest) GetVisibilityOverrides() []DocumentVisibilityOverride { + if o == nil { + return nil + } + return o.VisibilityOverrides +} diff --git a/tests/mockserver/internal/sdk/models/components/updatedocumentvisibilityoverridesresponse.go b/tests/mockserver/internal/sdk/models/components/updatedocumentvisibilityoverridesresponse.go new file mode 100644 index 00000000..638a1b97 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/updatedocumentvisibilityoverridesresponse.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UpdateDocumentVisibilityOverridesResponse struct { + // The documents and whether their visibility was successfully updated. + Results []DocumentVisibilityUpdateResult `json:"results,omitempty"` +} + +func (o *UpdateDocumentVisibilityOverridesResponse) GetResults() []DocumentVisibilityUpdateResult { + if o == nil { + return nil + } + return o.Results +} diff --git a/tests/mockserver/internal/sdk/models/components/updatepermissionsrequest.go b/tests/mockserver/internal/sdk/models/components/updatepermissionsrequest.go new file mode 100644 index 00000000..a2455c34 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/updatepermissionsrequest.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// UpdatePermissionsRequest - Describes the request body of the /updatepermissions API call +type UpdatePermissionsRequest struct { + Datasource string `json:"datasource"` + // The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _ + ObjectType *string `json:"objectType,omitempty"` + // The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length. + ID *string `json:"id,omitempty"` + // The permalink for viewing the document. **Note: viewURL is a required field if id was not set when uploading the document.**' + // + ViewURL *string `json:"viewURL,omitempty"` + // describes the access control details of the document + Permissions DocumentPermissionsDefinition `json:"permissions"` +} + +func (o *UpdatePermissionsRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *UpdatePermissionsRequest) GetObjectType() *string { + if o == nil { + return nil + } + return o.ObjectType +} + +func (o *UpdatePermissionsRequest) GetID() *string { + if o == nil { + return nil + } + return o.ID +} + +func (o *UpdatePermissionsRequest) GetViewURL() *string { + if o == nil { + return nil + } + return o.ViewURL +} + +func (o *UpdatePermissionsRequest) GetPermissions() DocumentPermissionsDefinition { + if o == nil { + return DocumentPermissionsDefinition{} + } + return o.Permissions +} diff --git a/tests/mockserver/internal/sdk/models/components/updateshortcutrequest.go b/tests/mockserver/internal/sdk/models/components/updateshortcutrequest.go new file mode 100644 index 00000000..e9e8dd98 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/updateshortcutrequest.go @@ -0,0 +1,87 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UpdateShortcutRequest struct { + // The opaque id of the user generated content. + ID int64 `json:"id"` + // Link text following go/ prefix as entered by the user. + InputAlias *string `json:"inputAlias,omitempty"` + // Destination URL for the shortcut. + DestinationURL *string `json:"destinationUrl,omitempty"` + // Glean Document ID for the URL, if known. + DestinationDocumentID *string `json:"destinationDocumentId,omitempty"` + // A short, plain text blurb to help people understand the intent of the shortcut. + Description *string `json:"description,omitempty"` + // Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only. + Unlisted *bool `json:"unlisted,omitempty"` + // For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. + URLTemplate *string `json:"urlTemplate,omitempty"` + // A list of user roles added for the Shortcut. + AddedRoles []UserRoleSpecification `json:"addedRoles,omitempty"` + // A list of user roles removed for the Shortcut. + RemovedRoles []UserRoleSpecification `json:"removedRoles,omitempty"` +} + +func (o *UpdateShortcutRequest) GetID() int64 { + if o == nil { + return 0 + } + return o.ID +} + +func (o *UpdateShortcutRequest) GetInputAlias() *string { + if o == nil { + return nil + } + return o.InputAlias +} + +func (o *UpdateShortcutRequest) GetDestinationURL() *string { + if o == nil { + return nil + } + return o.DestinationURL +} + +func (o *UpdateShortcutRequest) GetDestinationDocumentID() *string { + if o == nil { + return nil + } + return o.DestinationDocumentID +} + +func (o *UpdateShortcutRequest) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *UpdateShortcutRequest) GetUnlisted() *bool { + if o == nil { + return nil + } + return o.Unlisted +} + +func (o *UpdateShortcutRequest) GetURLTemplate() *string { + if o == nil { + return nil + } + return o.URLTemplate +} + +func (o *UpdateShortcutRequest) GetAddedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.AddedRoles +} + +func (o *UpdateShortcutRequest) GetRemovedRoles() []UserRoleSpecification { + if o == nil { + return nil + } + return o.RemovedRoles +} diff --git a/tests/mockserver/internal/sdk/models/components/updateshortcutresponse.go b/tests/mockserver/internal/sdk/models/components/updateshortcutresponse.go new file mode 100644 index 00000000..f4ab9bee --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/updateshortcutresponse.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UpdateShortcutResponse struct { + Shortcut *Shortcut `json:"shortcut,omitempty"` + Error *ShortcutError `json:"error,omitempty"` +} + +func (o *UpdateShortcutResponse) GetShortcut() *Shortcut { + if o == nil { + return nil + } + return o.Shortcut +} + +func (o *UpdateShortcutResponse) GetError() *ShortcutError { + if o == nil { + return nil + } + return o.Error +} diff --git a/tests/mockserver/internal/sdk/models/components/uploadchatfilesrequest.go b/tests/mockserver/internal/sdk/models/components/uploadchatfilesrequest.go new file mode 100644 index 00000000..c431ff9e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/uploadchatfilesrequest.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "io" +) + +type File struct { + FileName string `multipartForm:"name=fileName"` + Content io.Reader `multipartForm:"content"` +} + +func (o *File) GetFileName() string { + if o == nil { + return "" + } + return o.FileName +} + +func (o *File) GetContent() io.Reader { + if o == nil { + return nil + } + return o.Content +} + +type UploadChatFilesRequest struct { + // Raw files to be uploaded for chat in binary format. + Files []File `multipartForm:"name=files"` +} + +func (o *UploadChatFilesRequest) GetFiles() []File { + if o == nil { + return []File{} + } + return o.Files +} diff --git a/tests/mockserver/internal/sdk/models/components/uploadchatfilesresponse.go b/tests/mockserver/internal/sdk/models/components/uploadchatfilesresponse.go new file mode 100644 index 00000000..a10030cf --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/uploadchatfilesresponse.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UploadChatFilesResponse struct { + // Files uploaded for chat. + Files []ChatFile `json:"files,omitempty"` +} + +func (o *UploadChatFilesResponse) GetFiles() []ChatFile { + if o == nil { + return nil + } + return o.Files +} diff --git a/tests/mockserver/internal/sdk/models/components/uploadshortcutsrequest.go b/tests/mockserver/internal/sdk/models/components/uploadshortcutsrequest.go new file mode 100644 index 00000000..4549bec3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/uploadshortcutsrequest.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// UploadShortcutsRequest - Describes the request body of the /uploadshortcuts API call +type UploadShortcutsRequest struct { + // Unique id that must be used for this bulk upload instance + UploadID string `json:"uploadId"` + // true if this is the first page of the upload. Defaults to false + IsFirstPage *bool `json:"isFirstPage,omitempty"` + // true if this is the last page of the upload. Defaults to false + IsLastPage *bool `json:"isLastPage,omitempty"` + // Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true + ForceRestartUpload *bool `json:"forceRestartUpload,omitempty"` + // Batch of shortcuts information + Shortcuts []IndexingShortcut `json:"shortcuts"` +} + +func (o *UploadShortcutsRequest) GetUploadID() string { + if o == nil { + return "" + } + return o.UploadID +} + +func (o *UploadShortcutsRequest) GetIsFirstPage() *bool { + if o == nil { + return nil + } + return o.IsFirstPage +} + +func (o *UploadShortcutsRequest) GetIsLastPage() *bool { + if o == nil { + return nil + } + return o.IsLastPage +} + +func (o *UploadShortcutsRequest) GetForceRestartUpload() *bool { + if o == nil { + return nil + } + return o.ForceRestartUpload +} + +func (o *UploadShortcutsRequest) GetShortcuts() []IndexingShortcut { + if o == nil { + return []IndexingShortcut{} + } + return o.Shortcuts +} diff --git a/tests/mockserver/internal/sdk/models/components/uploadstatusenum.go b/tests/mockserver/internal/sdk/models/components/uploadstatusenum.go new file mode 100644 index 00000000..90546c9d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/uploadstatusenum.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// UploadStatusEnum - Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN +type UploadStatusEnum string + +const ( + UploadStatusEnumUploaded UploadStatusEnum = "UPLOADED" + UploadStatusEnumNotUploaded UploadStatusEnum = "NOT_UPLOADED" + UploadStatusEnumStatusUnknown UploadStatusEnum = "STATUS_UNKNOWN" +) + +func (e UploadStatusEnum) ToPointer() *UploadStatusEnum { + return &e +} +func (e *UploadStatusEnum) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "UPLOADED": + fallthrough + case "NOT_UPLOADED": + fallthrough + case "STATUS_UNKNOWN": + *e = UploadStatusEnum(v) + return nil + default: + return fmt.Errorf("invalid value for UploadStatusEnum: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/user.go b/tests/mockserver/internal/sdk/models/components/user.go new file mode 100644 index 00000000..c9309929 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/user.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type User struct { + // An opaque user ID for the claimed authority (i.e., the actas param, or the origid if actas is not specified). + UserID *string `json:"userID,omitempty"` + // An opaque user ID for the authenticated user (ignores actas). + OrigID *string `json:"origID,omitempty"` +} + +func (o *User) GetUserID() *string { + if o == nil { + return nil + } + return o.UserID +} + +func (o *User) GetOrigID() *string { + if o == nil { + return nil + } + return o.OrigID +} diff --git a/tests/mockserver/internal/sdk/models/components/useractivity.go b/tests/mockserver/internal/sdk/models/components/useractivity.go new file mode 100644 index 00000000..686d1176 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/useractivity.go @@ -0,0 +1,108 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// UserActivityAction - The action for the activity +type UserActivityAction string + +const ( + UserActivityActionAdd UserActivityAction = "ADD" + UserActivityActionAddReminder UserActivityAction = "ADD_REMINDER" + UserActivityActionClick UserActivityAction = "CLICK" + UserActivityActionComment UserActivityAction = "COMMENT" + UserActivityActionDelete UserActivityAction = "DELETE" + UserActivityActionDismiss UserActivityAction = "DISMISS" + UserActivityActionEdit UserActivityAction = "EDIT" + UserActivityActionMention UserActivityAction = "MENTION" + UserActivityActionMove UserActivityAction = "MOVE" + UserActivityActionOther UserActivityAction = "OTHER" + UserActivityActionRestore UserActivityAction = "RESTORE" + UserActivityActionUnknown UserActivityAction = "UNKNOWN" + UserActivityActionVerify UserActivityAction = "VERIFY" + UserActivityActionView UserActivityAction = "VIEW" +) + +func (e UserActivityAction) ToPointer() *UserActivityAction { + return &e +} +func (e *UserActivityAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADD": + fallthrough + case "ADD_REMINDER": + fallthrough + case "CLICK": + fallthrough + case "COMMENT": + fallthrough + case "DELETE": + fallthrough + case "DISMISS": + fallthrough + case "EDIT": + fallthrough + case "MENTION": + fallthrough + case "MOVE": + fallthrough + case "OTHER": + fallthrough + case "RESTORE": + fallthrough + case "UNKNOWN": + fallthrough + case "VERIFY": + fallthrough + case "VIEW": + *e = UserActivityAction(v) + return nil + default: + return fmt.Errorf("invalid value for UserActivityAction: %v", v) + } +} + +type UserActivity struct { + Actor *Person `json:"actor,omitempty"` + // Unix timestamp of the activity (in seconds since epoch UTC). + Timestamp *int64 `json:"timestamp,omitempty"` + // The action for the activity + Action *UserActivityAction `json:"action,omitempty"` + AggregateVisitCount *CountInfo `json:"aggregateVisitCount,omitempty"` +} + +func (o *UserActivity) GetActor() *Person { + if o == nil { + return nil + } + return o.Actor +} + +func (o *UserActivity) GetTimestamp() *int64 { + if o == nil { + return nil + } + return o.Timestamp +} + +func (o *UserActivity) GetAction() *UserActivityAction { + if o == nil { + return nil + } + return o.Action +} + +func (o *UserActivity) GetAggregateVisitCount() *CountInfo { + if o == nil { + return nil + } + return o.AggregateVisitCount +} diff --git a/tests/mockserver/internal/sdk/models/components/useractivityinsight.go b/tests/mockserver/internal/sdk/models/components/useractivityinsight.go new file mode 100644 index 00000000..ef7cc879 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/useractivityinsight.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ActivityEnum - Activity e.g. search, home page visit or all. +type ActivityEnum string + +const ( + ActivityEnumAll ActivityEnum = "ALL" + ActivityEnumSearch ActivityEnum = "SEARCH" +) + +func (e ActivityEnum) ToPointer() *ActivityEnum { + return &e +} +func (e *ActivityEnum) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ALL": + fallthrough + case "SEARCH": + *e = ActivityEnum(v) + return nil + default: + return fmt.Errorf("invalid value for ActivityEnum: %v", v) + } +} + +type UserActivityInsight struct { + User Person `json:"user"` + // Activity e.g. search, home page visit or all. + Activity ActivityEnum `json:"activity"` + // Unix timestamp of the last activity (in seconds since epoch UTC). + LastActivityTimestamp *int64 `json:"lastActivityTimestamp,omitempty"` + ActivityCount *CountInfo `json:"activityCount,omitempty"` + ActiveDayCount *CountInfo `json:"activeDayCount,omitempty"` +} + +func (o *UserActivityInsight) GetUser() Person { + if o == nil { + return Person{} + } + return o.User +} + +func (o *UserActivityInsight) GetActivity() ActivityEnum { + if o == nil { + return ActivityEnum("") + } + return o.Activity +} + +func (o *UserActivityInsight) GetLastActivityTimestamp() *int64 { + if o == nil { + return nil + } + return o.LastActivityTimestamp +} + +func (o *UserActivityInsight) GetActivityCount() *CountInfo { + if o == nil { + return nil + } + return o.ActivityCount +} + +func (o *UserActivityInsight) GetActiveDayCount() *CountInfo { + if o == nil { + return nil + } + return o.ActiveDayCount +} diff --git a/tests/mockserver/internal/sdk/models/components/usergeneratedcontentid.go b/tests/mockserver/internal/sdk/models/components/usergeneratedcontentid.go new file mode 100644 index 00000000..e8db0dae --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/usergeneratedcontentid.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UserGeneratedContentID struct { + // The opaque id of the user generated content. + ID *int64 `json:"id,omitempty"` +} + +func (o *UserGeneratedContentID) GetID() *int64 { + if o == nil { + return nil + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/userinsightsresponse.go b/tests/mockserver/internal/sdk/models/components/userinsightsresponse.go new file mode 100644 index 00000000..2fb26d2f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/userinsightsresponse.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UserInsightsResponse struct { + // Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). + LastLogTimestamp *int64 `json:"lastLogTimestamp,omitempty"` + // Insights for all active users with respect to set of actions. + ActivityInsights []UserActivityInsight `json:"activityInsights,omitempty"` + // Insights for all in inactive users with respect to set of actions and time period. Activity count will be set to 0. + InactiveInsights []UserActivityInsight `json:"inactiveInsights,omitempty"` + // Total number of teammates that have logged in to the product, that are still valid teammates. + TotalTeammates *int64 `json:"totalTeammates,omitempty"` + // Total number of active users in the requested period. + TotalActiveUsers *int64 `json:"totalActiveUsers,omitempty"` + // list of departments applicable for users tab. + Departments []string `json:"departments,omitempty"` +} + +func (o *UserInsightsResponse) GetLastLogTimestamp() *int64 { + if o == nil { + return nil + } + return o.LastLogTimestamp +} + +func (o *UserInsightsResponse) GetActivityInsights() []UserActivityInsight { + if o == nil { + return nil + } + return o.ActivityInsights +} + +func (o *UserInsightsResponse) GetInactiveInsights() []UserActivityInsight { + if o == nil { + return nil + } + return o.InactiveInsights +} + +func (o *UserInsightsResponse) GetTotalTeammates() *int64 { + if o == nil { + return nil + } + return o.TotalTeammates +} + +func (o *UserInsightsResponse) GetTotalActiveUsers() *int64 { + if o == nil { + return nil + } + return o.TotalActiveUsers +} + +func (o *UserInsightsResponse) GetDepartments() []string { + if o == nil { + return nil + } + return o.Departments +} diff --git a/tests/mockserver/internal/sdk/models/components/userreferencedefinition.go b/tests/mockserver/internal/sdk/models/components/userreferencedefinition.go new file mode 100644 index 00000000..29153dad --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/userreferencedefinition.go @@ -0,0 +1,32 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// UserReferenceDefinition - Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. +type UserReferenceDefinition struct { + Email *string `json:"email,omitempty"` + // some datasources refer to the user by the datasource user id in the document + DatasourceUserID *string `json:"datasourceUserId,omitempty"` + Name *string `json:"name,omitempty"` +} + +func (o *UserReferenceDefinition) GetEmail() *string { + if o == nil { + return nil + } + return o.Email +} + +func (o *UserReferenceDefinition) GetDatasourceUserID() *string { + if o == nil { + return nil + } + return o.DatasourceUserID +} + +func (o *UserReferenceDefinition) GetName() *string { + if o == nil { + return nil + } + return o.Name +} diff --git a/tests/mockserver/internal/sdk/models/components/userrole.go b/tests/mockserver/internal/sdk/models/components/userrole.go new file mode 100644 index 00000000..7697e0b0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/userrole.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// UserRole - A user's role with respect to a specific document. +type UserRole string + +const ( + UserRoleOwner UserRole = "OWNER" + UserRoleViewer UserRole = "VIEWER" + UserRoleAnswerModerator UserRole = "ANSWER_MODERATOR" + UserRoleEditor UserRole = "EDITOR" + UserRoleVerifier UserRole = "VERIFIER" +) + +func (e UserRole) ToPointer() *UserRole { + return &e +} +func (e *UserRole) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "OWNER": + fallthrough + case "VIEWER": + fallthrough + case "ANSWER_MODERATOR": + fallthrough + case "EDITOR": + fallthrough + case "VERIFIER": + *e = UserRole(v) + return nil + default: + return fmt.Errorf("invalid value for UserRole: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/userrolespecification.go b/tests/mockserver/internal/sdk/models/components/userrolespecification.go new file mode 100644 index 00000000..8e4fd68d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/userrolespecification.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UserRoleSpecification struct { + SourceDocumentSpec *DocumentSpecUnion `json:"sourceDocumentSpec,omitempty"` + Person *Person `json:"person,omitempty"` + Group *Group `json:"group,omitempty"` + // A user's role with respect to a specific document. + Role UserRole `json:"role"` +} + +func (o *UserRoleSpecification) GetSourceDocumentSpec() *DocumentSpecUnion { + if o == nil { + return nil + } + return o.SourceDocumentSpec +} + +func (o *UserRoleSpecification) GetPerson() *Person { + if o == nil { + return nil + } + return o.Person +} + +func (o *UserRoleSpecification) GetGroup() *Group { + if o == nil { + return nil + } + return o.Group +} + +func (o *UserRoleSpecification) GetRole() UserRole { + if o == nil { + return UserRole("") + } + return o.Role +} diff --git a/tests/mockserver/internal/sdk/models/components/userstatusresponse.go b/tests/mockserver/internal/sdk/models/components/userstatusresponse.go new file mode 100644 index 00000000..7457001c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/userstatusresponse.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// UserStatusResponse - Describes the user status response body +type UserStatusResponse struct { + // Whether the user is active or not + IsActiveUser *bool `json:"isActiveUser,omitempty"` + // Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN + UploadStatus *UploadStatusEnum `json:"uploadStatus,omitempty"` + // Time of last successful upload for the user, in ISO 8601 format + LastUploadedAt *string `json:"lastUploadedAt,omitempty"` +} + +func (o *UserStatusResponse) GetIsActiveUser() *bool { + if o == nil { + return nil + } + return o.IsActiveUser +} + +func (o *UserStatusResponse) GetUploadStatus() *UploadStatusEnum { + if o == nil { + return nil + } + return o.UploadStatus +} + +func (o *UserStatusResponse) GetLastUploadedAt() *string { + if o == nil { + return nil + } + return o.LastUploadedAt +} diff --git a/tests/mockserver/internal/sdk/models/components/userviewinfo.go b/tests/mockserver/internal/sdk/models/components/userviewinfo.go new file mode 100644 index 00000000..e256289a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/userviewinfo.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type UserViewInfo struct { + // Unique Glean Document ID of the associated document. + DocID *string `json:"docId,omitempty"` + // Title of associated document. + DocTitle *string `json:"docTitle,omitempty"` + // URL of associated document. + DocURL *string `json:"docUrl,omitempty"` +} + +func (o *UserViewInfo) GetDocID() *string { + if o == nil { + return nil + } + return o.DocID +} + +func (o *UserViewInfo) GetDocTitle() *string { + if o == nil { + return nil + } + return o.DocTitle +} + +func (o *UserViewInfo) GetDocURL() *string { + if o == nil { + return nil + } + return o.DocURL +} diff --git a/tests/mockserver/internal/sdk/models/components/verification.go b/tests/mockserver/internal/sdk/models/components/verification.go new file mode 100644 index 00000000..363532a4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/verification.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// State - The verification state for the document. +type State string + +const ( + StateUnverified State = "UNVERIFIED" + StateVerified State = "VERIFIED" + StateDeprecated State = "DEPRECATED" +) + +func (e State) ToPointer() *State { + return &e +} +func (e *State) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "UNVERIFIED": + fallthrough + case "VERIFIED": + fallthrough + case "DEPRECATED": + *e = State(v) + return nil + default: + return fmt.Errorf("invalid value for State: %v", v) + } +} + +type Verification struct { + // The verification state for the document. + State State `json:"state"` + Metadata *VerificationMetadata `json:"metadata,omitempty"` +} + +func (o *Verification) GetState() State { + if o == nil { + return State("") + } + return o.State +} + +func (o *Verification) GetMetadata() *VerificationMetadata { + if o == nil { + return nil + } + return o.Metadata +} diff --git a/tests/mockserver/internal/sdk/models/components/verificationfeed.go b/tests/mockserver/internal/sdk/models/components/verificationfeed.go new file mode 100644 index 00000000..74a08b65 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/verificationfeed.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type VerificationFeed struct { + // List of document infos that include verification related information for them. + Documents []Verification `json:"documents,omitempty"` +} + +func (o *VerificationFeed) GetDocuments() []Verification { + if o == nil { + return nil + } + return o.Documents +} diff --git a/tests/mockserver/internal/sdk/models/components/verificationmetadata.go b/tests/mockserver/internal/sdk/models/components/verificationmetadata.go new file mode 100644 index 00000000..d91c6310 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/verificationmetadata.go @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type VerificationMetadata struct { + LastVerifier *Person `json:"lastVerifier,omitempty"` + // The unix timestamp of the verification (in seconds since epoch UTC). + LastVerificationTs *int64 `json:"lastVerificationTs,omitempty"` + // The unix timestamp of the verification expiration if applicable (in seconds since epoch UTC). + ExpirationTs *int64 `json:"expirationTs,omitempty"` + Document *Document `json:"document,omitempty"` + // Info about all outstanding verification reminders for the document if exists. + Reminders []Reminder `json:"reminders,omitempty"` + LastReminder *Reminder `json:"lastReminder,omitempty"` + // Number of visitors to the document during included time periods. + VisitorCount []CountInfo `json:"visitorCount,omitempty"` + // List of potential verifiers for the document e.g. old verifiers and/or users with view/edit permissions. + CandidateVerifiers []Person `json:"candidateVerifiers,omitempty"` +} + +func (o *VerificationMetadata) GetLastVerifier() *Person { + if o == nil { + return nil + } + return o.LastVerifier +} + +func (o *VerificationMetadata) GetLastVerificationTs() *int64 { + if o == nil { + return nil + } + return o.LastVerificationTs +} + +func (o *VerificationMetadata) GetExpirationTs() *int64 { + if o == nil { + return nil + } + return o.ExpirationTs +} + +func (o *VerificationMetadata) GetDocument() *Document { + if o == nil { + return nil + } + return o.Document +} + +func (o *VerificationMetadata) GetReminders() []Reminder { + if o == nil { + return nil + } + return o.Reminders +} + +func (o *VerificationMetadata) GetLastReminder() *Reminder { + if o == nil { + return nil + } + return o.LastReminder +} + +func (o *VerificationMetadata) GetVisitorCount() []CountInfo { + if o == nil { + return nil + } + return o.VisitorCount +} + +func (o *VerificationMetadata) GetCandidateVerifiers() []Person { + if o == nil { + return nil + } + return o.CandidateVerifiers +} diff --git a/tests/mockserver/internal/sdk/models/components/verifyrequest.go b/tests/mockserver/internal/sdk/models/components/verifyrequest.go new file mode 100644 index 00000000..18059e0b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/verifyrequest.go @@ -0,0 +1,59 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// VerifyRequestAction - The verification action requested. +type VerifyRequestAction string + +const ( + VerifyRequestActionVerify VerifyRequestAction = "VERIFY" + VerifyRequestActionDeprecate VerifyRequestAction = "DEPRECATE" + VerifyRequestActionUnverify VerifyRequestAction = "UNVERIFY" +) + +func (e VerifyRequestAction) ToPointer() *VerifyRequestAction { + return &e +} +func (e *VerifyRequestAction) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "VERIFY": + fallthrough + case "DEPRECATE": + fallthrough + case "UNVERIFY": + *e = VerifyRequestAction(v) + return nil + default: + return fmt.Errorf("invalid value for VerifyRequestAction: %v", v) + } +} + +type VerifyRequest struct { + // The document which is verified. + DocumentID string `json:"documentId"` + // The verification action requested. + Action *VerifyRequestAction `json:"action,omitempty"` +} + +func (o *VerifyRequest) GetDocumentID() string { + if o == nil { + return "" + } + return o.DocumentID +} + +func (o *VerifyRequest) GetAction() *VerifyRequestAction { + if o == nil { + return nil + } + return o.Action +} diff --git a/tests/mockserver/internal/sdk/models/components/viewerinfo.go b/tests/mockserver/internal/sdk/models/components/viewerinfo.go new file mode 100644 index 00000000..ec85917b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/viewerinfo.go @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" + "time" +) + +// Role - DEPRECATED - use permissions instead. Viewer's role on the specific document. +// +// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. +type Role string + +const ( + RoleAnswerModerator Role = "ANSWER_MODERATOR" + RoleOwner Role = "OWNER" + RoleViewer Role = "VIEWER" +) + +func (e Role) ToPointer() *Role { + return &e +} +func (e *Role) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ANSWER_MODERATOR": + fallthrough + case "OWNER": + fallthrough + case "VIEWER": + *e = Role(v) + return nil + default: + return fmt.Errorf("invalid value for Role: %v", v) + } +} + +type ViewerInfo struct { + // DEPRECATED - use permissions instead. Viewer's role on the specific document. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + Role *Role `json:"role,omitempty"` + LastViewedTime *time.Time `json:"lastViewedTime,omitempty"` +} + +func (v ViewerInfo) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(v, "", false) +} + +func (v *ViewerInfo) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &v, "", false, false); err != nil { + return err + } + return nil +} + +func (o *ViewerInfo) GetRole() *Role { + if o == nil { + return nil + } + return o.Role +} + +func (o *ViewerInfo) GetLastViewedTime() *time.Time { + if o == nil { + return nil + } + return o.LastViewedTime +} diff --git a/tests/mockserver/internal/sdk/models/components/workflow.go b/tests/mockserver/internal/sdk/models/components/workflow.go new file mode 100644 index 00000000..4d9b678b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/workflow.go @@ -0,0 +1,66 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type Workflow struct { + // The name of the workflow. + Name *string `json:"name,omitempty"` + Author *Person `json:"author,omitempty"` + // Server Unix timestamp of the creation time. + CreateTimestamp *int64 `json:"createTimestamp,omitempty"` + // Server Unix timestamp of the last update time. + LastUpdateTimestamp *int64 `json:"lastUpdateTimestamp,omitempty"` + LastUpdatedBy *Person `json:"lastUpdatedBy,omitempty"` + Permissions *ObjectPermissions `json:"permissions,omitempty"` + // The ID of the workflow. + ID *string `json:"id,omitempty"` +} + +func (o *Workflow) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *Workflow) GetAuthor() *Person { + if o == nil { + return nil + } + return o.Author +} + +func (o *Workflow) GetCreateTimestamp() *int64 { + if o == nil { + return nil + } + return o.CreateTimestamp +} + +func (o *Workflow) GetLastUpdateTimestamp() *int64 { + if o == nil { + return nil + } + return o.LastUpdateTimestamp +} + +func (o *Workflow) GetLastUpdatedBy() *Person { + if o == nil { + return nil + } + return o.LastUpdatedBy +} + +func (o *Workflow) GetPermissions() *ObjectPermissions { + if o == nil { + return nil + } + return o.Permissions +} + +func (o *Workflow) GetID() *string { + if o == nil { + return nil + } + return o.ID +} diff --git a/tests/mockserver/internal/sdk/models/components/workflowfeedbackinfo.go b/tests/mockserver/internal/sdk/models/components/workflowfeedbackinfo.go new file mode 100644 index 00000000..e13579ac --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/workflowfeedbackinfo.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// WorkflowFeedbackInfoSource - Where the feedback of the workflow originated from +type WorkflowFeedbackInfoSource string + +const ( + WorkflowFeedbackInfoSourceZeroState WorkflowFeedbackInfoSource = "ZERO_STATE" + WorkflowFeedbackInfoSourceLibrary WorkflowFeedbackInfoSource = "LIBRARY" + WorkflowFeedbackInfoSourceHomepage WorkflowFeedbackInfoSource = "HOMEPAGE" +) + +func (e WorkflowFeedbackInfoSource) ToPointer() *WorkflowFeedbackInfoSource { + return &e +} +func (e *WorkflowFeedbackInfoSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ZERO_STATE": + fallthrough + case "LIBRARY": + fallthrough + case "HOMEPAGE": + *e = WorkflowFeedbackInfoSource(v) + return nil + default: + return fmt.Errorf("invalid value for WorkflowFeedbackInfoSource: %v", v) + } +} + +type WorkflowFeedbackInfo struct { + // Where the feedback of the workflow originated from + Source *WorkflowFeedbackInfoSource `json:"source,omitempty"` +} + +func (o *WorkflowFeedbackInfo) GetSource() *WorkflowFeedbackInfoSource { + if o == nil { + return nil + } + return o.Source +} diff --git a/tests/mockserver/internal/sdk/models/components/workflowresult.go b/tests/mockserver/internal/sdk/models/components/workflowresult.go new file mode 100644 index 00000000..63529735 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/workflowresult.go @@ -0,0 +1,14 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type WorkflowResult struct { + Workflow Workflow `json:"workflow"` +} + +func (o *WorkflowResult) GetWorkflow() Workflow { + if o == nil { + return Workflow{} + } + return o.Workflow +} diff --git a/tests/mockserver/internal/sdk/models/components/writeactionparameter.go b/tests/mockserver/internal/sdk/models/components/writeactionparameter.go new file mode 100644 index 00000000..de5e3bb3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/writeactionparameter.go @@ -0,0 +1,98 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// WriteActionParameterType - The type of the value (e.g., integer, string, boolean, etc.) +type WriteActionParameterType string + +const ( + WriteActionParameterTypeUnknown WriteActionParameterType = "UNKNOWN" + WriteActionParameterTypeInteger WriteActionParameterType = "INTEGER" + WriteActionParameterTypeString WriteActionParameterType = "STRING" + WriteActionParameterTypeBoolean WriteActionParameterType = "BOOLEAN" +) + +func (e WriteActionParameterType) ToPointer() *WriteActionParameterType { + return &e +} +func (e *WriteActionParameterType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "UNKNOWN": + fallthrough + case "INTEGER": + fallthrough + case "STRING": + fallthrough + case "BOOLEAN": + *e = WriteActionParameterType(v) + return nil + default: + return fmt.Errorf("invalid value for WriteActionParameterType: %v", v) + } +} + +type WriteActionParameter struct { + // The type of the value (e.g., integer, string, boolean, etc.) + Type *WriteActionParameterType `json:"type,omitempty"` + // Human readable display name for the key. + DisplayName *string `json:"displayName,omitempty"` + // The value of the field. + Value *string `json:"value,omitempty"` + // Is the parameter a required field. + IsRequired *bool `json:"isRequired,omitempty"` + // Description of the parameter. + Description *string `json:"description,omitempty"` + // Possible values that the parameter can take. + PossibleValues []PossibleValue `json:"possibleValues,omitempty"` +} + +func (o *WriteActionParameter) GetType() *WriteActionParameterType { + if o == nil { + return nil + } + return o.Type +} + +func (o *WriteActionParameter) GetDisplayName() *string { + if o == nil { + return nil + } + return o.DisplayName +} + +func (o *WriteActionParameter) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *WriteActionParameter) GetIsRequired() *bool { + if o == nil { + return nil + } + return o.IsRequired +} + +func (o *WriteActionParameter) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *WriteActionParameter) GetPossibleValues() []PossibleValue { + if o == nil { + return nil + } + return o.PossibleValues +} diff --git a/tests/mockserver/internal/sdk/models/components/writepermission.go b/tests/mockserver/internal/sdk/models/components/writepermission.go new file mode 100644 index 00000000..b0c6e1ab --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/writepermission.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// WritePermission - Describes the write permissions levels that a user has for a specific feature +type WritePermission struct { + // Describes the scope for a ReadPermission, WritePermission, or GrantPermission object + ScopeType *ScopeType `json:"scopeType,omitempty"` + // True if user has create permission for this feature and scope + Create *bool `json:"create,omitempty"` + // True if user has update permission for this feature and scope + Update *bool `json:"update,omitempty"` + // True if user has delete permission for this feature and scope + Delete *bool `json:"delete,omitempty"` +} + +func (o *WritePermission) GetScopeType() *ScopeType { + if o == nil { + return nil + } + return o.ScopeType +} + +func (o *WritePermission) GetCreate() *bool { + if o == nil { + return nil + } + return o.Create +} + +func (o *WritePermission) GetUpdate() *bool { + if o == nil { + return nil + } + return o.Update +} + +func (o *WritePermission) GetDelete() *bool { + if o == nil { + return nil + } + return o.Delete +} diff --git a/tests/mockserver/internal/sdk/models/operations/activity.go b/tests/mockserver/internal/sdk/models/operations/activity.go new file mode 100644 index 00000000..fbeadfb6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/activity.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ActivityResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *ActivityResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/addcollectionitems.go b/tests/mockserver/internal/sdk/models/operations/addcollectionitems.go new file mode 100644 index 00000000..fd74638a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/addcollectionitems.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type AddcollectionitemsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + AddCollectionItemsResponse *components.AddCollectionItemsResponse +} + +func (o *AddcollectionitemsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *AddcollectionitemsResponse) GetAddCollectionItemsResponse() *components.AddCollectionItemsResponse { + if o == nil { + return nil + } + return o.AddCollectionItemsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/addverificationreminder.go b/tests/mockserver/internal/sdk/models/operations/addverificationreminder.go new file mode 100644 index 00000000..fb8ab5ad --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/addverificationreminder.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type AddverificationreminderResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + Verification *components.Verification +} + +func (o *AddverificationreminderResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *AddverificationreminderResponse) GetVerification() *components.Verification { + if o == nil { + return nil + } + return o.Verification +} diff --git a/tests/mockserver/internal/sdk/models/operations/adminsearch.go b/tests/mockserver/internal/sdk/models/operations/adminsearch.go new file mode 100644 index 00000000..3a9fc431 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/adminsearch.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type AdminsearchResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + SearchResponse *components.SearchResponse +} + +func (o *AdminsearchResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *AdminsearchResponse) GetSearchResponse() *components.SearchResponse { + if o == nil { + return nil + } + return o.SearchResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/autocomplete.go b/tests/mockserver/internal/sdk/models/operations/autocomplete.go new file mode 100644 index 00000000..106f5474 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/autocomplete.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type AutocompleteResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + AutocompleteResponse *components.AutocompleteResponse +} + +func (o *AutocompleteResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *AutocompleteResponse) GetAutocompleteResponse() *components.AutocompleteResponse { + if o == nil { + return nil + } + return o.AutocompleteResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/chat.go b/tests/mockserver/internal/sdk/models/operations/chat.go new file mode 100644 index 00000000..4f0f7fb1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/chat.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ChatRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + // Includes chat history for Glean AI to respond to. + ChatRequest components.ChatRequest `request:"mediaType=application/json"` +} + +func (o *ChatRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *ChatRequest) GetChatRequest() components.ChatRequest { + if o == nil { + return components.ChatRequest{} + } + return o.ChatRequest +} + +type ChatResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + ChatResponse *components.ChatResponse +} + +func (o *ChatResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ChatResponse) GetChatResponse() *components.ChatResponse { + if o == nil { + return nil + } + return o.ChatResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/chatstream.go b/tests/mockserver/internal/sdk/models/operations/chatstream.go new file mode 100644 index 00000000..a8d81d42 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/chatstream.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ChatStreamRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + // Includes chat history for Glean AI to respond to. + ChatRequest components.ChatRequest `request:"mediaType=application/json"` +} + +func (o *ChatStreamRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *ChatStreamRequest) GetChatRequest() components.ChatRequest { + if o == nil { + return components.ChatRequest{} + } + return o.ChatRequest +} + +type ChatStreamResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + ChatRequestStream *string +} + +func (o *ChatStreamResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ChatStreamResponse) GetChatRequestStream() *string { + if o == nil { + return nil + } + return o.ChatRequestStream +} diff --git a/tests/mockserver/internal/sdk/models/operations/createandstreamrun.go b/tests/mockserver/internal/sdk/models/operations/createandstreamrun.go new file mode 100644 index 00000000..0dbe446c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/createandstreamrun.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreateAndStreamRunResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Success + Res *string +} + +func (o *CreateAndStreamRunResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateAndStreamRunResponse) GetRes() *string { + if o == nil { + return nil + } + return o.Res +} diff --git a/tests/mockserver/internal/sdk/models/operations/createandwaitrun.go b/tests/mockserver/internal/sdk/models/operations/createandwaitrun.go new file mode 100644 index 00000000..7286ef64 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/createandwaitrun.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreateAndWaitRunResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Success + AgentRunWaitResponse *components.AgentRunWaitResponse +} + +func (o *CreateAndWaitRunResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateAndWaitRunResponse) GetAgentRunWaitResponse() *components.AgentRunWaitResponse { + if o == nil { + return nil + } + return o.AgentRunWaitResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/createannouncement.go b/tests/mockserver/internal/sdk/models/operations/createannouncement.go new file mode 100644 index 00000000..86d9ba17 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/createannouncement.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreateannouncementResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + Announcement *components.Announcement +} + +func (o *CreateannouncementResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateannouncementResponse) GetAnnouncement() *components.Announcement { + if o == nil { + return nil + } + return o.Announcement +} diff --git a/tests/mockserver/internal/sdk/models/operations/createanswer.go b/tests/mockserver/internal/sdk/models/operations/createanswer.go new file mode 100644 index 00000000..8abc5c94 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/createanswer.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreateanswerResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + Answer *components.Answer +} + +func (o *CreateanswerResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateanswerResponse) GetAnswer() *components.Answer { + if o == nil { + return nil + } + return o.Answer +} diff --git a/tests/mockserver/internal/sdk/models/operations/createauthtoken.go b/tests/mockserver/internal/sdk/models/operations/createauthtoken.go new file mode 100644 index 00000000..be32a0f3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/createauthtoken.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreateauthtokenResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + CreateAuthTokenResponse *components.CreateAuthTokenResponse +} + +func (o *CreateauthtokenResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateauthtokenResponse) GetCreateAuthTokenResponse() *components.CreateAuthTokenResponse { + if o == nil { + return nil + } + return o.CreateAuthTokenResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/createcollection.go b/tests/mockserver/internal/sdk/models/operations/createcollection.go new file mode 100644 index 00000000..f4d44e36 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/createcollection.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreatecollectionResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + CreateCollectionResponse *components.CreateCollectionResponse +} + +func (o *CreatecollectionResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreatecollectionResponse) GetCreateCollectionResponse() *components.CreateCollectionResponse { + if o == nil { + return nil + } + return o.CreateCollectionResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/createpolicy.go b/tests/mockserver/internal/sdk/models/operations/createpolicy.go new file mode 100644 index 00000000..d0c5b8e1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/createpolicy.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreatepolicyResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + CreateDlpReportResponse *components.CreateDlpReportResponse +} + +func (o *CreatepolicyResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreatepolicyResponse) GetCreateDlpReportResponse() *components.CreateDlpReportResponse { + if o == nil { + return nil + } + return o.CreateDlpReportResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/createreport.go b/tests/mockserver/internal/sdk/models/operations/createreport.go new file mode 100644 index 00000000..7a9d07ab --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/createreport.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreatereportResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + UpdateDlpConfigResponse *components.UpdateDlpConfigResponse +} + +func (o *CreatereportResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreatereportResponse) GetUpdateDlpConfigResponse() *components.UpdateDlpConfigResponse { + if o == nil { + return nil + } + return o.UpdateDlpConfigResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/createshortcut.go b/tests/mockserver/internal/sdk/models/operations/createshortcut.go new file mode 100644 index 00000000..b17cc638 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/createshortcut.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreateshortcutResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + CreateShortcutResponse *components.CreateShortcutResponse +} + +func (o *CreateshortcutResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateshortcutResponse) GetCreateShortcutResponse() *components.CreateShortcutResponse { + if o == nil { + return nil + } + return o.CreateShortcutResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/deleteallchats.go b/tests/mockserver/internal/sdk/models/operations/deleteallchats.go new file mode 100644 index 00000000..d28cebb1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/deleteallchats.go @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteallchatsRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` +} + +func (o *DeleteallchatsRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +type DeleteallchatsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteallchatsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/deleteannouncement.go b/tests/mockserver/internal/sdk/models/operations/deleteannouncement.go new file mode 100644 index 00000000..774b4d1f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/deleteannouncement.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteannouncementResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteannouncementResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/deleteanswer.go b/tests/mockserver/internal/sdk/models/operations/deleteanswer.go new file mode 100644 index 00000000..46b181b2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/deleteanswer.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteanswerResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteanswerResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/deletechatfiles.go b/tests/mockserver/internal/sdk/models/operations/deletechatfiles.go new file mode 100644 index 00000000..0d3acc15 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/deletechatfiles.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeletechatfilesRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + DeleteChatFilesRequest components.DeleteChatFilesRequest `request:"mediaType=application/json"` +} + +func (o *DeletechatfilesRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *DeletechatfilesRequest) GetDeleteChatFilesRequest() components.DeleteChatFilesRequest { + if o == nil { + return components.DeleteChatFilesRequest{} + } + return o.DeleteChatFilesRequest +} + +type DeletechatfilesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeletechatfilesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/deletechats.go b/tests/mockserver/internal/sdk/models/operations/deletechats.go new file mode 100644 index 00000000..a3f3f497 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/deletechats.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeletechatsRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + DeleteChatsRequest components.DeleteChatsRequest `request:"mediaType=application/json"` +} + +func (o *DeletechatsRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *DeletechatsRequest) GetDeleteChatsRequest() components.DeleteChatsRequest { + if o == nil { + return components.DeleteChatsRequest{} + } + return o.DeleteChatsRequest +} + +type DeletechatsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeletechatsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/deletecollection.go b/tests/mockserver/internal/sdk/models/operations/deletecollection.go new file mode 100644 index 00000000..b21f01fa --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/deletecollection.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeletecollectionResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeletecollectionResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/deletecollectionitem.go b/tests/mockserver/internal/sdk/models/operations/deletecollectionitem.go new file mode 100644 index 00000000..f9b6a404 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/deletecollectionitem.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeletecollectionitemResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + DeleteCollectionItemResponse *components.DeleteCollectionItemResponse +} + +func (o *DeletecollectionitemResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *DeletecollectionitemResponse) GetDeleteCollectionItemResponse() *components.DeleteCollectionItemResponse { + if o == nil { + return nil + } + return o.DeleteCollectionItemResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/deleteshortcut.go b/tests/mockserver/internal/sdk/models/operations/deleteshortcut.go new file mode 100644 index 00000000..03a740b6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/deleteshortcut.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DeleteshortcutResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *DeleteshortcutResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/downloadpolicycsv.go b/tests/mockserver/internal/sdk/models/operations/downloadpolicycsv.go new file mode 100644 index 00000000..f11d56e2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/downloadpolicycsv.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DownloadpolicycsvRequest struct { + // The id of the policy to download violations for. + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (o *DownloadpolicycsvRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type DownloadpolicycsvResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Downloads csv of batch policy violations. + Res *string +} + +func (o *DownloadpolicycsvResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *DownloadpolicycsvResponse) GetRes() *string { + if o == nil { + return nil + } + return o.Res +} diff --git a/tests/mockserver/internal/sdk/models/operations/downloadreportcsv.go b/tests/mockserver/internal/sdk/models/operations/downloadreportcsv.go new file mode 100644 index 00000000..40814b93 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/downloadreportcsv.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type DownloadreportcsvRequest struct { + // The id of the report to download violations for. + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (o *DownloadreportcsvRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type DownloadreportcsvResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Downloads csv of one-time report violations. + Res *string +} + +func (o *DownloadreportcsvResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *DownloadreportcsvResponse) GetRes() *string { + if o == nil { + return nil + } + return o.Res +} diff --git a/tests/mockserver/internal/sdk/models/operations/editanswer.go b/tests/mockserver/internal/sdk/models/operations/editanswer.go new file mode 100644 index 00000000..92a67c43 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/editanswer.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type EditanswerResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + Answer *components.Answer +} + +func (o *EditanswerResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *EditanswerResponse) GetAnswer() *components.Answer { + if o == nil { + return nil + } + return o.Answer +} diff --git a/tests/mockserver/internal/sdk/models/operations/editcollection.go b/tests/mockserver/internal/sdk/models/operations/editcollection.go new file mode 100644 index 00000000..6b17b377 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/editcollection.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type EditcollectionResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + EditCollectionResponse *components.EditCollectionResponse +} + +func (o *EditcollectionResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *EditcollectionResponse) GetEditCollectionResponse() *components.EditCollectionResponse { + if o == nil { + return nil + } + return o.EditCollectionResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/editcollectionitem.go b/tests/mockserver/internal/sdk/models/operations/editcollectionitem.go new file mode 100644 index 00000000..8ac9f5a9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/editcollectionitem.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type EditcollectionitemResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + EditCollectionItemResponse *components.EditCollectionItemResponse +} + +func (o *EditcollectionitemResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *EditcollectionitemResponse) GetEditCollectionItemResponse() *components.EditCollectionItemResponse { + if o == nil { + return nil + } + return o.EditCollectionItemResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/editpin.go b/tests/mockserver/internal/sdk/models/operations/editpin.go new file mode 100644 index 00000000..921ea93c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/editpin.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type EditpinResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + PinDocument *components.PinDocument +} + +func (o *EditpinResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *EditpinResponse) GetPinDocument() *components.PinDocument { + if o == nil { + return nil + } + return o.PinDocument +} diff --git a/tests/mockserver/internal/sdk/models/operations/feed.go b/tests/mockserver/internal/sdk/models/operations/feed.go new file mode 100644 index 00000000..1d0cbfbf --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/feed.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type FeedResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + FeedResponse *components.FeedResponse +} + +func (o *FeedResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *FeedResponse) GetFeedResponse() *components.FeedResponse { + if o == nil { + return nil + } + return o.FeedResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/feedback.go b/tests/mockserver/internal/sdk/models/operations/feedback.go new file mode 100644 index 00000000..e81f65fc --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/feedback.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type FeedbackRequest struct { + // A URL encoded versions of Feedback. This is useful for requests. + FeedbackQueryParameter *string `queryParam:"style=form,explode=true,name=feedback"` + Feedback1 *components.Feedback `request:"mediaType=application/json"` +} + +func (o *FeedbackRequest) GetFeedbackQueryParameter() *string { + if o == nil { + return nil + } + return o.FeedbackQueryParameter +} + +func (o *FeedbackRequest) GetFeedback1() *components.Feedback { + if o == nil { + return nil + } + return o.Feedback1 +} + +type FeedbackResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *FeedbackResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/getagent.go b/tests/mockserver/internal/sdk/models/operations/getagent.go new file mode 100644 index 00000000..471bb945 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getagent.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetAgentRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + // The ID of the agent. + AgentID string `pathParam:"style=simple,explode=false,name=agent_id"` +} + +func (o *GetAgentRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *GetAgentRequest) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +type GetAgentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Success + Agent *components.Agent +} + +func (o *GetAgentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetAgentResponse) GetAgent() *components.Agent { + if o == nil { + return nil + } + return o.Agent +} diff --git a/tests/mockserver/internal/sdk/models/operations/getagentschemas.go b/tests/mockserver/internal/sdk/models/operations/getagentschemas.go new file mode 100644 index 00000000..b4aa8ea6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getagentschemas.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetAgentSchemasRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + // The ID of the agent. + AgentID string `pathParam:"style=simple,explode=false,name=agent_id"` +} + +func (o *GetAgentSchemasRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *GetAgentSchemasRequest) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +type GetAgentSchemasResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Success + AgentSchemas *components.AgentSchemas +} + +func (o *GetAgentSchemasResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetAgentSchemasResponse) GetAgentSchemas() *components.AgentSchemas { + if o == nil { + return nil + } + return o.AgentSchemas +} diff --git a/tests/mockserver/internal/sdk/models/operations/getanswer.go b/tests/mockserver/internal/sdk/models/operations/getanswer.go new file mode 100644 index 00000000..ce29ef9f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getanswer.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetanswerResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetAnswerResponse *components.GetAnswerResponse +} + +func (o *GetanswerResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetanswerResponse) GetGetAnswerResponse() *components.GetAnswerResponse { + if o == nil { + return nil + } + return o.GetAnswerResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getchat.go b/tests/mockserver/internal/sdk/models/operations/getchat.go new file mode 100644 index 00000000..9ce30de8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getchat.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetchatRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + GetChatRequest components.GetChatRequest `request:"mediaType=application/json"` +} + +func (o *GetchatRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *GetchatRequest) GetGetChatRequest() components.GetChatRequest { + if o == nil { + return components.GetChatRequest{} + } + return o.GetChatRequest +} + +type GetchatResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetChatResponse *components.GetChatResponse +} + +func (o *GetchatResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetchatResponse) GetGetChatResponse() *components.GetChatResponse { + if o == nil { + return nil + } + return o.GetChatResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getchatapplication.go b/tests/mockserver/internal/sdk/models/operations/getchatapplication.go new file mode 100644 index 00000000..ec673be9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getchatapplication.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetchatapplicationRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + GetChatApplicationRequest components.GetChatApplicationRequest `request:"mediaType=application/json"` +} + +func (o *GetchatapplicationRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *GetchatapplicationRequest) GetGetChatApplicationRequest() components.GetChatApplicationRequest { + if o == nil { + return components.GetChatApplicationRequest{} + } + return o.GetChatApplicationRequest +} + +type GetchatapplicationResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetChatApplicationResponse *components.GetChatApplicationResponse +} + +func (o *GetchatapplicationResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetchatapplicationResponse) GetGetChatApplicationResponse() *components.GetChatApplicationResponse { + if o == nil { + return nil + } + return o.GetChatApplicationResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getchatfiles.go b/tests/mockserver/internal/sdk/models/operations/getchatfiles.go new file mode 100644 index 00000000..24bcda85 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getchatfiles.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetchatfilesRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + GetChatFilesRequest components.GetChatFilesRequest `request:"mediaType=application/json"` +} + +func (o *GetchatfilesRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *GetchatfilesRequest) GetGetChatFilesRequest() components.GetChatFilesRequest { + if o == nil { + return components.GetChatFilesRequest{} + } + return o.GetChatFilesRequest +} + +type GetchatfilesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetChatFilesResponse *components.GetChatFilesResponse +} + +func (o *GetchatfilesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetchatfilesResponse) GetGetChatFilesResponse() *components.GetChatFilesResponse { + if o == nil { + return nil + } + return o.GetChatFilesResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getcollection.go b/tests/mockserver/internal/sdk/models/operations/getcollection.go new file mode 100644 index 00000000..38e38763 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getcollection.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetcollectionResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetCollectionResponse *components.GetCollectionResponse +} + +func (o *GetcollectionResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetcollectionResponse) GetGetCollectionResponse() *components.GetCollectionResponse { + if o == nil { + return nil + } + return o.GetCollectionResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getdocpermissions.go b/tests/mockserver/internal/sdk/models/operations/getdocpermissions.go new file mode 100644 index 00000000..a509a3a7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getdocpermissions.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetdocpermissionsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetDocPermissionsResponse *components.GetDocPermissionsResponse +} + +func (o *GetdocpermissionsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetdocpermissionsResponse) GetGetDocPermissionsResponse() *components.GetDocPermissionsResponse { + if o == nil { + return nil + } + return o.GetDocPermissionsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getdocuments.go b/tests/mockserver/internal/sdk/models/operations/getdocuments.go new file mode 100644 index 00000000..a2ef5c08 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getdocuments.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetdocumentsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetDocumentsResponse *components.GetDocumentsResponse +} + +func (o *GetdocumentsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetdocumentsResponse) GetGetDocumentsResponse() *components.GetDocumentsResponse { + if o == nil { + return nil + } + return o.GetDocumentsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getdocumentsbyfacets.go b/tests/mockserver/internal/sdk/models/operations/getdocumentsbyfacets.go new file mode 100644 index 00000000..12629e29 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getdocumentsbyfacets.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetdocumentsbyfacetsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetDocumentsByFacetsResponse *components.GetDocumentsByFacetsResponse +} + +func (o *GetdocumentsbyfacetsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetdocumentsbyfacetsResponse) GetGetDocumentsByFacetsResponse() *components.GetDocumentsByFacetsResponse { + if o == nil { + return nil + } + return o.GetDocumentsByFacetsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getdocvisibility.go b/tests/mockserver/internal/sdk/models/operations/getdocvisibility.go new file mode 100644 index 00000000..8fbe2575 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getdocvisibility.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetdocvisibilityRequest struct { + // List of doc-ids which will have their hide status fetched. + DocIds []string `queryParam:"style=form,explode=true,name=docIds"` +} + +func (o *GetdocvisibilityRequest) GetDocIds() []string { + if o == nil { + return nil + } + return o.DocIds +} + +type GetdocvisibilityResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // The visibility status of documents + GetDocumentVisibilityOverridesResponse *components.GetDocumentVisibilityOverridesResponse +} + +func (o *GetdocvisibilityResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetdocvisibilityResponse) GetGetDocumentVisibilityOverridesResponse() *components.GetDocumentVisibilityOverridesResponse { + if o == nil { + return nil + } + return o.GetDocumentVisibilityOverridesResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getpin.go b/tests/mockserver/internal/sdk/models/operations/getpin.go new file mode 100644 index 00000000..9ccb680e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getpin.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetpinResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetPinResponse *components.GetPinResponse +} + +func (o *GetpinResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetpinResponse) GetGetPinResponse() *components.GetPinResponse { + if o == nil { + return nil + } + return o.GetPinResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getpolicy.go b/tests/mockserver/internal/sdk/models/operations/getpolicy.go new file mode 100644 index 00000000..1cac9e52 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getpolicy.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetpolicyRequest struct { + // The id of the policy to fetch. + ID string `pathParam:"style=simple,explode=false,name=id"` + // 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. + Version *int64 `queryParam:"style=form,explode=true,name=version"` +} + +func (o *GetpolicyRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *GetpolicyRequest) GetVersion() *int64 { + if o == nil { + return nil + } + return o.Version +} + +type GetpolicyResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetDlpReportResponse *components.GetDlpReportResponse +} + +func (o *GetpolicyResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetpolicyResponse) GetGetDlpReportResponse() *components.GetDlpReportResponse { + if o == nil { + return nil + } + return o.GetDlpReportResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getreportstatus.go b/tests/mockserver/internal/sdk/models/operations/getreportstatus.go new file mode 100644 index 00000000..d83ce726 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getreportstatus.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetreportstatusRequest struct { + // The id of the report to get run status for. + ID string `pathParam:"style=simple,explode=false,name=id"` +} + +func (o *GetreportstatusRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +type GetreportstatusResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Fetches status of report run. + ReportStatusResponse *components.ReportStatusResponse +} + +func (o *GetreportstatusResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetreportstatusResponse) GetReportStatusResponse() *components.ReportStatusResponse { + if o == nil { + return nil + } + return o.ReportStatusResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getrestapiv1toolslist.go b/tests/mockserver/internal/sdk/models/operations/getrestapiv1toolslist.go new file mode 100644 index 00000000..4d9d36df --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getrestapiv1toolslist.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetRestAPIV1ToolsListRequest struct { + // Optional array of tool names to filter by + ToolNames []string `queryParam:"style=form,explode=false,name=toolNames"` +} + +func (o *GetRestAPIV1ToolsListRequest) GetToolNames() []string { + if o == nil { + return nil + } + return o.ToolNames +} + +type GetRestAPIV1ToolsListResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful operation + ToolsListResponse *components.ToolsListResponse +} + +func (o *GetRestAPIV1ToolsListResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetRestAPIV1ToolsListResponse) GetToolsListResponse() *components.ToolsListResponse { + if o == nil { + return nil + } + return o.ToolsListResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/getshortcut.go b/tests/mockserver/internal/sdk/models/operations/getshortcut.go new file mode 100644 index 00000000..032c32c5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getshortcut.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetshortcutResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetShortcutResponse *components.GetShortcutResponse +} + +func (o *GetshortcutResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetshortcutResponse) GetGetShortcutResponse() *components.GetShortcutResponse { + if o == nil { + return nil + } + return o.GetShortcutResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/insights.go b/tests/mockserver/internal/sdk/models/operations/insights.go new file mode 100644 index 00000000..0f883502 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/insights.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type InsightsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + InsightsResponse *components.InsightsResponse +} + +func (o *InsightsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *InsightsResponse) GetInsightsResponse() *components.InsightsResponse { + if o == nil { + return nil + } + return o.InsightsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/listanswers.go b/tests/mockserver/internal/sdk/models/operations/listanswers.go new file mode 100644 index 00000000..2229cf7f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/listanswers.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ListanswersResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + ListAnswersResponse *components.ListAnswersResponse +} + +func (o *ListanswersResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListanswersResponse) GetListAnswersResponse() *components.ListAnswersResponse { + if o == nil { + return nil + } + return o.ListAnswersResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/listchats.go b/tests/mockserver/internal/sdk/models/operations/listchats.go new file mode 100644 index 00000000..36a64f6c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/listchats.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ListchatsRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` +} + +func (o *ListchatsRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +type ListchatsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + ListChatsResponse *components.ListChatsResponse +} + +func (o *ListchatsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListchatsResponse) GetListChatsResponse() *components.ListChatsResponse { + if o == nil { + return nil + } + return o.ListChatsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/listcollections.go b/tests/mockserver/internal/sdk/models/operations/listcollections.go new file mode 100644 index 00000000..9efddbd6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/listcollections.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ListcollectionsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + ListCollectionsResponse *components.ListCollectionsResponse +} + +func (o *ListcollectionsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListcollectionsResponse) GetListCollectionsResponse() *components.ListCollectionsResponse { + if o == nil { + return nil + } + return o.ListCollectionsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/listentities.go b/tests/mockserver/internal/sdk/models/operations/listentities.go new file mode 100644 index 00000000..d05441f9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/listentities.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ListentitiesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + ListEntitiesResponse *components.ListEntitiesResponse +} + +func (o *ListentitiesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListentitiesResponse) GetListEntitiesResponse() *components.ListEntitiesResponse { + if o == nil { + return nil + } + return o.ListEntitiesResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/listpins.go b/tests/mockserver/internal/sdk/models/operations/listpins.go new file mode 100644 index 00000000..45c93a45 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/listpins.go @@ -0,0 +1,31 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +// ListpinsRequest - List pins request +type ListpinsRequest struct { +} + +type ListpinsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + ListPinsResponse *components.ListPinsResponse +} + +func (o *ListpinsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListpinsResponse) GetListPinsResponse() *components.ListPinsResponse { + if o == nil { + return nil + } + return o.ListPinsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/listpolicies.go b/tests/mockserver/internal/sdk/models/operations/listpolicies.go new file mode 100644 index 00000000..61d27e4f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/listpolicies.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ListpoliciesRequest struct { + // Filter to return reports with a given value of auto-hide. + AutoHide *bool `queryParam:"style=form,explode=true,name=autoHide"` + // Filter to return reports with a given frequency. + Frequency *string `queryParam:"style=form,explode=true,name=frequency"` +} + +func (o *ListpoliciesRequest) GetAutoHide() *bool { + if o == nil { + return nil + } + return o.AutoHide +} + +func (o *ListpoliciesRequest) GetFrequency() *string { + if o == nil { + return nil + } + return o.Frequency +} + +type ListpoliciesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + ListDlpReportsResponse *components.ListDlpReportsResponse +} + +func (o *ListpoliciesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListpoliciesResponse) GetListDlpReportsResponse() *components.ListDlpReportsResponse { + if o == nil { + return nil + } + return o.ListDlpReportsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/listshortcuts.go b/tests/mockserver/internal/sdk/models/operations/listshortcuts.go new file mode 100644 index 00000000..a5b0962f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/listshortcuts.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ListshortcutsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + ListShortcutsPaginatedResponse *components.ListShortcutsPaginatedResponse +} + +func (o *ListshortcutsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListshortcutsResponse) GetListShortcutsPaginatedResponse() *components.ListShortcutsPaginatedResponse { + if o == nil { + return nil + } + return o.ListShortcutsPaginatedResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/listverifications.go b/tests/mockserver/internal/sdk/models/operations/listverifications.go new file mode 100644 index 00000000..13015ee5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/listverifications.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type ListverificationsRequest struct { + // Maximum number of documents to return + Count *int64 `queryParam:"style=form,explode=true,name=count"` +} + +func (o *ListverificationsRequest) GetCount() *int64 { + if o == nil { + return nil + } + return o.Count +} + +type ListverificationsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + VerificationFeed *components.VerificationFeed +} + +func (o *ListverificationsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *ListverificationsResponse) GetVerificationFeed() *components.VerificationFeed { + if o == nil { + return nil + } + return o.VerificationFeed +} diff --git a/tests/mockserver/internal/sdk/models/operations/messages.go b/tests/mockserver/internal/sdk/models/operations/messages.go new file mode 100644 index 00000000..c33c0888 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/messages.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type MessagesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + MessagesResponse *components.MessagesResponse +} + +func (o *MessagesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *MessagesResponse) GetMessagesResponse() *components.MessagesResponse { + if o == nil { + return nil + } + return o.MessagesResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/people.go b/tests/mockserver/internal/sdk/models/operations/people.go new file mode 100644 index 00000000..fe1bf61d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/people.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PeopleResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + PeopleResponse *components.PeopleResponse +} + +func (o *PeopleResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PeopleResponse) GetPeopleResponse() *components.PeopleResponse { + if o == nil { + return nil + } + return o.PeopleResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/pin.go b/tests/mockserver/internal/sdk/models/operations/pin.go new file mode 100644 index 00000000..ba2d47e1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/pin.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PinResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + PinDocument *components.PinDocument +} + +func (o *PinResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PinResponse) GetPinDocument() *components.PinDocument { + if o == nil { + return nil + } + return o.PinDocument +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1adddatasource.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1adddatasource.go new file mode 100644 index 00000000..ec4316c1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1adddatasource.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1AdddatasourceResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1AdddatasourceResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1betausers.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1betausers.go new file mode 100644 index 00000000..eaab9c65 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1betausers.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1BetausersResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1BetausersResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexdocuments.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexdocuments.go new file mode 100644 index 00000000..91856daa --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexdocuments.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1BulkindexdocumentsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1BulkindexdocumentsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexemployees.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexemployees.go new file mode 100644 index 00000000..9db6475f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexemployees.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1BulkindexemployeesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1BulkindexemployeesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexgroups.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexgroups.go new file mode 100644 index 00000000..61a821cd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexgroups.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1BulkindexgroupsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1BulkindexgroupsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexmemberships.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexmemberships.go new file mode 100644 index 00000000..e2f87c0d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexmemberships.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1BulkindexmembershipsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1BulkindexmembershipsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexshortcuts.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexshortcuts.go new file mode 100644 index 00000000..6348bbd6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexshortcuts.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1BulkindexshortcutsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1BulkindexshortcutsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexteams.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexteams.go new file mode 100644 index 00000000..a6a54ca3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexteams.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1BulkindexteamsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1BulkindexteamsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexusers.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexusers.go new file mode 100644 index 00000000..eca83011 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1bulkindexusers.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1BulkindexusersResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1BulkindexusersResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1checkdocumentaccess.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1checkdocumentaccess.go new file mode 100644 index 00000000..daa947b5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1checkdocumentaccess.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1CheckdocumentaccessResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + CheckDocumentAccessResponse *components.CheckDocumentAccessResponse +} + +func (o *PostAPIIndexV1CheckdocumentaccessResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostAPIIndexV1CheckdocumentaccessResponse) GetCheckDocumentAccessResponse() *components.CheckDocumentAccessResponse { + if o == nil { + return nil + } + return o.CheckDocumentAccessResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcedocument.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcedocument.go new file mode 100644 index 00000000..664ceb3b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcedocument.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1DebugDatasourceDocumentRequest struct { + // The datasource to which the document belongs + Datasource string `pathParam:"style=simple,explode=false,name=datasource"` + DebugDocumentRequest components.DebugDocumentRequest `request:"mediaType=application/json"` +} + +func (o *PostAPIIndexV1DebugDatasourceDocumentRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *PostAPIIndexV1DebugDatasourceDocumentRequest) GetDebugDocumentRequest() components.DebugDocumentRequest { + if o == nil { + return components.DebugDocumentRequest{} + } + return o.DebugDocumentRequest +} + +type PostAPIIndexV1DebugDatasourceDocumentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + DebugDocumentResponse *components.DebugDocumentResponse +} + +func (o *PostAPIIndexV1DebugDatasourceDocumentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostAPIIndexV1DebugDatasourceDocumentResponse) GetDebugDocumentResponse() *components.DebugDocumentResponse { + if o == nil { + return nil + } + return o.DebugDocumentResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcedocuments.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcedocuments.go new file mode 100644 index 00000000..437e6f06 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcedocuments.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1DebugDatasourceDocumentsRequest struct { + // The datasource to which the document belongs + Datasource string `pathParam:"style=simple,explode=false,name=datasource"` + DebugDocumentsRequest components.DebugDocumentsRequest `request:"mediaType=application/json"` +} + +func (o *PostAPIIndexV1DebugDatasourceDocumentsRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *PostAPIIndexV1DebugDatasourceDocumentsRequest) GetDebugDocumentsRequest() components.DebugDocumentsRequest { + if o == nil { + return components.DebugDocumentsRequest{} + } + return o.DebugDocumentsRequest +} + +type PostAPIIndexV1DebugDatasourceDocumentsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + DebugDocumentsResponse *components.DebugDocumentsResponse +} + +func (o *PostAPIIndexV1DebugDatasourceDocumentsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostAPIIndexV1DebugDatasourceDocumentsResponse) GetDebugDocumentsResponse() *components.DebugDocumentsResponse { + if o == nil { + return nil + } + return o.DebugDocumentsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcestatus.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcestatus.go new file mode 100644 index 00000000..e9913883 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourcestatus.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1DebugDatasourceStatusRequest struct { + // The datasource to get debug status for. + Datasource string `pathParam:"style=simple,explode=false,name=datasource"` +} + +func (o *PostAPIIndexV1DebugDatasourceStatusRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +type PostAPIIndexV1DebugDatasourceStatusResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + DebugDatasourceStatusResponse *components.DebugDatasourceStatusResponse +} + +func (o *PostAPIIndexV1DebugDatasourceStatusResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostAPIIndexV1DebugDatasourceStatusResponse) GetDebugDatasourceStatusResponse() *components.DebugDatasourceStatusResponse { + if o == nil { + return nil + } + return o.DebugDatasourceStatusResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourceuser.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourceuser.go new file mode 100644 index 00000000..5ead8da7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1debugdatasourceuser.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1DebugDatasourceUserRequest struct { + // The datasource to which the user belongs + Datasource string `pathParam:"style=simple,explode=false,name=datasource"` + DebugUserRequest components.DebugUserRequest `request:"mediaType=application/json"` +} + +func (o *PostAPIIndexV1DebugDatasourceUserRequest) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *PostAPIIndexV1DebugDatasourceUserRequest) GetDebugUserRequest() components.DebugUserRequest { + if o == nil { + return components.DebugUserRequest{} + } + return o.DebugUserRequest +} + +type PostAPIIndexV1DebugDatasourceUserResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + DebugUserResponse *components.DebugUserResponse +} + +func (o *PostAPIIndexV1DebugDatasourceUserResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostAPIIndexV1DebugDatasourceUserResponse) GetDebugUserResponse() *components.DebugUserResponse { + if o == nil { + return nil + } + return o.DebugUserResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1deletedocument.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deletedocument.go new file mode 100644 index 00000000..cb9dcbeb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deletedocument.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1DeletedocumentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1DeletedocumentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteemployee.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteemployee.go new file mode 100644 index 00000000..c2ff187f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteemployee.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1DeleteemployeeResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1DeleteemployeeResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1deletegroup.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deletegroup.go new file mode 100644 index 00000000..51bf5588 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deletegroup.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1DeletegroupResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1DeletegroupResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1deletemembership.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deletemembership.go new file mode 100644 index 00000000..0c2cf3c6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deletemembership.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1DeletemembershipResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1DeletemembershipResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteteam.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteteam.go new file mode 100644 index 00000000..3e7591f4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteteam.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1DeleteteamResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1DeleteteamResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteuser.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteuser.go new file mode 100644 index 00000000..f2836359 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1deleteuser.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1DeleteuserResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1DeleteuserResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1getdatasourceconfig.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1getdatasourceconfig.go new file mode 100644 index 00000000..87af103e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1getdatasourceconfig.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1GetdatasourceconfigResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + CustomDatasourceConfig *components.CustomDatasourceConfig +} + +func (o *PostAPIIndexV1GetdatasourceconfigResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostAPIIndexV1GetdatasourceconfigResponse) GetCustomDatasourceConfig() *components.CustomDatasourceConfig { + if o == nil { + return nil + } + return o.CustomDatasourceConfig +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1getdocumentcount.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1getdocumentcount.go new file mode 100644 index 00000000..e8346738 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1getdocumentcount.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1GetdocumentcountResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetDocumentCountResponse *components.GetDocumentCountResponse +} + +func (o *PostAPIIndexV1GetdocumentcountResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostAPIIndexV1GetdocumentcountResponse) GetGetDocumentCountResponse() *components.GetDocumentCountResponse { + if o == nil { + return nil + } + return o.GetDocumentCountResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1getdocumentstatus.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1getdocumentstatus.go new file mode 100644 index 00000000..23e6ce27 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1getdocumentstatus.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1GetdocumentstatusResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetDocumentStatusResponse *components.GetDocumentStatusResponse +} + +func (o *PostAPIIndexV1GetdocumentstatusResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostAPIIndexV1GetdocumentstatusResponse) GetGetDocumentStatusResponse() *components.GetDocumentStatusResponse { + if o == nil { + return nil + } + return o.GetDocumentStatusResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1getusercount.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1getusercount.go new file mode 100644 index 00000000..d65e1df9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1getusercount.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1GetusercountResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + GetUserCountResponse *components.GetUserCountResponse +} + +func (o *PostAPIIndexV1GetusercountResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostAPIIndexV1GetusercountResponse) GetGetUserCountResponse() *components.GetUserCountResponse { + if o == nil { + return nil + } + return o.GetUserCountResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexdocument.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexdocument.go new file mode 100644 index 00000000..0dee9b59 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexdocument.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1IndexdocumentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1IndexdocumentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexdocuments.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexdocuments.go new file mode 100644 index 00000000..dc8114ae --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexdocuments.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1IndexdocumentsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1IndexdocumentsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexemployee.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexemployee.go new file mode 100644 index 00000000..78fee1b1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexemployee.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1IndexemployeeResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1IndexemployeeResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexgroup.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexgroup.go new file mode 100644 index 00000000..2376f01a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexgroup.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1IndexgroupResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1IndexgroupResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexmembership.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexmembership.go new file mode 100644 index 00000000..bc379818 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexmembership.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1IndexmembershipResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1IndexmembershipResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexteam.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexteam.go new file mode 100644 index 00000000..e21ea660 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexteam.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1IndexteamResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1IndexteamResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexuser.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexuser.go new file mode 100644 index 00000000..97d96c43 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1indexuser.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1IndexuserResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1IndexuserResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1processalldocuments.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1processalldocuments.go new file mode 100644 index 00000000..842e0b83 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1processalldocuments.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1ProcessalldocumentsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1ProcessalldocumentsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1processallemployeesandteams.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1processallemployeesandteams.go new file mode 100644 index 00000000..6836e1b0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1processallemployeesandteams.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1ProcessallemployeesandteamsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1ProcessallemployeesandteamsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1processallmemberships.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1processallmemberships.go new file mode 100644 index 00000000..7fda5903 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1processallmemberships.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1ProcessallmembershipsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1ProcessallmembershipsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1rotatetoken.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1rotatetoken.go new file mode 100644 index 00000000..d0333d02 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1rotatetoken.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1RotatetokenResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + RotateTokenResponse *components.RotateTokenResponse +} + +func (o *PostAPIIndexV1RotatetokenResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostAPIIndexV1RotatetokenResponse) GetRotateTokenResponse() *components.RotateTokenResponse { + if o == nil { + return nil + } + return o.RotateTokenResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1updatepermissions.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1updatepermissions.go new file mode 100644 index 00000000..677130bb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1updatepermissions.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1UpdatepermissionsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1UpdatepermissionsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postapiindexv1uploadshortcuts.go b/tests/mockserver/internal/sdk/models/operations/postapiindexv1uploadshortcuts.go new file mode 100644 index 00000000..cc5dbf54 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postapiindexv1uploadshortcuts.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostAPIIndexV1UploadshortcutsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PostAPIIndexV1UploadshortcutsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/postrestapiv1toolscall.go b/tests/mockserver/internal/sdk/models/operations/postrestapiv1toolscall.go new file mode 100644 index 00000000..eb2eea47 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/postrestapiv1toolscall.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostRestAPIV1ToolsCallResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful operation + ToolsCallResponse *components.ToolsCallResponse +} + +func (o *PostRestAPIV1ToolsCallResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostRestAPIV1ToolsCallResponse) GetToolsCallResponse() *components.ToolsCallResponse { + if o == nil { + return nil + } + return o.ToolsCallResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/recommendations.go b/tests/mockserver/internal/sdk/models/operations/recommendations.go new file mode 100644 index 00000000..9c74d480 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/recommendations.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type RecommendationsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + ResultsResponse *components.ResultsResponse +} + +func (o *RecommendationsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *RecommendationsResponse) GetResultsResponse() *components.ResultsResponse { + if o == nil { + return nil + } + return o.ResultsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/search.go b/tests/mockserver/internal/sdk/models/operations/search.go new file mode 100644 index 00000000..6b1d9873 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/search.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type SearchResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + SearchResponse *components.SearchResponse +} + +func (o *SearchResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *SearchResponse) GetSearchResponse() *components.SearchResponse { + if o == nil { + return nil + } + return o.SearchResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/searchagents.go b/tests/mockserver/internal/sdk/models/operations/searchagents.go new file mode 100644 index 00000000..0e9a0715 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/searchagents.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type SearchAgentsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Success + SearchAgentsResponse *components.SearchAgentsResponse +} + +func (o *SearchAgentsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *SearchAgentsResponse) GetSearchAgentsResponse() *components.SearchAgentsResponse { + if o == nil { + return nil + } + return o.SearchAgentsResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/setdocvisibility.go b/tests/mockserver/internal/sdk/models/operations/setdocvisibility.go new file mode 100644 index 00000000..3b077768 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/setdocvisibility.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type SetdocvisibilityResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + UpdateDocumentVisibilityOverridesResponse *components.UpdateDocumentVisibilityOverridesResponse +} + +func (o *SetdocvisibilityResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *SetdocvisibilityResponse) GetUpdateDocumentVisibilityOverridesResponse() *components.UpdateDocumentVisibilityOverridesResponse { + if o == nil { + return nil + } + return o.UpdateDocumentVisibilityOverridesResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/summarize.go b/tests/mockserver/internal/sdk/models/operations/summarize.go new file mode 100644 index 00000000..90cc598d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/summarize.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type SummarizeResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + SummarizeResponse *components.SummarizeResponse +} + +func (o *SummarizeResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *SummarizeResponse) GetSummarizeResponse() *components.SummarizeResponse { + if o == nil { + return nil + } + return o.SummarizeResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/unpin.go b/tests/mockserver/internal/sdk/models/operations/unpin.go new file mode 100644 index 00000000..4bff2a3c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/unpin.go @@ -0,0 +1,18 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type UnpinResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *UnpinResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/updateannouncement.go b/tests/mockserver/internal/sdk/models/operations/updateannouncement.go new file mode 100644 index 00000000..927436ef --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/updateannouncement.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type UpdateannouncementResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + Announcement *components.Announcement +} + +func (o *UpdateannouncementResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateannouncementResponse) GetAnnouncement() *components.Announcement { + if o == nil { + return nil + } + return o.Announcement +} diff --git a/tests/mockserver/internal/sdk/models/operations/updatepolicy.go b/tests/mockserver/internal/sdk/models/operations/updatepolicy.go new file mode 100644 index 00000000..8171038c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/updatepolicy.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type UpdatepolicyRequest struct { + // The id of the policy to fetch. + ID string `pathParam:"style=simple,explode=false,name=id"` + UpdateDlpReportRequest components.UpdateDlpReportRequest `request:"mediaType=application/json"` +} + +func (o *UpdatepolicyRequest) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *UpdatepolicyRequest) GetUpdateDlpReportRequest() components.UpdateDlpReportRequest { + if o == nil { + return components.UpdateDlpReportRequest{} + } + return o.UpdateDlpReportRequest +} + +type UpdatepolicyResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + UpdateDlpReportResponse *components.UpdateDlpReportResponse +} + +func (o *UpdatepolicyResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdatepolicyResponse) GetUpdateDlpReportResponse() *components.UpdateDlpReportResponse { + if o == nil { + return nil + } + return o.UpdateDlpReportResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/updateshortcut.go b/tests/mockserver/internal/sdk/models/operations/updateshortcut.go new file mode 100644 index 00000000..ebfd6f72 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/updateshortcut.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type UpdateshortcutResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + UpdateShortcutResponse *components.UpdateShortcutResponse +} + +func (o *UpdateshortcutResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateshortcutResponse) GetUpdateShortcutResponse() *components.UpdateShortcutResponse { + if o == nil { + return nil + } + return o.UpdateShortcutResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/uploadchatfiles.go b/tests/mockserver/internal/sdk/models/operations/uploadchatfiles.go new file mode 100644 index 00000000..d11a18d5 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/uploadchatfiles.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type UploadchatfilesRequest struct { + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + UploadChatFilesRequest components.UploadChatFilesRequest `request:"mediaType=multipart/form-data"` +} + +func (o *UploadchatfilesRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *UploadchatfilesRequest) GetUploadChatFilesRequest() components.UploadChatFilesRequest { + if o == nil { + return components.UploadChatFilesRequest{} + } + return o.UploadChatFilesRequest +} + +type UploadchatfilesResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + UploadChatFilesResponse *components.UploadChatFilesResponse +} + +func (o *UploadchatfilesResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UploadchatfilesResponse) GetUploadChatFilesResponse() *components.UploadChatFilesResponse { + if o == nil { + return nil + } + return o.UploadChatFilesResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/verify.go b/tests/mockserver/internal/sdk/models/operations/verify.go new file mode 100644 index 00000000..1f2fc93e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/verify.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type VerifyResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + Verification *components.Verification +} + +func (o *VerifyResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *VerifyResponse) GetVerification() *components.Verification { + if o == nil { + return nil + } + return o.Verification +} diff --git a/tests/mockserver/internal/sdk/models/sdkerrors/collectionerror.go b/tests/mockserver/internal/sdk/models/sdkerrors/collectionerror.go new file mode 100644 index 00000000..6eb492d8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/sdkerrors/collectionerror.go @@ -0,0 +1,20 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package sdkerrors + +import ( + "encoding/json" + "mockserver/internal/sdk/models/components" +) + +type CollectionError struct { + ErrorCode components.CollectionErrorErrorCode `json:"errorCode"` + HTTPMeta components.HTTPMetadata `json:"-"` +} + +var _ error = &CollectionError{} + +func (e *CollectionError) Error() string { + data, _ := json.Marshal(e) + return string(data) +} diff --git a/tests/mockserver/internal/sdk/models/sdkerrors/gleandataerror.go b/tests/mockserver/internal/sdk/models/sdkerrors/gleandataerror.go new file mode 100644 index 00000000..5870c8ac --- /dev/null +++ b/tests/mockserver/internal/sdk/models/sdkerrors/gleandataerror.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package sdkerrors + +import ( + "encoding/json" + "mockserver/internal/sdk/models/components" +) + +type GleanDataError struct { + // Indicates the gmail results could not be fetched due to bad token. + BadGmailToken *bool `json:"badGmailToken,omitempty"` + // Indicates the outlook results could not be fetched due to bad token. + BadOutlookToken *bool `json:"badOutlookToken,omitempty"` + // Indicates results could not be fetched due to invalid operators in the query. + InvalidOperators []components.InvalidOperatorValueError `json:"invalidOperators,omitempty"` + ErrorMessages []components.ErrorMessage `json:"errorMessages,omitempty"` + HTTPMeta components.HTTPMetadata `json:"-"` +} + +var _ error = &GleanDataError{} + +func (e *GleanDataError) Error() string { + data, _ := json.Marshal(e) + return string(data) +} diff --git a/tests/mockserver/internal/sdk/types/bigint.go b/tests/mockserver/internal/sdk/types/bigint.go new file mode 100644 index 00000000..9c6a086d --- /dev/null +++ b/tests/mockserver/internal/sdk/types/bigint.go @@ -0,0 +1,21 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "fmt" + "math/big" +) + +// MustNewBigIntFromString returns an instance of big.Int from a string +// The string is assumed to be base 10 and if it is not a valid big.Int +// then the function panics. +// Avoid using this function in production code. +func MustNewBigIntFromString(s string) *big.Int { + i, ok := new(big.Int).SetString(s, 10) + if !ok { + panic(fmt.Errorf("failed to parse string as big.Int")) + } + + return i +} diff --git a/tests/mockserver/internal/sdk/types/date.go b/tests/mockserver/internal/sdk/types/date.go new file mode 100644 index 00000000..5b2782f2 --- /dev/null +++ b/tests/mockserver/internal/sdk/types/date.go @@ -0,0 +1,90 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "encoding/json" + "fmt" + "strings" + "time" +) + +// Date is a wrapper around time.Time that allows for JSON marshaling a date string formatted as "2006-01-02". +type Date struct { + time.Time +} + +var ( + _ json.Marshaler = &Date{} + _ json.Unmarshaler = &Date{} + _ fmt.Stringer = &Date{} +) + +// NewDate returns an instance of Date from a time.Time. +func NewDate(t time.Time) *Date { + d := DateFromTime(t) + return &d +} + +// DateFromTime returns a Date from a time.Time. +func DateFromTime(t time.Time) Date { + return Date{t} +} + +// NewDateFromString returns an instance of Date from a string formatted as "2006-01-02". +func NewDateFromString(str string) (*Date, error) { + d, err := DateFromString(str) + if err != nil { + return nil, err + } + + return &d, nil +} + +// DateFromString returns a Date from a string formatted as "2006-01-02". +func DateFromString(str string) (Date, error) { + var d Date + var err error + + d.Time, err = time.Parse("2006-01-02", str) + return d, err +} + +// MustNewDateFromString returns an instance of Date from a string formatted as "2006-01-02" or panics. +// Avoid using this function in production code. +func MustNewDateFromString(str string) *Date { + d := MustDateFromString(str) + return &d +} + +// MustDateFromString returns a Date from a string formatted as "2006-01-02" or panics. +// Avoid using this function in production code. +func MustDateFromString(str string) Date { + d, err := DateFromString(str) + if err != nil { + panic(err) + } + return d +} + +func (d Date) GetTime() time.Time { + return d.Time +} + +func (d Date) MarshalJSON() ([]byte, error) { + return []byte(fmt.Sprintf(`"%s"`, d.Time.Format("2006-01-02"))), nil +} + +func (d *Date) UnmarshalJSON(data []byte) error { + var err error + + str := string(data) + str = strings.Trim(str, `"`) + + d.Time, err = time.Parse("2006-01-02", str) + return err +} + +func (d Date) String() string { + return d.Time.Format("2006-01-02") +} diff --git a/tests/mockserver/internal/sdk/types/datetime.go b/tests/mockserver/internal/sdk/types/datetime.go new file mode 100644 index 00000000..3eff332d --- /dev/null +++ b/tests/mockserver/internal/sdk/types/datetime.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import "time" + +// MustTimeFromString returns a time.Time from a string formatted as "2006-01-02T15:04:05Z07:00" or panics. +// Avoid using this function in production code. +func MustTimeFromString(str string) time.Time { + t, err := time.Parse(time.RFC3339, str) + if err != nil { + panic(err) + } + + return t +} + +// MustNewTimeFromString returns an instance of time.Time from a string formatted as "2006-01-02T15:04:05Z07:00" or panics. +// Avoid using this function in production code. +func MustNewTimeFromString(str string) *time.Time { + t := MustTimeFromString(str) + return &t +} diff --git a/tests/mockserver/internal/sdk/types/decimal.go b/tests/mockserver/internal/sdk/types/decimal.go new file mode 100644 index 00000000..d8429bc6 --- /dev/null +++ b/tests/mockserver/internal/sdk/types/decimal.go @@ -0,0 +1,20 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "fmt" + + "github.com/ericlagergren/decimal" +) + +// MustNewDecimalFromString returns an instance of Decimal from a string +// Avoid using this function in production code. +func MustNewDecimalFromString(s string) *decimal.Big { + d, ok := new(decimal.Big).SetString(s) + if !ok { + panic(fmt.Errorf("failed to parse string as decimal.Big")) + } + + return d +} diff --git a/tests/mockserver/internal/sdk/types/jsonl/jsonl.go b/tests/mockserver/internal/sdk/types/jsonl/jsonl.go new file mode 100644 index 00000000..26df95cf --- /dev/null +++ b/tests/mockserver/internal/sdk/types/jsonl/jsonl.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package jsonl + +type JsonLStream[T any] struct { + // TODO to be implemented +} diff --git a/tests/mockserver/internal/sdk/types/pointers.go b/tests/mockserver/internal/sdk/types/pointers.go new file mode 100644 index 00000000..35c439d2 --- /dev/null +++ b/tests/mockserver/internal/sdk/types/pointers.go @@ -0,0 +1,11 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +func String(s string) *string { return &s } +func Bool(b bool) *bool { return &b } +func Int(i int) *int { return &i } +func Int64(i int64) *int64 { return &i } +func Float32(f float32) *float32 { return &f } +func Float64(f float64) *float64 { return &f } +func Pointer[T any](v T) *T { return &v } diff --git a/tests/mockserver/internal/sdk/utils/json.go b/tests/mockserver/internal/sdk/utils/json.go new file mode 100644 index 00000000..ca93aa5b --- /dev/null +++ b/tests/mockserver/internal/sdk/utils/json.go @@ -0,0 +1,675 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package utils + +import ( + "bytes" + "encoding/json" + "fmt" + "math/big" + "reflect" + "strconv" + "strings" + "time" + "unsafe" + + "mockserver/internal/sdk/types" + + "github.com/ericlagergren/decimal" +) + +func MarshalJSON(v interface{}, tag reflect.StructTag, topLevel bool) ([]byte, error) { + typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v)) + + switch { + case isModelType(typ): + if topLevel { + return json.Marshal(v) + } + + if isNil(typ, val) { + return []byte("null"), nil + } + + out := map[string]json.RawMessage{} + + for i := 0; i < typ.NumField(); i++ { + field := typ.Field(i) + fieldVal := val.Field(i) + + fieldName := field.Name + + omitEmpty := false + jsonTag := field.Tag.Get("json") + if jsonTag != "" { + for _, tag := range strings.Split(jsonTag, ",") { + if tag == "omitempty" { + omitEmpty = true + } else { + fieldName = tag + } + } + } + + if (isNil(field.Type, fieldVal) || isEmpty(field.Type, fieldVal)) && field.Tag.Get("const") == "" { + if omitEmpty { + continue + } + } + + if !field.IsExported() && field.Tag.Get("const") == "" { + continue + } + + additionalProperties := field.Tag.Get("additionalProperties") + if fieldName == "-" && additionalProperties == "" { + continue + } + + if additionalProperties == "true" { + if isNil(field.Type, fieldVal) { + continue + } + fieldVal := trueReflectValue(fieldVal) + if fieldVal.Type().Kind() != reflect.Map { + return nil, fmt.Errorf("additionalProperties must be a map") + } + + for _, key := range fieldVal.MapKeys() { + r, err := marshalValue(fieldVal.MapIndex(key).Interface(), field.Tag) + if err != nil { + return nil, err + } + + out[key.String()] = r + } + + continue + } + + var fv interface{} + + if field.IsExported() { + fv = fieldVal.Interface() + } else { + pt := reflect.New(typ).Elem() + pt.Set(val) + + pf := pt.Field(i) + + fv = reflect.NewAt(pf.Type(), unsafe.Pointer(pf.UnsafeAddr())).Elem().Interface() + } + + r, err := marshalValue(fv, field.Tag) + if err != nil { + return nil, err + } + + out[fieldName] = r + } + + return json.Marshal(out) + default: + return marshalValue(v, tag) + } +} + +func UnmarshalJSON(b []byte, v interface{}, tag reflect.StructTag, topLevel bool, disallowUnknownFields bool) error { + if reflect.TypeOf(v).Kind() != reflect.Ptr { + return fmt.Errorf("v must be a pointer") + } + + typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v)) + + switch { + case isModelType(typ): + if topLevel || bytes.Equal(b, []byte("null")) { + d := json.NewDecoder(bytes.NewReader(b)) + if disallowUnknownFields { + d.DisallowUnknownFields() + } + return d.Decode(v) + } + + var unmarhsaled map[string]json.RawMessage + + if err := json.Unmarshal(b, &unmarhsaled); err != nil { + return err + } + + var additionalPropertiesField *reflect.StructField + var additionalPropertiesValue *reflect.Value + + for i := 0; i < typ.NumField(); i++ { + field := typ.Field(i) + fieldVal := val.Field(i) + + fieldName := field.Name + + jsonTag := field.Tag.Get("json") + if jsonTag != "" { + for _, tag := range strings.Split(jsonTag, ",") { + if tag != "omitempty" { + fieldName = tag + } + } + } + + if field.Tag.Get("additionalProperties") == "true" { + additionalPropertiesField = &field + additionalPropertiesValue = &fieldVal + continue + } + + // If we receive a value for a const field ignore it but mark it as unmarshaled + if field.Tag.Get("const") != "" { + if r, ok := unmarhsaled[fieldName]; ok { + val := string(r) + + if strings.HasPrefix(val, `"`) && strings.HasSuffix(val, `"`) { + var err error + val, err = strconv.Unquote(val) + if err != nil { + return fmt.Errorf("failed to unquote const field `%s` value `%s`: %w", fieldName, val, err) + } + } + constValue := field.Tag.Get("const") + if val != constValue { + return fmt.Errorf("const field `%s` does not match expected value `%s` got `%s`", fieldName, constValue, val) + } + + delete(unmarhsaled, fieldName) + } + } else if !field.IsExported() { + continue + } + + value, ok := unmarhsaled[fieldName] + if !ok { + defaultTag := field.Tag.Get("default") + if defaultTag != "" { + value = handleDefaultConstValue(defaultTag, fieldVal.Interface(), field.Tag) + ok = true + } + } else { + delete(unmarhsaled, fieldName) + } + + if ok { + if err := unmarshalValue(value, fieldVal, field.Tag, disallowUnknownFields); err != nil { + return err + } + } + } + + keys := make([]string, 0, len(unmarhsaled)) + for k := range unmarhsaled { + keys = append(keys, k) + } + + if len(keys) > 0 { + if disallowUnknownFields && (additionalPropertiesField == nil || additionalPropertiesValue == nil) { + return fmt.Errorf("unknown fields: %v", keys) + } + + if additionalPropertiesField != nil && additionalPropertiesValue != nil { + typeOfMap := additionalPropertiesField.Type + if additionalPropertiesValue.Type().Kind() == reflect.Interface { + typeOfMap = reflect.TypeOf(map[string]interface{}{}) + } else if additionalPropertiesValue.Type().Kind() != reflect.Map { + return fmt.Errorf("additionalProperties must be a map") + } + + mapValue := reflect.MakeMap(typeOfMap) + + for key, value := range unmarhsaled { + val := reflect.New(typeOfMap.Elem()) + + if err := unmarshalValue(value, val, additionalPropertiesField.Tag, disallowUnknownFields); err != nil { + return err + } + + if val.Elem().Type().String() == typeOfMap.Elem().String() { + mapValue.SetMapIndex(reflect.ValueOf(key), val.Elem()) + } else { + mapValue.SetMapIndex(reflect.ValueOf(key), trueReflectValue(val)) + } + + } + if additionalPropertiesValue.Type().Kind() == reflect.Interface { + additionalPropertiesValue.Set(mapValue) + } else { + additionalPropertiesValue.Set(mapValue) + } + } + } + default: + return unmarshalValue(b, reflect.ValueOf(v), tag, disallowUnknownFields) + } + + return nil +} + +func marshalValue(v interface{}, tag reflect.StructTag) (json.RawMessage, error) { + constTag := tag.Get("const") + if constTag != "" { + return handleDefaultConstValue(constTag, v, tag), nil + } + + if isNil(reflect.TypeOf(v), reflect.ValueOf(v)) { + defaultTag := tag.Get("default") + if defaultTag != "" { + return handleDefaultConstValue(defaultTag, v, tag), nil + } + + return []byte("null"), nil + } + + typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v)) + switch typ.Kind() { + case reflect.Int64: + format := tag.Get("integer") + if format == "string" { + b := val.Interface().(int64) + return []byte(fmt.Sprintf(`"%d"`, b)), nil + } + case reflect.Float64: + format := tag.Get("number") + if format == "string" { + b := val.Interface().(float64) + return []byte(fmt.Sprintf(`"%g"`, b)), nil + } + case reflect.Map: + if isNil(typ, val) { + return []byte("null"), nil + } + + out := map[string]json.RawMessage{} + + for _, key := range val.MapKeys() { + itemVal := val.MapIndex(key) + + if isNil(itemVal.Type(), itemVal) { + out[key.String()] = []byte("null") + continue + } + + r, err := marshalValue(itemVal.Interface(), tag) + if err != nil { + return nil, err + } + + out[key.String()] = r + } + + return json.Marshal(out) + case reflect.Slice, reflect.Array: + if isNil(typ, val) { + return []byte("null"), nil + } + + out := []json.RawMessage{} + + for i := 0; i < val.Len(); i++ { + itemVal := val.Index(i) + + if isNil(itemVal.Type(), itemVal) { + out = append(out, []byte("null")) + continue + } + + r, err := marshalValue(itemVal.Interface(), tag) + if err != nil { + return nil, err + } + + out = append(out, r) + } + + return json.Marshal(out) + case reflect.Struct: + switch typ { + case reflect.TypeOf(time.Time{}): + return []byte(fmt.Sprintf(`"%s"`, val.Interface().(time.Time).Format(time.RFC3339Nano))), nil + case reflect.TypeOf(big.Int{}): + format := tag.Get("bigint") + if format == "string" { + b := val.Interface().(big.Int) + return []byte(fmt.Sprintf(`"%s"`, (&b).String())), nil + } + case reflect.TypeOf(decimal.Big{}): + format := tag.Get("decimal") + if format == "number" { + b := val.Interface().(decimal.Big) + f, ok := (&b).Float64() + if ok { + return []byte(b.String()), nil + } + + return []byte(fmt.Sprintf(`%f`, f)), nil + } + } + } + + return json.Marshal(v) +} + +func handleDefaultConstValue(tagValue string, val interface{}, tag reflect.StructTag) json.RawMessage { + if tagValue == "null" { + return []byte("null") + } + + typ := dereferenceTypePointer(reflect.TypeOf(val)) + switch typ { + case reflect.TypeOf(time.Time{}): + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + case reflect.TypeOf(big.Int{}): + bigIntTag := tag.Get("bigint") + if bigIntTag == "string" { + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + } + case reflect.TypeOf(int64(0)): + format := tag.Get("integer") + if format == "string" { + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + } + case reflect.TypeOf(float64(0)): + format := tag.Get("number") + if format == "string" { + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + } + case reflect.TypeOf(decimal.Big{}): + decimalTag := tag.Get("decimal") + if decimalTag != "number" { + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + } + case reflect.TypeOf(types.Date{}): + return []byte(fmt.Sprintf(`"%s"`, tagValue)) + default: + if typ.Kind() == reflect.String { + return []byte(fmt.Sprintf("%q", tagValue)) + } + } + + return []byte(tagValue) +} + +func unmarshalValue(value json.RawMessage, v reflect.Value, tag reflect.StructTag, disallowUnknownFields bool) error { + if bytes.Equal(value, []byte("null")) { + if v.CanAddr() { + return json.Unmarshal(value, v.Addr().Interface()) + } else { + return json.Unmarshal(value, v.Interface()) + } + } + + typ := dereferenceTypePointer(v.Type()) + + switch typ.Kind() { + case reflect.Int64: + var b int64 + + format := tag.Get("integer") + if format == "string" { + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + var err error + b, err = strconv.ParseInt(s, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse string as int64: %w", err) + } + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(reflect.ValueOf(b)) + return nil + } + case reflect.Float64: + var b float64 + + format := tag.Get("number") + if format == "string" { + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + var err error + b, err = strconv.ParseFloat(s, 64) + if err != nil { + return fmt.Errorf("failed to parse string as float64: %w", err) + } + + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(reflect.ValueOf(b)) + return nil + } + case reflect.Map: + if bytes.Equal(value, []byte("null")) || !isComplexValueType(dereferenceTypePointer(typ.Elem())) { + if v.CanAddr() { + return json.Unmarshal(value, v.Addr().Interface()) + } else { + return json.Unmarshal(value, v.Interface()) + } + } + + var unmarhsaled map[string]json.RawMessage + + if err := json.Unmarshal(value, &unmarhsaled); err != nil { + return err + } + + m := reflect.MakeMap(typ) + + for k, value := range unmarhsaled { + itemVal := reflect.New(typ.Elem()) + + if err := unmarshalValue(value, itemVal, tag, disallowUnknownFields); err != nil { + return err + } + + m.SetMapIndex(reflect.ValueOf(k), itemVal.Elem()) + } + + v.Set(m) + return nil + case reflect.Slice, reflect.Array: + var unmarshaled []json.RawMessage + + if err := json.Unmarshal(value, &unmarshaled); err != nil { + return err + } + + arrVal := reflect.MakeSlice(typ, len(unmarshaled), len(unmarshaled)) + + for index, value := range unmarshaled { + itemVal := reflect.New(typ.Elem()) + + if err := unmarshalValue(value, itemVal, tag, disallowUnknownFields); err != nil { + return err + } + + arrVal.Index(index).Set(itemVal.Elem()) + } + + if v.Kind() == reflect.Pointer { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(arrVal) + return nil + case reflect.Struct: + switch typ { + case reflect.TypeOf(time.Time{}): + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + t, err := time.Parse(time.RFC3339Nano, s) + if err != nil { + return fmt.Errorf("failed to parse string as time.Time: %w", err) + } + + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(reflect.ValueOf(t)) + return nil + case reflect.TypeOf(big.Int{}): + var b *big.Int + + format := tag.Get("bigint") + if format == "string" { + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + var ok bool + b, ok = new(big.Int).SetString(s, 10) + if !ok { + return fmt.Errorf("failed to parse string as big.Int") + } + } else { + if err := json.Unmarshal(value, &b); err != nil { + return err + } + } + + if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Ptr { + v = v.Elem() + } + + v.Set(reflect.ValueOf(b)) + return nil + case reflect.TypeOf(decimal.Big{}): + var d *decimal.Big + format := tag.Get("decimal") + if format == "number" { + var ok bool + d, ok = new(decimal.Big).SetString(string(value)) + if !ok { + return fmt.Errorf("failed to parse number as decimal.Big") + } + } else { + if err := json.Unmarshal(value, &d); err != nil { + return err + } + } + + if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Ptr { + v = v.Elem() + } + + v.Set(reflect.ValueOf(d)) + return nil + case reflect.TypeOf(types.Date{}): + var s string + + if err := json.Unmarshal(value, &s); err != nil { + return err + } + + d, err := types.DateFromString(s) + if err != nil { + return fmt.Errorf("failed to parse string as types.Date: %w", err) + } + + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(typ)) + } + v = v.Elem() + } + + v.Set(reflect.ValueOf(d)) + return nil + } + } + + var val interface{} + + if v.CanAddr() { + val = v.Addr().Interface() + } else { + val = v.Interface() + } + + d := json.NewDecoder(bytes.NewReader(value)) + if disallowUnknownFields { + d.DisallowUnknownFields() + } + return d.Decode(val) +} + +func dereferencePointers(typ reflect.Type, val reflect.Value) (reflect.Type, reflect.Value) { + if typ.Kind() == reflect.Ptr { + typ = typ.Elem() + val = val.Elem() + } else { + return typ, val + } + + return dereferencePointers(typ, val) +} + +func dereferenceTypePointer(typ reflect.Type) reflect.Type { + if typ.Kind() == reflect.Ptr { + typ = typ.Elem() + } else { + return typ + } + + return dereferenceTypePointer(typ) +} + +func isComplexValueType(typ reflect.Type) bool { + switch typ.Kind() { + case reflect.Struct: + switch typ { + case reflect.TypeOf(time.Time{}): + fallthrough + case reflect.TypeOf(big.Int{}): + fallthrough + case reflect.TypeOf(decimal.Big{}): + fallthrough + case reflect.TypeOf(types.Date{}): + return true + } + } + + return false +} + +func isModelType(typ reflect.Type) bool { + if isComplexValueType(typ) { + return false + } + + if typ.Kind() == reflect.Struct { + return true + } + + return false +} diff --git a/tests/mockserver/internal/sdk/utils/reflect.go b/tests/mockserver/internal/sdk/utils/reflect.go new file mode 100644 index 00000000..255f3dd7 --- /dev/null +++ b/tests/mockserver/internal/sdk/utils/reflect.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package utils + +import ( + "reflect" +) + +func isNil(typ reflect.Type, val reflect.Value) bool { + // `reflect.TypeOf(nil) == nil` so calling typ.Kind() will cause a nil pointer + // dereference panic. Catch it and return early. + // https://github.com/golang/go/issues/51649 + // https://github.com/golang/go/issues/54208 + if typ == nil { + return true + } + + if typ.Kind() == reflect.Ptr || typ.Kind() == reflect.Map || typ.Kind() == reflect.Slice || typ.Kind() == reflect.Interface { + return val.IsNil() + } + + return false +} + +func isEmpty(typ reflect.Type, val reflect.Value) bool { + if typ == nil { + return true + } + + switch typ.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return val.Len() == 0 + } + + return false +} + +func trueReflectValue(val reflect.Value) reflect.Value { + kind := val.Type().Kind() + for kind == reflect.Interface || kind == reflect.Ptr { + innerVal := val.Elem() + if !innerVal.IsValid() { + break + } + val = innerVal + kind = val.Type().Kind() + } + return val +} diff --git a/tests/mockserver/internal/sdk/utils/sort.go b/tests/mockserver/internal/sdk/utils/sort.go new file mode 100644 index 00000000..6b265be7 --- /dev/null +++ b/tests/mockserver/internal/sdk/utils/sort.go @@ -0,0 +1,94 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package utils + +import ( + "regexp" + "sort" + "strings" +) + +// SortSerializedMaps will sort a given string, []string, or map[string]string +// such that all keys are ordered. This should only be used to simplify testing +// logic. +func SortSerializedMaps(input interface{}, regex string, delim string) interface{} { + sortString := func(input string) string { + r := regexp.MustCompile(regex) + + return replaceAllStringSubmatchFunc(r, input, func(matches []string) string { + result := matches[0] + + for i := 1; i < len(matches); i++ { + match := matches[i] + + pairs := []string{} + if strings.Contains(match, "=") { + pairs = strings.Split(match, delim) + + sort.SliceStable(pairs, func(i, j int) bool { + return strings.Split(pairs[i], "=")[0] < strings.Split(pairs[j], "=")[0] + }) + } else { + values := strings.Split(match, delim) + + if len(values) == 1 { + pairs = values + } else { + pairs = make([]string, len(values)/2) + for i := 0; i < len(values); i += 2 { + pairs[i/2] = values[i] + delim + values[i+1] + } + } + + sort.SliceStable(pairs, func(i, j int) bool { + return strings.Split(pairs[i], delim)[0] < strings.Split(pairs[j], delim)[0] + }) + } + + match = strings.Join(pairs, delim) + + result = strings.Replace(result, matches[i], match, 1) + } + + return result + }) + } + + switch input := input.(type) { + case string: + return sortString(input) + case []string: + for i, v := range input { + input[i] = sortString(v) + } + return input + case map[string]string: + for k, v := range input { + input[k] = sortString(v) + } + return input + default: + panic("unsupported type") + } +} + +func replaceAllStringSubmatchFunc(re *regexp.Regexp, str string, repl func([]string) string) string { + result := "" + lastIndex := 0 + + for _, v := range re.FindAllSubmatchIndex([]byte(str), -1) { + groups := []string{} + for i := 0; i < len(v); i += 2 { + if v[i] == -1 || v[i+1] == -1 { + groups = append(groups, "") + } else { + groups = append(groups, str[v[i]:v[i+1]]) + } + } + + result += str[lastIndex:v[0]] + repl(groups) + lastIndex = v[1] + } + + return result + str[lastIndex:] +} diff --git a/tests/mockserver/internal/server/doc.go b/tests/mockserver/internal/server/doc.go new file mode 100644 index 00000000..666dc109 --- /dev/null +++ b/tests/mockserver/internal/server/doc.go @@ -0,0 +1,4 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +// Package server implements the HTTP server. +package server diff --git a/tests/mockserver/internal/server/generated_handlers.go b/tests/mockserver/internal/server/generated_handlers.go new file mode 100644 index 00000000..1ea16355 --- /dev/null +++ b/tests/mockserver/internal/server/generated_handlers.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package server + +import ( + "context" + + "mockserver/internal/handler" +) + +func (s *Server) registerGeneratedHandlers(ctx context.Context) { + s.logger.Debug("registering generated handlers") + + for _, h := range handler.GeneratedHandlers(ctx, s.httpFileDir, s.requestTracker) { + s.RegisterHandlerFunc(ctx, []string{h.Method}, h.Path, h.HandlerFunc()) + } +} diff --git a/tests/mockserver/internal/server/internal_handlers.go b/tests/mockserver/internal/server/internal_handlers.go new file mode 100644 index 00000000..1c248615 --- /dev/null +++ b/tests/mockserver/internal/server/internal_handlers.go @@ -0,0 +1,343 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package server + +import ( + "bytes" + "context" + "fmt" + "html/template" + "io" + "net/http" + "path/filepath" + "strings" +) + +const ( + // Mock server internal route prefix to prevent naming collisions. + internalPathPrefix = "/_mockserver" +) + +// registerInternalHandlers adds any internal handlers, such as healthcheck +// endpoints and fallback handling. +func (s *Server) registerInternalHandlers(ctx context.Context) { + s.logger.Debug("registering internal handlers") + + // Healthcheck endpoint + s.RegisterHandlerFunc(ctx, []string{http.MethodGet}, internalPathPrefix+"/health", healthcheckHandler) + + // HTTP log index endpoint + s.RegisterHandlerFunc(ctx, []string{http.MethodGet}, internalPathPrefix+"/log", s.httpFileIndexHandler) + + // HTTP log operation endpoint + s.RegisterHandlerFunc(ctx, []string{http.MethodGet}, internalPathPrefix+"/log/{operationId}", s.httpOperationHandler) + + // Default all other requests to 404 Not Found + s.RegisterHandlerFunc(ctx, []string{}, "/", rootHandler) +} + +// healthcheckHandler returns a simple OK response. +func healthcheckHandler(w http.ResponseWriter, _ *http.Request) { + w.Header().Set("Content-Type", "text/plain; charset=utf-8") + w.WriteHeader(http.StatusOK) + fmt.Fprintln(w, "OK") +} + +// httpFileIndexHandler returns a HTML index page for all logged HTTP operations +// written to the HTTP file directory. +func (s *Server) httpFileIndexHandler(w http.ResponseWriter, _ *http.Request) { + operations, err := s.httpFileDir.Operations() + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation log error: %s", err), + http.StatusInternalServerError, + ) + + return + } + + type operationModel struct { + CallCount int64 + ID string + LogURL string + Method string + Path string + } + + type indexModel struct { + Operations []operationModel + } + + var index indexModel + + for _, operation := range operations { + index.Operations = append(index.Operations, operationModel{ + CallCount: operation.CallCount(), + ID: operation.Id(), + LogURL: internalPathPrefix + "/log/" + operation.Id(), + Method: operation.Method(), + Path: operation.Path(), + }) + } + + tmpl := template.New("index.html.tmpl") + tmpl.Funcs(template.FuncMap{ + "mod": func(i, j int) bool { return i%j == 0 }, + }) + _, err = tmpl.ParseFiles( + filepath.Join("internal", "server", "templates", "log", "style.css.tmpl"), + filepath.Join("internal", "server", "templates", "log", "index.html.tmpl"), + ) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation log template error: %s", err), + http.StatusInternalServerError, + ) + + return + } + + var wBuf bytes.Buffer + + err = tmpl.Execute(&wBuf, index) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation log template execution error: %s", err), + http.StatusInternalServerError, + ) + + return + } + + w.Header().Set("Content-Type", "text/html; charset=utf-8") + w.WriteHeader(http.StatusOK) + _, _ = wBuf.WriteTo(w) +} + +// httpOperationHandler returns a HTML page for HTTP request and response log files +// written to _debug. +func (s *Server) httpOperationHandler(w http.ResponseWriter, req *http.Request) { + operationId := req.PathValue("operationId") + + if operationId == "" { + http.Error(w, "operation logs not found", http.StatusNotFound) + + return + } + + operation, err := s.httpFileDir.Operation(operationId) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s log error: %s", operationId, err), + http.StatusInternalServerError, + ) + + return + } + + type headerModel struct { + Key string + Values template.HTML + } + + type queryParameterModel struct { + Key string + Values template.HTML + } + + type operationCallModel struct { + Call int64 + ID string + LogOperationURL string + + RawRequest template.HTML + RawResponse template.HTML + + RequestBody string + RequestHeaders []headerModel + RequestQueryParameters []queryParameterModel + + ResponseBody string + ResponseHeaders []headerModel + ResponseStatus string + } + + type operationDataModel struct { + Calls []operationCallModel + ID string + LogIndexURL string + RequestMethod string + RequestPath string + } + + operationData := operationDataModel{ + ID: operationId, + LogIndexURL: internalPathPrefix + "/log", + RequestMethod: operation.Method(), + RequestPath: operation.Path(), + } + + for i := range operation.CallCount() { + call := i + 1 + + callReqRaw, err := operation.RawRequest(call) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log raw request error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + callReq, err := operation.Request(call) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log request error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + callReqBody, err := io.ReadAll(callReq.Body) + defer callReq.Body.Close() + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log request body error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + callRespRaw, err := operation.RawResponse(call) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log response error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + callResp, err := operation.Response(call) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log response error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + callRespBody, err := io.ReadAll(callResp.Body) + defer callReq.Body.Close() + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation %s call %d log response body error: %s", operationId, call, err), + http.StatusInternalServerError, + ) + + return + } + + operationCall := operationCallModel{ + Call: call, + LogOperationURL: internalPathPrefix + "/log/" + operationId, + + RawRequest: template.HTML(strings.ReplaceAll(string(callReqRaw), "\r\n", "
")), + RawResponse: template.HTML(strings.ReplaceAll(string(callRespRaw), "\r\n", "
")), + + RequestBody: string(callReqBody), + ResponseBody: string(callRespBody), + ResponseStatus: callResp.Status, + } + + for key, values := range callReq.URL.Query() { + operationCall.RequestQueryParameters = append(operationCall.RequestQueryParameters, queryParameterModel{ + Key: key, + Values: template.HTML(strings.Join(values, "
")), + }) + } + + for key, values := range callReq.Header { + operationCall.RequestHeaders = append(operationCall.RequestHeaders, headerModel{ + Key: key, + Values: template.HTML(strings.Join(values, "
")), + }) + } + + for key, values := range callResp.Header { + operationCall.ResponseHeaders = append(operationCall.ResponseHeaders, headerModel{ + Key: key, + Values: template.HTML(strings.Join(values, "
")), + }) + } + + operationData.Calls = append(operationData.Calls, operationCall) + } + + tmpl := template.New("operation.html.tmpl") + tmpl.Funcs(template.FuncMap{ + "mod": func(i, j int) bool { return i%j == 0 }, + }) + _, err = tmpl.ParseFiles( + filepath.Join("internal", "server", "templates", "log", "style.css.tmpl"), + filepath.Join("internal", "server", "templates", "log", "operation.html.tmpl"), + ) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation log template error: %s", err), + http.StatusInternalServerError, + ) + + return + } + + var wBuf bytes.Buffer + + err = tmpl.Execute(&wBuf, operationData) + + if err != nil { + http.Error( + w, + fmt.Sprintf("operation log template execution error: %s", err), + http.StatusInternalServerError, + ) + + return + } + + w.Header().Set("Content-Type", "text/html; charset=utf-8") + w.WriteHeader(http.StatusOK) + _, _ = wBuf.WriteTo(w) +} + +// rootHandler returns a slightly customized [http.NotFoundHandler], saying +// "path" instead of "page". +func rootHandler(w http.ResponseWriter, _ *http.Request) { + http.Error(w, "path not found", http.StatusNotFound) +} diff --git a/tests/mockserver/internal/server/server.go b/tests/mockserver/internal/server/server.go new file mode 100644 index 00000000..12239611 --- /dev/null +++ b/tests/mockserver/internal/server/server.go @@ -0,0 +1,134 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package server + +import ( + "context" + "errors" + "fmt" + "log/slog" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" + "strings" + "time" + + "github.com/gorilla/mux" +) + +const ( + // Default address for server listening. + DefaultAddress = ":18080" +) + +// Server implements the HTTP server. +type Server struct { + // Address for server listening. + address string + + // Directory for raw HTTP request and response files. + httpFileDir *logging.HTTPFileDirectory + + // Logger implementation. + logger *slog.Logger + + // Underlying mux implementation. + // Based on gorilla mux as the native mux suffered from issues with ambiguous paths and different http methods + // eg - panic: pattern "HEAD /v8/artifacts/{hash}" (registered at /usr/src/app/internal/server/server.go:104) conflicts with pattern "GET /v8/artifacts/status" (registered at /usr/src/app/internal/server/server.go:104): HEAD /v8/artifacts/{hash} matches fewer methods than GET /v8/artifacts/status, but has a more general path pattern + mux *mux.Router + + // Underlying server implementation. + server *http.Server + + requestTracker *tracking.RequestTracker +} + +// NewServer creates a new Server instance. +func NewServer(ctx context.Context, opts ...ServerOption) (*Server, error) { + // Initialize with defaults. + result := &Server{ + address: DefaultAddress, + logger: slog.Default(), + mux: mux.NewRouter(), + requestTracker: tracking.New(), + } + + // Customize based on ServerOption. + for _, opt := range opts { + err := opt(result) + + if err != nil { + return result, err + } + } + + result.server = &http.Server{ + Addr: result.address, + Handler: logging.HTTPLoggerHandler(result.logger, result.mux), + ErrorLog: slog.NewLogLogger(result.logger.Handler(), slog.LevelError), + } + + httpFileDir, err := logging.NewHTTPFileDirectory("") + + if err != nil { + return result, err + } + + err = httpFileDir.Clean() + + if err != nil { + return result, err + } + + result.httpFileDir = httpFileDir + + result.registerGeneratedHandlers(ctx) + result.registerInternalHandlers(ctx) + + return result, err +} + +// Address returns the server address including protocol, hostname, and port. +func (s *Server) Address() string { + return "http://localhost" + s.address +} + +// RegisterHandlerFunc adds a new HTTP handler function for the given methods and path. +func (s *Server) RegisterHandlerFunc(ctx context.Context, methods []string, path string, handlerFunc http.HandlerFunc) { + s.logger.DebugContext(ctx, fmt.Sprintf("registering handler for %s %s", strings.Join(methods, ", "), path)) + + r := s.mux.HandleFunc(path, handlerFunc) + if len(methods) > 0 { + r.Methods(methods...) + } +} + +// Serve starts the server. +func (s *Server) Serve(ctx context.Context) error { + s.logger.InfoContext(ctx, "starting server with address "+s.server.Addr) + + err := s.server.ListenAndServe() + + if errors.Is(err, http.ErrServerClosed) { + return nil + } + + return fmt.Errorf("error running server: %w", err) +} + +// Shutdown gracefully stops the server. +func (s *Server) Shutdown(ctx context.Context) error { + s.logger.WarnContext(ctx, "shutting down server") + s.server.SetKeepAlivesEnabled(false) + + ctx, cancel := context.WithTimeout(ctx, 5*time.Second) + defer cancel() + + err := s.server.Shutdown(ctx) + + if err != nil { + return fmt.Errorf("error shutting down server: %w", err) + } + + return nil +} diff --git a/tests/mockserver/internal/server/server_option.go b/tests/mockserver/internal/server/server_option.go new file mode 100644 index 00000000..ff85a678 --- /dev/null +++ b/tests/mockserver/internal/server/server_option.go @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package server + +import ( + "log/slog" +) + +// ServerOption is a function which modifies the Server. +type ServerOption func(*Server) error + +// WithAddress sets the listening address for a Server. By default, the server +// address is :18080. +func WithAddress(address string) ServerOption { + return func(s *Server) error { + s.address = address + + return nil + } +} + +// WithLogger sets the logger implementation for a Server. By default, the +// server logger is [slog.Default]. +func WithLogger(logger *slog.Logger) ServerOption { + return func(s *Server) error { + s.logger = logger + + return nil + } +} diff --git a/tests/mockserver/internal/server/templates/log/index.html.tmpl b/tests/mockserver/internal/server/templates/log/index.html.tmpl new file mode 100644 index 00000000..8b1124e5 --- /dev/null +++ b/tests/mockserver/internal/server/templates/log/index.html.tmpl @@ -0,0 +1,22 @@ + + + Operation Logs + + + +

// Speakeasy

+

Operation Logs

+ + + {{ range $idx, $o := .Operations }} + + + + + + {{ end }} +
OperationRequestCalls
{{ .ID }}{{ .Method }} {{ .Path }}{{ .CallCount }}
+ + diff --git a/tests/mockserver/internal/server/templates/log/operation.html.tmpl b/tests/mockserver/internal/server/templates/log/operation.html.tmpl new file mode 100644 index 00000000..a54a2adc --- /dev/null +++ b/tests/mockserver/internal/server/templates/log/operation.html.tmpl @@ -0,0 +1,93 @@ + + + Operation Logs: {{ .ID }} + + + +

// Speakeasy

+

Operation Logs: {{ .ID }}

+

{{ .RequestMethod }} {{ .RequestPath }}

+

Back to All Operation Logs

+
+ {{ range $idx, $c := .Calls }} +
+ {{ if (ne (len $.Calls) 1) }} +

Call {{ .Call }}

+ {{ end }} +
+

Request

+ + {{ if (gt (len .RequestQueryParameters) 0) }} +
+

Query Parameters

+ + + {{ range $idx, $p := .RequestQueryParameters }} + + + + + {{ end }} +
KeyValue
{{ .Key }}{{ .Values }}
+
+ {{ end }} +
+

Headers

+ + + {{ range $idx, $h := .RequestHeaders }} + + + + + {{ end }} +
KeyValue(s)
{{ .Key }}{{ .Values }}
+
+ {{ if (gt (len .RequestBody) 0) }} +
+

Body

+

{{ .RequestBody }}

+
+ {{ end }} +

+

+ Raw Request +
{{ .RawRequest }}
+
+

+
+
+

Response

+

{{ .ResponseStatus }}

+
+

Headers

+ + + {{ range $idx, $h := .ResponseHeaders }} + + + + + {{ end }} +
KeyValue(s)
{{ .Key }}{{ .Values }}
+
+ {{ if (gt (len .ResponseBody) 0) }} +
+

Body

+

{{ .ResponseBody }}

+
+ {{ end }} +

+

+ Raw Response +
{{ .RawResponse }}
+
+

+
+
+ {{ end }} +
+ + diff --git a/tests/mockserver/internal/server/templates/log/style.css.tmpl b/tests/mockserver/internal/server/templates/log/style.css.tmpl new file mode 100644 index 00000000..5490930e --- /dev/null +++ b/tests/mockserver/internal/server/templates/log/style.css.tmpl @@ -0,0 +1,64 @@ +{{ define "style" }} +a { + color: rgba(251, 227, 50, 1.0); +} +body { + background: black; + font-family: Arial, Helvetica, sans-serif; +} +code { + color: white; +} +details > div { + border-left: 1px solid gray; + margin-left: 10px; + padding: 10px; +} +div { + width: fit-content; +} +div.operation-call.odd { + background-color: rgba(251, 227, 50, 0.1); +} +h1 { + color: hsl(53, 96%, 59%); +} +h2 { + color: rgba(255, 255, 255, 1.0); +} +h3 { + color: rgba(255, 255, 255, 0.75); +} +h4 { + color: rgba(255, 255, 255, 0.50); +} +p { + color: white; + padding-left: 10px; +} +summary { + color: gray; + font-weight: bold; + margin-bottom: 5px; +} +table { + border-collapse: collapse; + margin: 5px; +} +th { + border-bottom: 1px solid gray; + color: white; + padding: 10px; + text-align: left; +} +td { + color: white; + padding: 10px; +} +tr.even { + background-color: rgba(255, 255, 255, 0.0); +} +tr.odd { + background-color: rgba(255, 255, 255, 0.1); +} +{{ end }} diff --git a/tests/mockserver/internal/tracking/requesttracker.go b/tests/mockserver/internal/tracking/requesttracker.go new file mode 100644 index 00000000..1d9131d0 --- /dev/null +++ b/tests/mockserver/internal/tracking/requesttracker.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package tracking + +import ( + "fmt" + "time" + + cache "github.com/go-pkgz/expirable-cache/v3" +) + +type RequestTracker struct { + cache cache.Cache[string, *testEntry] +} + +type testEntry struct { + name string + id string + count int + created time.Time +} + +func New() *RequestTracker { + return &RequestTracker{ + cache: cache.NewCache[string, *testEntry]().WithTTL(5 * time.Minute), + } +} + +func (t *RequestTracker) GetRequestCount(testName, instanceID string) int { + key := fmt.Sprintf("%s-%s", testName, instanceID) + + entry, ok := t.cache.Get(key) + if !ok { + entry = &testEntry{ + name: testName, + id: instanceID, + count: 0, + created: time.Now(), + } + } + + count := entry.count + entry.count++ + t.cache.Set(key, entry, 0) + + return count +} diff --git a/tests/mockserver/main.go b/tests/mockserver/main.go new file mode 100644 index 00000000..2270443b --- /dev/null +++ b/tests/mockserver/main.go @@ -0,0 +1,74 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package main + +import ( + "context" + "flag" + "fmt" + "os" + "os/signal" + "strings" + + "mockserver/internal/logging" + "mockserver/internal/server" +) + +func main() { + ctx := context.Background() + + address := flag.String("address", server.DefaultAddress, fmt.Sprintf("server listen address (default: %s)", server.DefaultAddress)) + logFormat := flag.String("log-format", logging.DefaultFormat, fmt.Sprintf("logging format (default: %s, supported: %s)", logging.DefaultFormat, strings.Join(logging.Formats(), ", "))) + logLevel := flag.String("log-level", logging.DefaultLevel, fmt.Sprintf("logging level (default: %s, supported: %s)", logging.DefaultLevel, strings.Join(logging.Levels(), ", "))) + + flag.Parse() + + logger, err := logging.NewLogger(os.Stdout, *logFormat, *logLevel) + + if err != nil { + fmt.Fprintf(os.Stderr, "error setting up logging: %s", err) + os.Exit(1) + } + + serverOpts := []server.ServerOption{ + server.WithAddress(*address), + server.WithLogger(logger), + } + + s, err := server.NewServer(ctx, serverOpts...) + + if err != nil { + logger.ErrorContext(ctx, err.Error()) + os.Exit(1) + } + + finishedShutdown := make(chan struct{}) + startShutdown := make(chan os.Signal, 1) + signal.Notify(startShutdown, os.Interrupt) + + go func() { + <-startShutdown + + logger.WarnContext(ctx, "server received interrupt") + + err := s.Shutdown(ctx) + + if err != nil { + logger.Error(err.Error()) + os.Exit(1) + } + + close(finishedShutdown) + }() + + err = s.Serve(ctx) + + if err != nil { + logger.ErrorContext(ctx, err.Error()) + os.Exit(1) + } + + <-finishedShutdown + + logger.InfoContext(ctx, "server stopped") +} diff --git a/tests/mockserver/testdata/example.file b/tests/mockserver/testdata/example.file new file mode 100644 index 00000000..3b18e512 --- /dev/null +++ b/tests/mockserver/testdata/example.file @@ -0,0 +1 @@ +hello world