@googleapis/discoveryengine 36.0.0 → 37.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1alpha.ts CHANGED
@@ -2528,7 +2528,7 @@ export namespace discoveryengine_v1alpha {
2528
2528
  */
2529
2529
  generationConfig?: Schema$GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfig;
2530
2530
  /**
2531
- * Optional. Indicates whether Knowledge Catalog is enabled for this specific assistant. When enabled, it powers discovery context using organizational data.
2531
+ * Optional. Indicates whether Knowledge Catalog is enabled for this specific assistant. When enabled, it powers discovery context using organizational data. If unspecified, defaults to true.
2532
2532
  */
2533
2533
  knowledgeCatalogEnabled?: boolean | null;
2534
2534
  /**
@@ -8128,6 +8128,10 @@ export namespace discoveryengine_v1alpha {
8128
8128
  * Optional. Configuration for NotebookLM settings.
8129
8129
  */
8130
8130
  notebooklmConfig?: Schema$GoogleCloudDiscoveryengineV1alphaProjectCustomerProvidedConfigNotebooklmConfig;
8131
+ /**
8132
+ * Optional. Resource-level access control config for Gemini Enterprise users.
8133
+ */
8134
+ resourceAccessControlConfig?: Schema$GoogleCloudDiscoveryengineV1alphaProjectCustomerProvidedConfigResourceAccessControlConfig;
8131
8135
  }
8132
8136
  /**
8133
8137
  * Configuration for NotebookLM.
@@ -8181,6 +8185,15 @@ export namespace discoveryengine_v1alpha {
8181
8185
  */
8182
8186
  userPromptTemplate?: string | null;
8183
8187
  }
8188
+ /**
8189
+ * Controls resource-level access control for Gemini Enterprise users.
8190
+ */
8191
+ export interface Schema$GoogleCloudDiscoveryengineV1alphaProjectCustomerProvidedConfigResourceAccessControlConfig {
8192
+ /**
8193
+ * Optional. If `true`, the data stores and data connectors shown to Gemini Enterprise users are filtered to those the user has the required resource-level `.get` IAM permission on.
8194
+ */
8195
+ dataStoreAccessControlEnabled?: boolean | null;
8196
+ }
8184
8197
  /**
8185
8198
  * Metadata about the terms of service.
8186
8199
  */
@@ -8584,6 +8597,10 @@ export namespace discoveryengine_v1alpha {
8584
8597
  * This field is expected to be a ui message in JSON format. As of Q1 2026, ui_json_payload is only supported for A2UI messages.
8585
8598
  */
8586
8599
  uiJsonPayload?: string | null;
8600
+ /**
8601
+ * Reference to a user-supplied file attached to a long-running-agent (Sobi) task. See `UserSuppliedSobiArtifactReference` above.
8602
+ */
8603
+ userSuppliedSobiArtifactReference?: Schema$GoogleCloudDiscoveryengineV1alphaQueryPartUserSuppliedSobiArtifactReference;
8587
8604
  }
8588
8605
  /**
8589
8606
  * Represents a document reference.
@@ -8676,6 +8693,19 @@ export namespace discoveryengine_v1alpha {
8676
8693
  */
8677
8694
  personId?: string | null;
8678
8695
  }
8696
+ /**
8697
+ * Reference to a user-supplied file attached to a long-running-agent (Sobi) task. Rendered by the client as an attachment chip on the user turn's bubble. The file itself is stored on the task's `AgentArtifact` list; the client resolves full metadata (source URI, size, ...) for download or preview by calling `GetTask` on the Sobi Task API and matching `AgentArtifact.name` against `file_name`. Only `file_name` and `mime_type` appear on this wire deliberately: the backing `gs://` or Drive URI is not exposed to conversation-history readers. Same variant is used for both byte-uploaded and Drive-picked files -- "user attached a file" is one concept regardless of source.
8698
+ */
8699
+ export interface Schema$GoogleCloudDiscoveryengineV1alphaQueryPartUserSuppliedSobiArtifactReference {
8700
+ /**
8701
+ * Required. Client-supplied filename. Unique per task within the user-supplied artifact set (UI dedupes before upload). Doubles as the artifact identifier used to look up the artifact on `Task.artifacts`. The `_name` suffix is deliberate and the AIP-122 lint is suppressed: this field is not a resource name (which is what AIP-122 reserves the bare `name` for). It is the literal filename, and it serves as the join key against `AgentArtifact.name` on the backing Sobi task -- a structural role that `title` or `display_name` would not communicate to a client picking what to send. The internal mirror (`cloud/ml/discoveryengine/schema/assistant.proto`) uses the same field name so the round-trip converter stays name-for-name.
8702
+ */
8703
+ fileName?: string | null;
8704
+ /**
8705
+ * Optional. IANA MIME type. Used for icon/preview rendering.
8706
+ */
8707
+ mimeType?: string | null;
8708
+ }
8679
8709
  /**
8680
8710
  * Record message for RankService.Rank method.
8681
8711
  */
@@ -10030,6 +10060,27 @@ export namespace discoveryengine_v1alpha {
10030
10060
  * The condition under which search as you type should occur. Default to Condition.DISABLED.
10031
10061
  */
10032
10062
  condition?: string | null;
10063
+ /**
10064
+ * Optional. The list of fields to be used for Search As You Type scoring.
10065
+ */
10066
+ fields?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpecField[];
10067
+ /**
10068
+ * Optional. Search As You Type score threshold for filtering purpose. We keep the result if `score` \>= `score_threshold`.
10069
+ */
10070
+ scoreThreshold?: number | null;
10071
+ }
10072
+ /**
10073
+ * A schema field to be used for Search As You Type scoring on this request. Overrides any data-store-level Search As You Type field configuration for the duration of the request.
10074
+ */
10075
+ export interface Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpecField {
10076
+ /**
10077
+ * Required. A field key that has been indexed for Search As You Type.
10078
+ */
10079
+ key?: string | null;
10080
+ /**
10081
+ * Optional. Weight for scores from this field. Defaults to 1.0 if not specified.
10082
+ */
10083
+ weight?: number | null;
10033
10084
  }
10034
10085
  /**
10035
10086
  * Session specification.
@@ -12432,6 +12483,10 @@ export namespace discoveryengine_v1alpha {
12432
12483
  * Output only. Localized display name of the model (e.g. `Gemini 3.1 Pro`). Localized server-side based on the LookupWidgetConfigRequest.language_code and LookupWidgetConfigRequest.region_code of the request.
12433
12484
  */
12434
12485
  displayName?: string | null;
12486
+ /**
12487
+ * Output only. Groups models that render together in the selector. Models sharing a value form one group; empty means the model belongs to no group. Compared for equality only -- never parsed, and never shown to a user, so it is not localized.
12488
+ */
12489
+ family?: string | null;
12435
12490
  /**
12436
12491
  * Output only. GM3-compatible icon token associated with the model (e.g. `rocket_launch`, `bolt`, `graph_5`).
12437
12492
  */
@@ -14595,6 +14650,10 @@ export namespace discoveryengine_v1alpha {
14595
14650
  * Optional. Configuration for NotebookLM settings.
14596
14651
  */
14597
14652
  notebooklmConfig?: Schema$GoogleCloudDiscoveryengineV1betaProjectCustomerProvidedConfigNotebooklmConfig;
14653
+ /**
14654
+ * Optional. Resource-level access control config for Gemini Enterprise users.
14655
+ */
14656
+ resourceAccessControlConfig?: Schema$GoogleCloudDiscoveryengineV1betaProjectCustomerProvidedConfigResourceAccessControlConfig;
14598
14657
  }
14599
14658
  /**
14600
14659
  * Configuration for NotebookLM.
@@ -14648,6 +14707,15 @@ export namespace discoveryengine_v1alpha {
14648
14707
  */
14649
14708
  userPromptTemplate?: string | null;
14650
14709
  }
14710
+ /**
14711
+ * Controls resource-level access control for Gemini Enterprise users.
14712
+ */
14713
+ export interface Schema$GoogleCloudDiscoveryengineV1betaProjectCustomerProvidedConfigResourceAccessControlConfig {
14714
+ /**
14715
+ * Optional. If `true`, the data stores and data connectors shown to Gemini Enterprise users are filtered to those the user has the required resource-level `.get` IAM permission on.
14716
+ */
14717
+ dataStoreAccessControlEnabled?: boolean | null;
14718
+ }
14651
14719
  /**
14652
14720
  * Metadata about the terms of service.
14653
14721
  */
@@ -15496,6 +15564,27 @@ export namespace discoveryengine_v1alpha {
15496
15564
  * The condition under which search as you type should occur. Default to Condition.DISABLED.
15497
15565
  */
15498
15566
  condition?: string | null;
15567
+ /**
15568
+ * Optional. The list of fields to be used for Search As You Type scoring.
15569
+ */
15570
+ fields?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpecField[];
15571
+ /**
15572
+ * Optional. Search As You Type score threshold for filtering purpose. We keep the result if `score` \>= `score_threshold`.
15573
+ */
15574
+ scoreThreshold?: number | null;
15575
+ }
15576
+ /**
15577
+ * A schema field to be used for Search As You Type scoring on this request. Overrides any data-store-level Search As You Type field configuration for the duration of the request.
15578
+ */
15579
+ export interface Schema$GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpecField {
15580
+ /**
15581
+ * Required. A field key that has been indexed for Search As You Type.
15582
+ */
15583
+ key?: string | null;
15584
+ /**
15585
+ * Optional. Weight for scores from this field. Defaults to 1.0 if not specified.
15586
+ */
15587
+ weight?: number | null;
15499
15588
  }
15500
15589
  /**
15501
15590
  * Session specification.
@@ -17779,6 +17868,10 @@ export namespace discoveryengine_v1alpha {
17779
17868
  * Optional. Configuration for NotebookLM settings.
17780
17869
  */
17781
17870
  notebooklmConfig?: Schema$GoogleCloudDiscoveryengineV1ProjectCustomerProvidedConfigNotebooklmConfig;
17871
+ /**
17872
+ * Optional. Resource-level access control config for Gemini Enterprise users.
17873
+ */
17874
+ resourceAccessControlConfig?: Schema$GoogleCloudDiscoveryengineV1ProjectCustomerProvidedConfigResourceAccessControlConfig;
17782
17875
  }
17783
17876
  /**
17784
17877
  * Configuration for NotebookLM.
@@ -17832,6 +17925,15 @@ export namespace discoveryengine_v1alpha {
17832
17925
  */
17833
17926
  userPromptTemplate?: string | null;
17834
17927
  }
17928
+ /**
17929
+ * Controls resource-level access control for Gemini Enterprise users.
17930
+ */
17931
+ export interface Schema$GoogleCloudDiscoveryengineV1ProjectCustomerProvidedConfigResourceAccessControlConfig {
17932
+ /**
17933
+ * Optional. If `true`, the data stores and data connectors shown to Gemini Enterprise users are filtered to those the user has the required resource-level `.get` IAM permission on.
17934
+ */
17935
+ dataStoreAccessControlEnabled?: boolean | null;
17936
+ }
17835
17937
  /**
17836
17938
  * Metadata about the terms of service.
17837
17939
  */
@@ -18560,6 +18662,32 @@ export namespace discoveryengine_v1alpha {
18560
18662
  */
18561
18663
  type?: string | null;
18562
18664
  }
18665
+ /**
18666
+ * Account and role information.
18667
+ */
18668
+ export interface Schema$GoogleCloudNotebooklmV1alphaAccountAndRole {
18669
+ /**
18670
+ * Required. The email address associated with the account.
18671
+ */
18672
+ email?: string | null;
18673
+ /**
18674
+ * Required. The role in the notebook.
18675
+ */
18676
+ role?: string | null;
18677
+ }
18678
+ /**
18679
+ * Metadata about an agentspace source.
18680
+ */
18681
+ export interface Schema$GoogleCloudNotebooklmV1alphaAgentspaceMetadata {
18682
+ /**
18683
+ * Output only. The full document name in Agentspace.
18684
+ */
18685
+ documentName?: string | null;
18686
+ /**
18687
+ * Output only. The title of the document.
18688
+ */
18689
+ documentTitle?: string | null;
18690
+ }
18563
18691
  /**
18564
18692
  * An audio overview of a notebook. This is a summary of the notebook in audio format.
18565
18693
  */
@@ -18606,6 +18734,51 @@ export namespace discoveryengine_v1alpha {
18606
18734
  */
18607
18735
  sourceIds?: Schema$GoogleCloudNotebooklmV1alphaSourceId[];
18608
18736
  }
18737
+ /**
18738
+ * Request for SourceService.BatchCreateSources method.
18739
+ */
18740
+ export interface Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesRequest {
18741
+ /**
18742
+ * Required. The UserContents to be uploaded.
18743
+ */
18744
+ userContents?: Schema$GoogleCloudNotebooklmV1alphaUserContent[];
18745
+ }
18746
+ /**
18747
+ * Response for SourceService.BatchCreateSources method.
18748
+ */
18749
+ export interface Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse {
18750
+ /**
18751
+ * The Sources.
18752
+ */
18753
+ sources?: Schema$GoogleCloudNotebooklmV1alphaSource[];
18754
+ }
18755
+ /**
18756
+ * Request for NotebookService.BatchDeleteNotebooks method.
18757
+ */
18758
+ export interface Schema$GoogleCloudNotebooklmV1alphaBatchDeleteNotebooksRequest {
18759
+ /**
18760
+ * Required. Full resource names of Notebook, such as `projects/{project\}/locations/{location\}/notebooks/{notebook_id\}`.
18761
+ */
18762
+ names?: string[] | null;
18763
+ }
18764
+ /**
18765
+ * Request for BatchDeleteSourcesRequest method.
18766
+ */
18767
+ export interface Schema$GoogleCloudNotebooklmV1alphaBatchDeleteSourcesRequest {
18768
+ /**
18769
+ * Required. Names of sources to be deleted. Format: projects/{project\}/locations/{location\}/notebooks/{notebook\}/sources/{source\}
18770
+ */
18771
+ names?: string[] | null;
18772
+ }
18773
+ /**
18774
+ * Customer-managed encryption configuration for Notebooks.
18775
+ */
18776
+ export interface Schema$GoogleCloudNotebooklmV1alphaCmekConfig {
18777
+ /**
18778
+ * Required. KMS key resource name which will be used to encrypt resources `projects/{project\}/locations/{location\}/keyRings/{keyRing\}/cryptoKeys/{keyId\}`.
18779
+ */
18780
+ kmsKey?: string | null;
18781
+ }
18609
18782
  /**
18610
18783
  * Request for AudioOverviewService.CreateAudioOverview method.
18611
18784
  */
@@ -18624,6 +18797,294 @@ export namespace discoveryengine_v1alpha {
18624
18797
  */
18625
18798
  audioOverview?: Schema$GoogleCloudNotebooklmV1alphaAudioOverview;
18626
18799
  }
18800
+ /**
18801
+ * Failure reason containing details about why a source failed to ingest.
18802
+ */
18803
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReason {
18804
+ /**
18805
+ * An audio file transcription specific error.
18806
+ */
18807
+ audioTranscriptionError?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonAudioTranscriptionError;
18808
+ /**
18809
+ * Error if the user tries to add a source from a blocked domain.
18810
+ */
18811
+ domainBlocked?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonDomainBlocked;
18812
+ /**
18813
+ * A google drive specific error.
18814
+ */
18815
+ googleDriveError?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonGoogleDriveError;
18816
+ /**
18817
+ * Indicates an error occurred while ingesting the source.
18818
+ */
18819
+ ingestionError?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonIngestionError;
18820
+ /**
18821
+ * Indicates that the source MIME type is blocked.
18822
+ */
18823
+ mimeTypeBlocked?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonMimeTypeBlocked;
18824
+ /**
18825
+ * Indicates that the source is paywalled and cannot be ingested.
18826
+ */
18827
+ paywallError?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonPaywallError;
18828
+ /**
18829
+ * Indicates that the policy check failed.
18830
+ */
18831
+ policyCheckFailed?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonPolicyCheckFailed;
18832
+ /**
18833
+ * Indicates that the source is empty.
18834
+ */
18835
+ sourceEmpty?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonSourceEmpty;
18836
+ /**
18837
+ * Error if the user tries to update beyond their limits.
18838
+ */
18839
+ sourceLimitExceeded?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonSourceLimitExceeded;
18840
+ /**
18841
+ * Indicates source word count exceeded the user's limit.
18842
+ */
18843
+ sourceTooLong?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonSourceTooLong;
18844
+ /**
18845
+ * Indicates that the source is unreachable.
18846
+ */
18847
+ sourceUnreachable?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonSourceUnreachable;
18848
+ /**
18849
+ * Indicates an unknown error occurred.
18850
+ */
18851
+ unknown?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonUnknown;
18852
+ /**
18853
+ * Indicates an error occurred while uploading the source.
18854
+ */
18855
+ uploadError?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonUploadError;
18856
+ /**
18857
+ * A youtube specific error.
18858
+ */
18859
+ youtubeError?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonYoutubeError;
18860
+ }
18861
+ /**
18862
+ * An audio file transcription specific error.
18863
+ */
18864
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonAudioTranscriptionError {
18865
+ /**
18866
+ * Could not detect language of the file (it may not be speech).
18867
+ */
18868
+ languageDetectionFailed?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonAudioTranscriptionErrorLanguageDetectionFailed;
18869
+ /**
18870
+ * No audio was detected in the input file (it may have been a video).
18871
+ */
18872
+ noAudioDetected?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonAudioTranscriptionErrorNoAudioDetected;
18873
+ }
18874
+ /**
18875
+ * Could not detect language of the file (it may not be speech).
18876
+ */
18877
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonAudioTranscriptionErrorLanguageDetectionFailed {}
18878
+ /**
18879
+ * No audio was detected in the input file.
18880
+ */
18881
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonAudioTranscriptionErrorNoAudioDetected {}
18882
+ /**
18883
+ * Error to indicate that the source was removed because the domain was blocked.
18884
+ */
18885
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonDomainBlocked {}
18886
+ /**
18887
+ * A google drive specific error.
18888
+ */
18889
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonGoogleDriveError {
18890
+ /**
18891
+ * The user was prevented from downloading the file.
18892
+ */
18893
+ downloadPrevented?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonGoogleDriveErrorDownloadPrevented;
18894
+ }
18895
+ /**
18896
+ * The user was prevented from downloading the file.
18897
+ */
18898
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonGoogleDriveErrorDownloadPrevented {}
18899
+ /**
18900
+ * Indicates an error occurred while ingesting the source.
18901
+ */
18902
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonIngestionError {}
18903
+ /**
18904
+ * Indicates that the source MIME type is blocked.
18905
+ */
18906
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonMimeTypeBlocked {}
18907
+ /**
18908
+ * Indicates that the source is paywalled and cannot be ingested.
18909
+ */
18910
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonPaywallError {}
18911
+ /**
18912
+ * Indicates that the policy check failed.
18913
+ */
18914
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonPolicyCheckFailed {}
18915
+ /**
18916
+ * Indicates that the source is empty.
18917
+ */
18918
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonSourceEmpty {}
18919
+ /**
18920
+ * Indicates that the user does not have space for this source.
18921
+ */
18922
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonSourceLimitExceeded {}
18923
+ /**
18924
+ * Indicates source word count exceeded the user's limit.
18925
+ */
18926
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonSourceTooLong {
18927
+ /**
18928
+ * The number of words in the source.
18929
+ */
18930
+ wordCount?: number | null;
18931
+ /**
18932
+ * The word count limit for the current user at the time of the upload.
18933
+ */
18934
+ wordLimit?: number | null;
18935
+ }
18936
+ /**
18937
+ * Indicates that the source is unreachable. This is primarily used for sources that are added via URL.
18938
+ */
18939
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonSourceUnreachable {
18940
+ /**
18941
+ * Describes why the source is unreachable.
18942
+ */
18943
+ errorDetails?: string | null;
18944
+ }
18945
+ /**
18946
+ * Indicates an unknown error occurred.
18947
+ */
18948
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonUnknown {}
18949
+ /**
18950
+ * Indicates an error occurred while uploading the source.
18951
+ */
18952
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonUploadError {}
18953
+ /**
18954
+ * A youtube specific error.
18955
+ */
18956
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonYoutubeError {
18957
+ /**
18958
+ * Error to indicate that the source was removed because the video was deleted.
18959
+ */
18960
+ videoDeleted?: Schema$GoogleCloudNotebooklmV1alphaFailureReasonYoutubeErrorVideoDeleted;
18961
+ }
18962
+ /**
18963
+ * Error to indicate that the source was removed because the video was deleted.
18964
+ */
18965
+ export interface Schema$GoogleCloudNotebooklmV1alphaFailureReasonYoutubeErrorVideoDeleted {}
18966
+ /**
18967
+ * Metadata about a google doc source.
18968
+ */
18969
+ export interface Schema$GoogleCloudNotebooklmV1alphaGoogleDocsSourceMetadata {
18970
+ /**
18971
+ * Output only. The document id of the google doc.
18972
+ */
18973
+ documentId?: string | null;
18974
+ /**
18975
+ * Output only. Revision id for the doc.
18976
+ */
18977
+ revisionId?: string | null;
18978
+ }
18979
+ /**
18980
+ * Response for NotebookService.ListRecentlyViewedNotebooks method.
18981
+ */
18982
+ export interface Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse {
18983
+ /**
18984
+ * The page token, provide this to retrieve the subsequent page.
18985
+ */
18986
+ nextPageToken?: string | null;
18987
+ /**
18988
+ * The list of recently viewed notebooks.
18989
+ */
18990
+ notebooks?: Schema$GoogleCloudNotebooklmV1alphaNotebook[];
18991
+ }
18992
+ /**
18993
+ * Notebook is a resource where users can store their content (as sources) and interacts with the content.
18994
+ */
18995
+ export interface Schema$GoogleCloudNotebooklmV1alphaNotebook {
18996
+ /**
18997
+ * Output only. CMEK-related information for the Notebook.
18998
+ */
18999
+ cmekConfig?: Schema$GoogleCloudNotebooklmV1alphaCmekConfig;
19000
+ /**
19001
+ * Output only. The emoji of the notebook.
19002
+ */
19003
+ emoji?: string | null;
19004
+ /**
19005
+ * Output only. The metadata of the notebook.
19006
+ */
19007
+ metadata?: Schema$GoogleCloudNotebooklmV1alphaNotebookMetadata;
19008
+ /**
19009
+ * Identifier. The identifier of the notebook. Format: `projects/{project\}/locations/{location\}/notebooks/{notebook_id\}`. This field must be a UTF-8 encoded string.
19010
+ */
19011
+ name?: string | null;
19012
+ /**
19013
+ * Output only. Notebook id, which is the last segment of the notebook's resource name.
19014
+ */
19015
+ notebookId?: string | null;
19016
+ /**
19017
+ * Output only. List of sources in the notebook. This is an output only field.
19018
+ */
19019
+ sources?: Schema$GoogleCloudNotebooklmV1alphaSource[];
19020
+ /**
19021
+ * Optional. The title of the notebook.
19022
+ */
19023
+ title?: string | null;
19024
+ }
19025
+ /**
19026
+ * Metadata for a notebook.
19027
+ */
19028
+ export interface Schema$GoogleCloudNotebooklmV1alphaNotebookMetadata {
19029
+ /**
19030
+ * The time at which this project was created.
19031
+ */
19032
+ createTime?: string | null;
19033
+ /**
19034
+ * True if the project is shareable.
19035
+ */
19036
+ isShareable?: boolean | null;
19037
+ /**
19038
+ * True if this project is currently shared with other people, false otherwise.
19039
+ */
19040
+ isShared?: boolean | null;
19041
+ /**
19042
+ * A timestamp indicating the time that the current in session user has last viewed the project.
19043
+ */
19044
+ lastViewed?: string | null;
19045
+ }
19046
+ /**
19047
+ * Request for NotebookService.ShareNotebook method.
19048
+ */
19049
+ export interface Schema$GoogleCloudNotebooklmV1alphaShareNotebookRequest {
19050
+ /**
19051
+ * Required. The list of accounts and roles to share the notebook with.
19052
+ */
19053
+ accountAndRoles?: Schema$GoogleCloudNotebooklmV1alphaAccountAndRole[];
19054
+ /**
19055
+ * Required. Whether to notify the shared users via email.
19056
+ */
19057
+ notifyViaEmail?: boolean | null;
19058
+ }
19059
+ /**
19060
+ * Response for NotebookService.ShareNotebook method.
19061
+ */
19062
+ export interface Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse {}
19063
+ /**
19064
+ * Source represents a single source of content.
19065
+ */
19066
+ export interface Schema$GoogleCloudNotebooklmV1alphaSource {
19067
+ /**
19068
+ * Output only. Metadata about the source.
19069
+ */
19070
+ metadata?: Schema$GoogleCloudNotebooklmV1alphaSourceMetadata;
19071
+ /**
19072
+ * Identifier. The full resource name of the source. Format: `projects/{project\}/locations/{location\}/notebooks/{notebook\}/sources/{source_id\}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
19073
+ */
19074
+ name?: string | null;
19075
+ /**
19076
+ * Output only. Status of the source, and any failure reasons.
19077
+ */
19078
+ settings?: Schema$GoogleCloudNotebooklmV1alphaSourceSettings;
19079
+ /**
19080
+ * Optional. Output only. Source id, which is the last segment of the source's resource name.
19081
+ */
19082
+ sourceId?: Schema$GoogleCloudNotebooklmV1alphaSourceId;
19083
+ /**
19084
+ * Optional. Title of the source.
19085
+ */
19086
+ title?: string | null;
19087
+ }
18627
19088
  /**
18628
19089
  * SourceId is the last segment of the source's resource name.
18629
19090
  */
@@ -18633,6 +19094,155 @@ export namespace discoveryengine_v1alpha {
18633
19094
  */
18634
19095
  id?: string | null;
18635
19096
  }
19097
+ /**
19098
+ * Represents the metadata of a source and some additional information.
19099
+ */
19100
+ export interface Schema$GoogleCloudNotebooklmV1alphaSourceMetadata {
19101
+ /**
19102
+ * Metadata for an agentspace source.
19103
+ */
19104
+ agentspaceMetadata?: Schema$GoogleCloudNotebooklmV1alphaAgentspaceMetadata;
19105
+ /**
19106
+ * Metadata for a google doc source.
19107
+ */
19108
+ googleDocsMetadata?: Schema$GoogleCloudNotebooklmV1alphaGoogleDocsSourceMetadata;
19109
+ /**
19110
+ * The timestamp the source was added.
19111
+ */
19112
+ sourceAddedTimestamp?: string | null;
19113
+ /**
19114
+ * The number of tokens in the source.
19115
+ */
19116
+ tokenCount?: number | null;
19117
+ /**
19118
+ * The word count of the source.
19119
+ */
19120
+ wordCount?: number | null;
19121
+ /**
19122
+ * Metadata for a youtube video source.
19123
+ */
19124
+ youtubeMetadata?: Schema$GoogleCloudNotebooklmV1alphaYoutubeMetadata;
19125
+ }
19126
+ /**
19127
+ * Allows extension of Source Settings in the BatchCreateSources (Formerly AddSource request).
19128
+ */
19129
+ export interface Schema$GoogleCloudNotebooklmV1alphaSourceSettings {
19130
+ /**
19131
+ * Failure reason containing details about why a source failed to ingest.
19132
+ */
19133
+ failureReason?: Schema$GoogleCloudNotebooklmV1alphaFailureReason;
19134
+ /**
19135
+ * Status of the source.
19136
+ */
19137
+ status?: string | null;
19138
+ }
19139
+ /**
19140
+ * The "Content" messages refer to data the user wants to upload.
19141
+ */
19142
+ export interface Schema$GoogleCloudNotebooklmV1alphaUserContent {
19143
+ /**
19144
+ * Agentspace content uploaded as source.
19145
+ */
19146
+ agentspaceContent?: Schema$GoogleCloudNotebooklmV1alphaUserContentAgentspaceContent;
19147
+ /**
19148
+ * The content from Google Drive.
19149
+ */
19150
+ googleDriveContent?: Schema$GoogleCloudNotebooklmV1alphaUserContentGoogleDriveContent;
19151
+ /**
19152
+ * The text content uploaded as source.
19153
+ */
19154
+ textContent?: Schema$GoogleCloudNotebooklmV1alphaUserContentTextContent;
19155
+ /**
19156
+ * The video content uploaded as source.
19157
+ */
19158
+ videoContent?: Schema$GoogleCloudNotebooklmV1alphaUserContentVideoContent;
19159
+ /**
19160
+ * The web content uploaded as source.
19161
+ */
19162
+ webContent?: Schema$GoogleCloudNotebooklmV1alphaUserContentWebContent;
19163
+ }
19164
+ /**
19165
+ * Agentspace content uploaded as source.
19166
+ */
19167
+ export interface Schema$GoogleCloudNotebooklmV1alphaUserContentAgentspaceContent {
19168
+ /**
19169
+ * Optional. The full resource name of the Agentspace document. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/branches/{branch\}/documents/{document_id\}`.
19170
+ */
19171
+ documentName?: string | null;
19172
+ /**
19173
+ * Optional. Engine to verify the permission of the document. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`.
19174
+ */
19175
+ engineName?: string | null;
19176
+ /**
19177
+ * Optional. Resource name of the idea forge instance. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/sessions/{session\}/ideaForgeInstances/{instance\}`
19178
+ */
19179
+ ideaforgeIdeaName?: string | null;
19180
+ }
19181
+ /**
19182
+ * The content from Google Drive.
19183
+ */
19184
+ export interface Schema$GoogleCloudNotebooklmV1alphaUserContentGoogleDriveContent {
19185
+ /**
19186
+ * The document id of the selected document.
19187
+ */
19188
+ documentId?: string | null;
19189
+ /**
19190
+ * The mime type of the selected document. This can be used to differentiate type of content selected in the drive picker. Use application/vnd.google-apps.document for Google Docs or application/vnd.google-apps.presentation for Google Slides.
19191
+ */
19192
+ mimeType?: string | null;
19193
+ /**
19194
+ * The name to be displayed for the source.
19195
+ */
19196
+ sourceName?: string | null;
19197
+ }
19198
+ /**
19199
+ * The text content uploaded as source.
19200
+ */
19201
+ export interface Schema$GoogleCloudNotebooklmV1alphaUserContentTextContent {
19202
+ /**
19203
+ * The name to be displayed for the source.
19204
+ */
19205
+ content?: string | null;
19206
+ /**
19207
+ * The display name of the text source.
19208
+ */
19209
+ sourceName?: string | null;
19210
+ }
19211
+ /**
19212
+ * Video content uploaded as source.
19213
+ */
19214
+ export interface Schema$GoogleCloudNotebooklmV1alphaUserContentVideoContent {
19215
+ /**
19216
+ * The youtube url of the video content.
19217
+ */
19218
+ youtubeUrl?: string | null;
19219
+ }
19220
+ /**
19221
+ * The web content uploaded as source.
19222
+ */
19223
+ export interface Schema$GoogleCloudNotebooklmV1alphaUserContentWebContent {
19224
+ /**
19225
+ * The name to be displayed for the source.
19226
+ */
19227
+ sourceName?: string | null;
19228
+ /**
19229
+ * If URL is supplied, will fetch the webpage in the backend.
19230
+ */
19231
+ url?: string | null;
19232
+ }
19233
+ /**
19234
+ * Metadata about a youtube video source.
19235
+ */
19236
+ export interface Schema$GoogleCloudNotebooklmV1alphaYoutubeMetadata {
19237
+ /**
19238
+ * Output only. The channel name of the youtube video.
19239
+ */
19240
+ channelName?: string | null;
19241
+ /**
19242
+ * Output only. The id of the youtube video.
19243
+ */
19244
+ videoId?: string | null;
19245
+ }
18636
19246
  /**
18637
19247
  * Associates `members`, or principals, with a `role`.
18638
19248
  */
@@ -81834,13 +82444,865 @@ export namespace discoveryengine_v1alpha {
81834
82444
  export class Resource$Projects$Locations$Notebooks {
81835
82445
  context: APIRequestContext;
81836
82446
  audioOverviews: Resource$Projects$Locations$Notebooks$Audiooverviews;
82447
+ sources: Resource$Projects$Locations$Notebooks$Sources;
81837
82448
  constructor(context: APIRequestContext) {
81838
82449
  this.context = context;
81839
82450
  this.audioOverviews =
81840
82451
  new Resource$Projects$Locations$Notebooks$Audiooverviews(this.context);
82452
+ this.sources = new Resource$Projects$Locations$Notebooks$Sources(
82453
+ this.context
82454
+ );
82455
+ }
82456
+
82457
+ /**
82458
+ * Batch deletes Notebooks.
82459
+ * @example
82460
+ * ```js
82461
+ * // Before running the sample:
82462
+ * // - Enable the API at:
82463
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
82464
+ * // - Login into gcloud by running:
82465
+ * // ```sh
82466
+ * // $ gcloud auth application-default login
82467
+ * // ```
82468
+ * // - Install the npm module by running:
82469
+ * // ```sh
82470
+ * // $ npm install googleapis
82471
+ * // ```
82472
+ *
82473
+ * const {google} = require('googleapis');
82474
+ * const discoveryengine = google.discoveryengine('v1alpha');
82475
+ *
82476
+ * async function main() {
82477
+ * const auth = new google.auth.GoogleAuth({
82478
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
82479
+ * scopes: [
82480
+ * 'https://www.googleapis.com/auth/cloud-platform',
82481
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
82482
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
82483
+ * ],
82484
+ * });
82485
+ *
82486
+ * // Acquire an auth client, and bind it to all future calls
82487
+ * const authClient = await auth.getClient();
82488
+ * google.options({auth: authClient});
82489
+ *
82490
+ * // Do the magic
82491
+ * const res = await discoveryengine.projects.locations.notebooks.batchDelete({
82492
+ * // Required. The parent branch resource name, such as `projects/{project\}/locations/{location\}`.
82493
+ * parent: 'projects/my-project/locations/my-location',
82494
+ *
82495
+ * // Request body metadata
82496
+ * requestBody: {
82497
+ * // request body parameters
82498
+ * // {
82499
+ * // "names": []
82500
+ * // }
82501
+ * },
82502
+ * });
82503
+ * console.log(res.data);
82504
+ *
82505
+ * // Example response
82506
+ * // {}
82507
+ * }
82508
+ *
82509
+ * main().catch(e => {
82510
+ * console.error(e);
82511
+ * throw e;
82512
+ * });
82513
+ *
82514
+ * ```
82515
+ *
82516
+ * @param params - Parameters for request
82517
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
82518
+ * @param callback - Optional callback that handles the response.
82519
+ * @returns A promise if used with async/await, or void if used with a callback.
82520
+ */
82521
+ batchDelete(
82522
+ params: Params$Resource$Projects$Locations$Notebooks$Batchdelete,
82523
+ options: StreamMethodOptions
82524
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
82525
+ batchDelete(
82526
+ params?: Params$Resource$Projects$Locations$Notebooks$Batchdelete,
82527
+ options?: MethodOptions
82528
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
82529
+ batchDelete(
82530
+ params: Params$Resource$Projects$Locations$Notebooks$Batchdelete,
82531
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
82532
+ callback: BodyResponseCallback<Readable>
82533
+ ): void;
82534
+ batchDelete(
82535
+ params: Params$Resource$Projects$Locations$Notebooks$Batchdelete,
82536
+ options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>,
82537
+ callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
82538
+ ): void;
82539
+ batchDelete(
82540
+ params: Params$Resource$Projects$Locations$Notebooks$Batchdelete,
82541
+ callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
82542
+ ): void;
82543
+ batchDelete(
82544
+ callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
82545
+ ): void;
82546
+ batchDelete(
82547
+ paramsOrCallback?:
82548
+ | Params$Resource$Projects$Locations$Notebooks$Batchdelete
82549
+ | BodyResponseCallback<Schema$GoogleProtobufEmpty>
82550
+ | BodyResponseCallback<Readable>,
82551
+ optionsOrCallback?:
82552
+ | MethodOptions
82553
+ | StreamMethodOptions
82554
+ | BodyResponseCallback<Schema$GoogleProtobufEmpty>
82555
+ | BodyResponseCallback<Readable>,
82556
+ callback?:
82557
+ | BodyResponseCallback<Schema$GoogleProtobufEmpty>
82558
+ | BodyResponseCallback<Readable>
82559
+ ):
82560
+ | void
82561
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>
82562
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
82563
+ let params = (paramsOrCallback ||
82564
+ {}) as Params$Resource$Projects$Locations$Notebooks$Batchdelete;
82565
+ let options = (optionsOrCallback || {}) as MethodOptions;
82566
+
82567
+ if (typeof paramsOrCallback === 'function') {
82568
+ callback = paramsOrCallback;
82569
+ params = {} as Params$Resource$Projects$Locations$Notebooks$Batchdelete;
82570
+ options = {};
82571
+ }
82572
+
82573
+ if (typeof optionsOrCallback === 'function') {
82574
+ callback = optionsOrCallback;
82575
+ options = {};
82576
+ }
82577
+
82578
+ const rootUrl =
82579
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
82580
+ const parameters = {
82581
+ options: Object.assign(
82582
+ {
82583
+ url: (rootUrl + '/v1alpha/{+parent}/notebooks:batchDelete').replace(
82584
+ /([^:]\/)\/+/g,
82585
+ '$1'
82586
+ ),
82587
+ method: 'POST',
82588
+ apiVersion: '',
82589
+ },
82590
+ options
82591
+ ),
82592
+ params,
82593
+ requiredParams: ['parent'],
82594
+ pathParams: ['parent'],
82595
+ context: this.context,
82596
+ };
82597
+ if (callback) {
82598
+ createAPIRequest<Schema$GoogleProtobufEmpty>(
82599
+ parameters,
82600
+ callback as BodyResponseCallback<unknown>
82601
+ );
82602
+ } else {
82603
+ return createAPIRequest<Schema$GoogleProtobufEmpty>(parameters);
82604
+ }
82605
+ }
82606
+
82607
+ /**
82608
+ * Creates a notebook.
82609
+ * @example
82610
+ * ```js
82611
+ * // Before running the sample:
82612
+ * // - Enable the API at:
82613
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
82614
+ * // - Login into gcloud by running:
82615
+ * // ```sh
82616
+ * // $ gcloud auth application-default login
82617
+ * // ```
82618
+ * // - Install the npm module by running:
82619
+ * // ```sh
82620
+ * // $ npm install googleapis
82621
+ * // ```
82622
+ *
82623
+ * const {google} = require('googleapis');
82624
+ * const discoveryengine = google.discoveryengine('v1alpha');
82625
+ *
82626
+ * async function main() {
82627
+ * const auth = new google.auth.GoogleAuth({
82628
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
82629
+ * scopes: [
82630
+ * 'https://www.googleapis.com/auth/cloud-platform',
82631
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
82632
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
82633
+ * ],
82634
+ * });
82635
+ *
82636
+ * // Acquire an auth client, and bind it to all future calls
82637
+ * const authClient = await auth.getClient();
82638
+ * google.options({auth: authClient});
82639
+ *
82640
+ * // Do the magic
82641
+ * const res = await discoveryengine.projects.locations.notebooks.create({
82642
+ * // Required. The parent resource name, such as `projects/{project\}/locations/{location\}`.
82643
+ * parent: 'projects/my-project/locations/my-location',
82644
+ *
82645
+ * // Request body metadata
82646
+ * requestBody: {
82647
+ * // request body parameters
82648
+ * // {
82649
+ * // "cmekConfig": {},
82650
+ * // "emoji": "my_emoji",
82651
+ * // "metadata": {},
82652
+ * // "name": "my_name",
82653
+ * // "notebookId": "my_notebookId",
82654
+ * // "sources": [],
82655
+ * // "title": "my_title"
82656
+ * // }
82657
+ * },
82658
+ * });
82659
+ * console.log(res.data);
82660
+ *
82661
+ * // Example response
82662
+ * // {
82663
+ * // "cmekConfig": {},
82664
+ * // "emoji": "my_emoji",
82665
+ * // "metadata": {},
82666
+ * // "name": "my_name",
82667
+ * // "notebookId": "my_notebookId",
82668
+ * // "sources": [],
82669
+ * // "title": "my_title"
82670
+ * // }
82671
+ * }
82672
+ *
82673
+ * main().catch(e => {
82674
+ * console.error(e);
82675
+ * throw e;
82676
+ * });
82677
+ *
82678
+ * ```
82679
+ *
82680
+ * @param params - Parameters for request
82681
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
82682
+ * @param callback - Optional callback that handles the response.
82683
+ * @returns A promise if used with async/await, or void if used with a callback.
82684
+ */
82685
+ create(
82686
+ params: Params$Resource$Projects$Locations$Notebooks$Create,
82687
+ options: StreamMethodOptions
82688
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
82689
+ create(
82690
+ params?: Params$Resource$Projects$Locations$Notebooks$Create,
82691
+ options?: MethodOptions
82692
+ ): Promise<
82693
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82694
+ >;
82695
+ create(
82696
+ params: Params$Resource$Projects$Locations$Notebooks$Create,
82697
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
82698
+ callback: BodyResponseCallback<Readable>
82699
+ ): void;
82700
+ create(
82701
+ params: Params$Resource$Projects$Locations$Notebooks$Create,
82702
+ options:
82703
+ | MethodOptions
82704
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>,
82705
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82706
+ ): void;
82707
+ create(
82708
+ params: Params$Resource$Projects$Locations$Notebooks$Create,
82709
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82710
+ ): void;
82711
+ create(
82712
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82713
+ ): void;
82714
+ create(
82715
+ paramsOrCallback?:
82716
+ | Params$Resource$Projects$Locations$Notebooks$Create
82717
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82718
+ | BodyResponseCallback<Readable>,
82719
+ optionsOrCallback?:
82720
+ | MethodOptions
82721
+ | StreamMethodOptions
82722
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82723
+ | BodyResponseCallback<Readable>,
82724
+ callback?:
82725
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82726
+ | BodyResponseCallback<Readable>
82727
+ ):
82728
+ | void
82729
+ | Promise<
82730
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82731
+ >
82732
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
82733
+ let params = (paramsOrCallback ||
82734
+ {}) as Params$Resource$Projects$Locations$Notebooks$Create;
82735
+ let options = (optionsOrCallback || {}) as MethodOptions;
82736
+
82737
+ if (typeof paramsOrCallback === 'function') {
82738
+ callback = paramsOrCallback;
82739
+ params = {} as Params$Resource$Projects$Locations$Notebooks$Create;
82740
+ options = {};
82741
+ }
82742
+
82743
+ if (typeof optionsOrCallback === 'function') {
82744
+ callback = optionsOrCallback;
82745
+ options = {};
82746
+ }
82747
+
82748
+ const rootUrl =
82749
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
82750
+ const parameters = {
82751
+ options: Object.assign(
82752
+ {
82753
+ url: (rootUrl + '/v1alpha/{+parent}/notebooks').replace(
82754
+ /([^:]\/)\/+/g,
82755
+ '$1'
82756
+ ),
82757
+ method: 'POST',
82758
+ apiVersion: '',
82759
+ },
82760
+ options
82761
+ ),
82762
+ params,
82763
+ requiredParams: ['parent'],
82764
+ pathParams: ['parent'],
82765
+ context: this.context,
82766
+ };
82767
+ if (callback) {
82768
+ createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaNotebook>(
82769
+ parameters,
82770
+ callback as BodyResponseCallback<unknown>
82771
+ );
82772
+ } else {
82773
+ return createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaNotebook>(
82774
+ parameters
82775
+ );
82776
+ }
82777
+ }
82778
+
82779
+ /**
82780
+ * Gets a notebook.
82781
+ * @example
82782
+ * ```js
82783
+ * // Before running the sample:
82784
+ * // - Enable the API at:
82785
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
82786
+ * // - Login into gcloud by running:
82787
+ * // ```sh
82788
+ * // $ gcloud auth application-default login
82789
+ * // ```
82790
+ * // - Install the npm module by running:
82791
+ * // ```sh
82792
+ * // $ npm install googleapis
82793
+ * // ```
82794
+ *
82795
+ * const {google} = require('googleapis');
82796
+ * const discoveryengine = google.discoveryengine('v1alpha');
82797
+ *
82798
+ * async function main() {
82799
+ * const auth = new google.auth.GoogleAuth({
82800
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
82801
+ * scopes: [
82802
+ * 'https://www.googleapis.com/auth/cloud-platform',
82803
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
82804
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
82805
+ * ],
82806
+ * });
82807
+ *
82808
+ * // Acquire an auth client, and bind it to all future calls
82809
+ * const authClient = await auth.getClient();
82810
+ * google.options({auth: authClient});
82811
+ *
82812
+ * // Do the magic
82813
+ * const res = await discoveryengine.projects.locations.notebooks.get({
82814
+ * // Required. Full resource name of Notebook, such as `projects/{project\}/locations/{location\}/notebooks/{notebook_id\}`.
82815
+ * name: 'projects/my-project/locations/my-location/notebooks/my-notebook',
82816
+ * });
82817
+ * console.log(res.data);
82818
+ *
82819
+ * // Example response
82820
+ * // {
82821
+ * // "cmekConfig": {},
82822
+ * // "emoji": "my_emoji",
82823
+ * // "metadata": {},
82824
+ * // "name": "my_name",
82825
+ * // "notebookId": "my_notebookId",
82826
+ * // "sources": [],
82827
+ * // "title": "my_title"
82828
+ * // }
82829
+ * }
82830
+ *
82831
+ * main().catch(e => {
82832
+ * console.error(e);
82833
+ * throw e;
82834
+ * });
82835
+ *
82836
+ * ```
82837
+ *
82838
+ * @param params - Parameters for request
82839
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
82840
+ * @param callback - Optional callback that handles the response.
82841
+ * @returns A promise if used with async/await, or void if used with a callback.
82842
+ */
82843
+ get(
82844
+ params: Params$Resource$Projects$Locations$Notebooks$Get,
82845
+ options: StreamMethodOptions
82846
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
82847
+ get(
82848
+ params?: Params$Resource$Projects$Locations$Notebooks$Get,
82849
+ options?: MethodOptions
82850
+ ): Promise<
82851
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82852
+ >;
82853
+ get(
82854
+ params: Params$Resource$Projects$Locations$Notebooks$Get,
82855
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
82856
+ callback: BodyResponseCallback<Readable>
82857
+ ): void;
82858
+ get(
82859
+ params: Params$Resource$Projects$Locations$Notebooks$Get,
82860
+ options:
82861
+ | MethodOptions
82862
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>,
82863
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82864
+ ): void;
82865
+ get(
82866
+ params: Params$Resource$Projects$Locations$Notebooks$Get,
82867
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82868
+ ): void;
82869
+ get(
82870
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82871
+ ): void;
82872
+ get(
82873
+ paramsOrCallback?:
82874
+ | Params$Resource$Projects$Locations$Notebooks$Get
82875
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82876
+ | BodyResponseCallback<Readable>,
82877
+ optionsOrCallback?:
82878
+ | MethodOptions
82879
+ | StreamMethodOptions
82880
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82881
+ | BodyResponseCallback<Readable>,
82882
+ callback?:
82883
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82884
+ | BodyResponseCallback<Readable>
82885
+ ):
82886
+ | void
82887
+ | Promise<
82888
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaNotebook>
82889
+ >
82890
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
82891
+ let params = (paramsOrCallback ||
82892
+ {}) as Params$Resource$Projects$Locations$Notebooks$Get;
82893
+ let options = (optionsOrCallback || {}) as MethodOptions;
82894
+
82895
+ if (typeof paramsOrCallback === 'function') {
82896
+ callback = paramsOrCallback;
82897
+ params = {} as Params$Resource$Projects$Locations$Notebooks$Get;
82898
+ options = {};
82899
+ }
82900
+
82901
+ if (typeof optionsOrCallback === 'function') {
82902
+ callback = optionsOrCallback;
82903
+ options = {};
82904
+ }
82905
+
82906
+ const rootUrl =
82907
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
82908
+ const parameters = {
82909
+ options: Object.assign(
82910
+ {
82911
+ url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
82912
+ method: 'GET',
82913
+ apiVersion: '',
82914
+ },
82915
+ options
82916
+ ),
82917
+ params,
82918
+ requiredParams: ['name'],
82919
+ pathParams: ['name'],
82920
+ context: this.context,
82921
+ };
82922
+ if (callback) {
82923
+ createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaNotebook>(
82924
+ parameters,
82925
+ callback as BodyResponseCallback<unknown>
82926
+ );
82927
+ } else {
82928
+ return createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaNotebook>(
82929
+ parameters
82930
+ );
82931
+ }
82932
+ }
82933
+
82934
+ /**
82935
+ * Lists the notebooks ordered by last view time.
82936
+ * @example
82937
+ * ```js
82938
+ * // Before running the sample:
82939
+ * // - Enable the API at:
82940
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
82941
+ * // - Login into gcloud by running:
82942
+ * // ```sh
82943
+ * // $ gcloud auth application-default login
82944
+ * // ```
82945
+ * // - Install the npm module by running:
82946
+ * // ```sh
82947
+ * // $ npm install googleapis
82948
+ * // ```
82949
+ *
82950
+ * const {google} = require('googleapis');
82951
+ * const discoveryengine = google.discoveryengine('v1alpha');
82952
+ *
82953
+ * async function main() {
82954
+ * const auth = new google.auth.GoogleAuth({
82955
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
82956
+ * scopes: [
82957
+ * 'https://www.googleapis.com/auth/cloud-platform',
82958
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
82959
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
82960
+ * ],
82961
+ * });
82962
+ *
82963
+ * // Acquire an auth client, and bind it to all future calls
82964
+ * const authClient = await auth.getClient();
82965
+ * google.options({auth: authClient});
82966
+ *
82967
+ * // Do the magic
82968
+ * const res =
82969
+ * await discoveryengine.projects.locations.notebooks.listRecentlyViewed({
82970
+ * // Optional. Maximum number of Notebooks to return. If unspecified, defaults to "500". The maximum allowed value is "500". If this field is negative, will use the default value.
82971
+ * pageSize: 'placeholder-value',
82972
+ * // Optional. The page token, provide this to retrieve the subsequent page.
82973
+ * pageToken: 'placeholder-value',
82974
+ * // Required. The parent branch resource name, such as `projects/{project\}/locations/{location\}`.
82975
+ * parent: 'projects/my-project/locations/my-location',
82976
+ * });
82977
+ * console.log(res.data);
82978
+ *
82979
+ * // Example response
82980
+ * // {
82981
+ * // "nextPageToken": "my_nextPageToken",
82982
+ * // "notebooks": []
82983
+ * // }
82984
+ * }
82985
+ *
82986
+ * main().catch(e => {
82987
+ * console.error(e);
82988
+ * throw e;
82989
+ * });
82990
+ *
82991
+ * ```
82992
+ *
82993
+ * @param params - Parameters for request
82994
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
82995
+ * @param callback - Optional callback that handles the response.
82996
+ * @returns A promise if used with async/await, or void if used with a callback.
82997
+ */
82998
+ listRecentlyViewed(
82999
+ params: Params$Resource$Projects$Locations$Notebooks$Listrecentlyviewed,
83000
+ options: StreamMethodOptions
83001
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
83002
+ listRecentlyViewed(
83003
+ params?: Params$Resource$Projects$Locations$Notebooks$Listrecentlyviewed,
83004
+ options?: MethodOptions
83005
+ ): Promise<
83006
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse>
83007
+ >;
83008
+ listRecentlyViewed(
83009
+ params: Params$Resource$Projects$Locations$Notebooks$Listrecentlyviewed,
83010
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
83011
+ callback: BodyResponseCallback<Readable>
83012
+ ): void;
83013
+ listRecentlyViewed(
83014
+ params: Params$Resource$Projects$Locations$Notebooks$Listrecentlyviewed,
83015
+ options:
83016
+ | MethodOptions
83017
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse>,
83018
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse>
83019
+ ): void;
83020
+ listRecentlyViewed(
83021
+ params: Params$Resource$Projects$Locations$Notebooks$Listrecentlyviewed,
83022
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse>
83023
+ ): void;
83024
+ listRecentlyViewed(
83025
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse>
83026
+ ): void;
83027
+ listRecentlyViewed(
83028
+ paramsOrCallback?:
83029
+ | Params$Resource$Projects$Locations$Notebooks$Listrecentlyviewed
83030
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse>
83031
+ | BodyResponseCallback<Readable>,
83032
+ optionsOrCallback?:
83033
+ | MethodOptions
83034
+ | StreamMethodOptions
83035
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse>
83036
+ | BodyResponseCallback<Readable>,
83037
+ callback?:
83038
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse>
83039
+ | BodyResponseCallback<Readable>
83040
+ ):
83041
+ | void
83042
+ | Promise<
83043
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse>
83044
+ >
83045
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
83046
+ let params = (paramsOrCallback ||
83047
+ {}) as Params$Resource$Projects$Locations$Notebooks$Listrecentlyviewed;
83048
+ let options = (optionsOrCallback || {}) as MethodOptions;
83049
+
83050
+ if (typeof paramsOrCallback === 'function') {
83051
+ callback = paramsOrCallback;
83052
+ params =
83053
+ {} as Params$Resource$Projects$Locations$Notebooks$Listrecentlyviewed;
83054
+ options = {};
83055
+ }
83056
+
83057
+ if (typeof optionsOrCallback === 'function') {
83058
+ callback = optionsOrCallback;
83059
+ options = {};
83060
+ }
83061
+
83062
+ const rootUrl =
83063
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
83064
+ const parameters = {
83065
+ options: Object.assign(
83066
+ {
83067
+ url: (
83068
+ rootUrl + '/v1alpha/{+parent}/notebooks:listRecentlyViewed'
83069
+ ).replace(/([^:]\/)\/+/g, '$1'),
83070
+ method: 'GET',
83071
+ apiVersion: '',
83072
+ },
83073
+ options
83074
+ ),
83075
+ params,
83076
+ requiredParams: ['parent'],
83077
+ pathParams: ['parent'],
83078
+ context: this.context,
83079
+ };
83080
+ if (callback) {
83081
+ createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse>(
83082
+ parameters,
83083
+ callback as BodyResponseCallback<unknown>
83084
+ );
83085
+ } else {
83086
+ return createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaListRecentlyViewedNotebooksResponse>(
83087
+ parameters
83088
+ );
83089
+ }
83090
+ }
83091
+
83092
+ /**
83093
+ * Shares a notebook to other accounts.
83094
+ * @example
83095
+ * ```js
83096
+ * // Before running the sample:
83097
+ * // - Enable the API at:
83098
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
83099
+ * // - Login into gcloud by running:
83100
+ * // ```sh
83101
+ * // $ gcloud auth application-default login
83102
+ * // ```
83103
+ * // - Install the npm module by running:
83104
+ * // ```sh
83105
+ * // $ npm install googleapis
83106
+ * // ```
83107
+ *
83108
+ * const {google} = require('googleapis');
83109
+ * const discoveryengine = google.discoveryengine('v1alpha');
83110
+ *
83111
+ * async function main() {
83112
+ * const auth = new google.auth.GoogleAuth({
83113
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
83114
+ * scopes: [
83115
+ * 'https://www.googleapis.com/auth/cloud-platform',
83116
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
83117
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
83118
+ * ],
83119
+ * });
83120
+ *
83121
+ * // Acquire an auth client, and bind it to all future calls
83122
+ * const authClient = await auth.getClient();
83123
+ * google.options({auth: authClient});
83124
+ *
83125
+ * // Do the magic
83126
+ * const res = await discoveryengine.projects.locations.notebooks.share({
83127
+ * // Required. Full resource name of Notebook, such as `projects/{project\}/locations/{location\}/notebooks/{notebook_id\}`.
83128
+ * name: 'projects/my-project/locations/my-location/notebooks/my-notebook',
83129
+ *
83130
+ * // Request body metadata
83131
+ * requestBody: {
83132
+ * // request body parameters
83133
+ * // {
83134
+ * // "accountAndRoles": [],
83135
+ * // "notifyViaEmail": false
83136
+ * // }
83137
+ * },
83138
+ * });
83139
+ * console.log(res.data);
83140
+ *
83141
+ * // Example response
83142
+ * // {}
83143
+ * }
83144
+ *
83145
+ * main().catch(e => {
83146
+ * console.error(e);
83147
+ * throw e;
83148
+ * });
83149
+ *
83150
+ * ```
83151
+ *
83152
+ * @param params - Parameters for request
83153
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
83154
+ * @param callback - Optional callback that handles the response.
83155
+ * @returns A promise if used with async/await, or void if used with a callback.
83156
+ */
83157
+ share(
83158
+ params: Params$Resource$Projects$Locations$Notebooks$Share,
83159
+ options: StreamMethodOptions
83160
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
83161
+ share(
83162
+ params?: Params$Resource$Projects$Locations$Notebooks$Share,
83163
+ options?: MethodOptions
83164
+ ): Promise<
83165
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse>
83166
+ >;
83167
+ share(
83168
+ params: Params$Resource$Projects$Locations$Notebooks$Share,
83169
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
83170
+ callback: BodyResponseCallback<Readable>
83171
+ ): void;
83172
+ share(
83173
+ params: Params$Resource$Projects$Locations$Notebooks$Share,
83174
+ options:
83175
+ | MethodOptions
83176
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse>,
83177
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse>
83178
+ ): void;
83179
+ share(
83180
+ params: Params$Resource$Projects$Locations$Notebooks$Share,
83181
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse>
83182
+ ): void;
83183
+ share(
83184
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse>
83185
+ ): void;
83186
+ share(
83187
+ paramsOrCallback?:
83188
+ | Params$Resource$Projects$Locations$Notebooks$Share
83189
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse>
83190
+ | BodyResponseCallback<Readable>,
83191
+ optionsOrCallback?:
83192
+ | MethodOptions
83193
+ | StreamMethodOptions
83194
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse>
83195
+ | BodyResponseCallback<Readable>,
83196
+ callback?:
83197
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse>
83198
+ | BodyResponseCallback<Readable>
83199
+ ):
83200
+ | void
83201
+ | Promise<
83202
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse>
83203
+ >
83204
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
83205
+ let params = (paramsOrCallback ||
83206
+ {}) as Params$Resource$Projects$Locations$Notebooks$Share;
83207
+ let options = (optionsOrCallback || {}) as MethodOptions;
83208
+
83209
+ if (typeof paramsOrCallback === 'function') {
83210
+ callback = paramsOrCallback;
83211
+ params = {} as Params$Resource$Projects$Locations$Notebooks$Share;
83212
+ options = {};
83213
+ }
83214
+
83215
+ if (typeof optionsOrCallback === 'function') {
83216
+ callback = optionsOrCallback;
83217
+ options = {};
83218
+ }
83219
+
83220
+ const rootUrl =
83221
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
83222
+ const parameters = {
83223
+ options: Object.assign(
83224
+ {
83225
+ url: (rootUrl + '/v1alpha/{+name}:share').replace(
83226
+ /([^:]\/)\/+/g,
83227
+ '$1'
83228
+ ),
83229
+ method: 'POST',
83230
+ apiVersion: '',
83231
+ },
83232
+ options
83233
+ ),
83234
+ params,
83235
+ requiredParams: ['name'],
83236
+ pathParams: ['name'],
83237
+ context: this.context,
83238
+ };
83239
+ if (callback) {
83240
+ createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse>(
83241
+ parameters,
83242
+ callback as BodyResponseCallback<unknown>
83243
+ );
83244
+ } else {
83245
+ return createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaShareNotebookResponse>(
83246
+ parameters
83247
+ );
83248
+ }
81841
83249
  }
81842
83250
  }
81843
83251
 
83252
+ export interface Params$Resource$Projects$Locations$Notebooks$Batchdelete extends StandardParameters {
83253
+ /**
83254
+ * Required. The parent branch resource name, such as `projects/{project\}/locations/{location\}`.
83255
+ */
83256
+ parent?: string;
83257
+
83258
+ /**
83259
+ * Request body metadata
83260
+ */
83261
+ requestBody?: Schema$GoogleCloudNotebooklmV1alphaBatchDeleteNotebooksRequest;
83262
+ }
83263
+ export interface Params$Resource$Projects$Locations$Notebooks$Create extends StandardParameters {
83264
+ /**
83265
+ * Required. The parent resource name, such as `projects/{project\}/locations/{location\}`.
83266
+ */
83267
+ parent?: string;
83268
+
83269
+ /**
83270
+ * Request body metadata
83271
+ */
83272
+ requestBody?: Schema$GoogleCloudNotebooklmV1alphaNotebook;
83273
+ }
83274
+ export interface Params$Resource$Projects$Locations$Notebooks$Get extends StandardParameters {
83275
+ /**
83276
+ * Required. Full resource name of Notebook, such as `projects/{project\}/locations/{location\}/notebooks/{notebook_id\}`.
83277
+ */
83278
+ name?: string;
83279
+ }
83280
+ export interface Params$Resource$Projects$Locations$Notebooks$Listrecentlyviewed extends StandardParameters {
83281
+ /**
83282
+ * Optional. Maximum number of Notebooks to return. If unspecified, defaults to "500". The maximum allowed value is "500". If this field is negative, will use the default value.
83283
+ */
83284
+ pageSize?: number;
83285
+ /**
83286
+ * Optional. The page token, provide this to retrieve the subsequent page.
83287
+ */
83288
+ pageToken?: string;
83289
+ /**
83290
+ * Required. The parent branch resource name, such as `projects/{project\}/locations/{location\}`.
83291
+ */
83292
+ parent?: string;
83293
+ }
83294
+ export interface Params$Resource$Projects$Locations$Notebooks$Share extends StandardParameters {
83295
+ /**
83296
+ * Required. Full resource name of Notebook, such as `projects/{project\}/locations/{location\}/notebooks/{notebook_id\}`.
83297
+ */
83298
+ name?: string;
83299
+
83300
+ /**
83301
+ * Request body metadata
83302
+ */
83303
+ requestBody?: Schema$GoogleCloudNotebooklmV1alphaShareNotebookRequest;
83304
+ }
83305
+
81844
83306
  export class Resource$Projects$Locations$Notebooks$Audiooverviews {
81845
83307
  context: APIRequestContext;
81846
83308
  constructor(context: APIRequestContext) {
@@ -82167,6 +83629,510 @@ export namespace discoveryengine_v1alpha {
82167
83629
  name?: string;
82168
83630
  }
82169
83631
 
83632
+ export class Resource$Projects$Locations$Notebooks$Sources {
83633
+ context: APIRequestContext;
83634
+ constructor(context: APIRequestContext) {
83635
+ this.context = context;
83636
+ }
83637
+
83638
+ /**
83639
+ * Creates a list of Sources.
83640
+ * @example
83641
+ * ```js
83642
+ * // Before running the sample:
83643
+ * // - Enable the API at:
83644
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
83645
+ * // - Login into gcloud by running:
83646
+ * // ```sh
83647
+ * // $ gcloud auth application-default login
83648
+ * // ```
83649
+ * // - Install the npm module by running:
83650
+ * // ```sh
83651
+ * // $ npm install googleapis
83652
+ * // ```
83653
+ *
83654
+ * const {google} = require('googleapis');
83655
+ * const discoveryengine = google.discoveryengine('v1alpha');
83656
+ *
83657
+ * async function main() {
83658
+ * const auth = new google.auth.GoogleAuth({
83659
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
83660
+ * scopes: [
83661
+ * 'https://www.googleapis.com/auth/cloud-platform',
83662
+ * 'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
83663
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
83664
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
83665
+ * ],
83666
+ * });
83667
+ *
83668
+ * // Acquire an auth client, and bind it to all future calls
83669
+ * const authClient = await auth.getClient();
83670
+ * google.options({auth: authClient});
83671
+ *
83672
+ * // Do the magic
83673
+ * const res =
83674
+ * await discoveryengine.projects.locations.notebooks.sources.batchCreate({
83675
+ * // Required. The parent resource where the sources will be created. Format: projects/{project\}/locations/{location\}/notebooks/{notebook\}
83676
+ * parent: 'projects/my-project/locations/my-location/notebooks/my-notebook',
83677
+ *
83678
+ * // Request body metadata
83679
+ * requestBody: {
83680
+ * // request body parameters
83681
+ * // {
83682
+ * // "userContents": []
83683
+ * // }
83684
+ * },
83685
+ * });
83686
+ * console.log(res.data);
83687
+ *
83688
+ * // Example response
83689
+ * // {
83690
+ * // "sources": []
83691
+ * // }
83692
+ * }
83693
+ *
83694
+ * main().catch(e => {
83695
+ * console.error(e);
83696
+ * throw e;
83697
+ * });
83698
+ *
83699
+ * ```
83700
+ *
83701
+ * @param params - Parameters for request
83702
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
83703
+ * @param callback - Optional callback that handles the response.
83704
+ * @returns A promise if used with async/await, or void if used with a callback.
83705
+ */
83706
+ batchCreate(
83707
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Batchcreate,
83708
+ options: StreamMethodOptions
83709
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
83710
+ batchCreate(
83711
+ params?: Params$Resource$Projects$Locations$Notebooks$Sources$Batchcreate,
83712
+ options?: MethodOptions
83713
+ ): Promise<
83714
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse>
83715
+ >;
83716
+ batchCreate(
83717
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Batchcreate,
83718
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
83719
+ callback: BodyResponseCallback<Readable>
83720
+ ): void;
83721
+ batchCreate(
83722
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Batchcreate,
83723
+ options:
83724
+ | MethodOptions
83725
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse>,
83726
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse>
83727
+ ): void;
83728
+ batchCreate(
83729
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Batchcreate,
83730
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse>
83731
+ ): void;
83732
+ batchCreate(
83733
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse>
83734
+ ): void;
83735
+ batchCreate(
83736
+ paramsOrCallback?:
83737
+ | Params$Resource$Projects$Locations$Notebooks$Sources$Batchcreate
83738
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse>
83739
+ | BodyResponseCallback<Readable>,
83740
+ optionsOrCallback?:
83741
+ | MethodOptions
83742
+ | StreamMethodOptions
83743
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse>
83744
+ | BodyResponseCallback<Readable>,
83745
+ callback?:
83746
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse>
83747
+ | BodyResponseCallback<Readable>
83748
+ ):
83749
+ | void
83750
+ | Promise<
83751
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse>
83752
+ >
83753
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
83754
+ let params = (paramsOrCallback ||
83755
+ {}) as Params$Resource$Projects$Locations$Notebooks$Sources$Batchcreate;
83756
+ let options = (optionsOrCallback || {}) as MethodOptions;
83757
+
83758
+ if (typeof paramsOrCallback === 'function') {
83759
+ callback = paramsOrCallback;
83760
+ params =
83761
+ {} as Params$Resource$Projects$Locations$Notebooks$Sources$Batchcreate;
83762
+ options = {};
83763
+ }
83764
+
83765
+ if (typeof optionsOrCallback === 'function') {
83766
+ callback = optionsOrCallback;
83767
+ options = {};
83768
+ }
83769
+
83770
+ const rootUrl =
83771
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
83772
+ const parameters = {
83773
+ options: Object.assign(
83774
+ {
83775
+ url: (rootUrl + '/v1alpha/{+parent}/sources:batchCreate').replace(
83776
+ /([^:]\/)\/+/g,
83777
+ '$1'
83778
+ ),
83779
+ method: 'POST',
83780
+ apiVersion: '',
83781
+ },
83782
+ options
83783
+ ),
83784
+ params,
83785
+ requiredParams: ['parent'],
83786
+ pathParams: ['parent'],
83787
+ context: this.context,
83788
+ };
83789
+ if (callback) {
83790
+ createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse>(
83791
+ parameters,
83792
+ callback as BodyResponseCallback<unknown>
83793
+ );
83794
+ } else {
83795
+ return createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesResponse>(
83796
+ parameters
83797
+ );
83798
+ }
83799
+ }
83800
+
83801
+ /**
83802
+ * Deletes multiple sources
83803
+ * @example
83804
+ * ```js
83805
+ * // Before running the sample:
83806
+ * // - Enable the API at:
83807
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
83808
+ * // - Login into gcloud by running:
83809
+ * // ```sh
83810
+ * // $ gcloud auth application-default login
83811
+ * // ```
83812
+ * // - Install the npm module by running:
83813
+ * // ```sh
83814
+ * // $ npm install googleapis
83815
+ * // ```
83816
+ *
83817
+ * const {google} = require('googleapis');
83818
+ * const discoveryengine = google.discoveryengine('v1alpha');
83819
+ *
83820
+ * async function main() {
83821
+ * const auth = new google.auth.GoogleAuth({
83822
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
83823
+ * scopes: [
83824
+ * 'https://www.googleapis.com/auth/cloud-platform',
83825
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
83826
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
83827
+ * ],
83828
+ * });
83829
+ *
83830
+ * // Acquire an auth client, and bind it to all future calls
83831
+ * const authClient = await auth.getClient();
83832
+ * google.options({auth: authClient});
83833
+ *
83834
+ * // Do the magic
83835
+ * const res =
83836
+ * await discoveryengine.projects.locations.notebooks.sources.batchDelete({
83837
+ * // Required. The parent resource where the sources will be deleted. Format: projects/{project\}/locations/{location\}/notebooks/{notebook\}
83838
+ * parent: 'projects/my-project/locations/my-location/notebooks/my-notebook',
83839
+ *
83840
+ * // Request body metadata
83841
+ * requestBody: {
83842
+ * // request body parameters
83843
+ * // {
83844
+ * // "names": []
83845
+ * // }
83846
+ * },
83847
+ * });
83848
+ * console.log(res.data);
83849
+ *
83850
+ * // Example response
83851
+ * // {}
83852
+ * }
83853
+ *
83854
+ * main().catch(e => {
83855
+ * console.error(e);
83856
+ * throw e;
83857
+ * });
83858
+ *
83859
+ * ```
83860
+ *
83861
+ * @param params - Parameters for request
83862
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
83863
+ * @param callback - Optional callback that handles the response.
83864
+ * @returns A promise if used with async/await, or void if used with a callback.
83865
+ */
83866
+ batchDelete(
83867
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Batchdelete,
83868
+ options: StreamMethodOptions
83869
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
83870
+ batchDelete(
83871
+ params?: Params$Resource$Projects$Locations$Notebooks$Sources$Batchdelete,
83872
+ options?: MethodOptions
83873
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
83874
+ batchDelete(
83875
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Batchdelete,
83876
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
83877
+ callback: BodyResponseCallback<Readable>
83878
+ ): void;
83879
+ batchDelete(
83880
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Batchdelete,
83881
+ options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>,
83882
+ callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
83883
+ ): void;
83884
+ batchDelete(
83885
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Batchdelete,
83886
+ callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
83887
+ ): void;
83888
+ batchDelete(
83889
+ callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
83890
+ ): void;
83891
+ batchDelete(
83892
+ paramsOrCallback?:
83893
+ | Params$Resource$Projects$Locations$Notebooks$Sources$Batchdelete
83894
+ | BodyResponseCallback<Schema$GoogleProtobufEmpty>
83895
+ | BodyResponseCallback<Readable>,
83896
+ optionsOrCallback?:
83897
+ | MethodOptions
83898
+ | StreamMethodOptions
83899
+ | BodyResponseCallback<Schema$GoogleProtobufEmpty>
83900
+ | BodyResponseCallback<Readable>,
83901
+ callback?:
83902
+ | BodyResponseCallback<Schema$GoogleProtobufEmpty>
83903
+ | BodyResponseCallback<Readable>
83904
+ ):
83905
+ | void
83906
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>
83907
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
83908
+ let params = (paramsOrCallback ||
83909
+ {}) as Params$Resource$Projects$Locations$Notebooks$Sources$Batchdelete;
83910
+ let options = (optionsOrCallback || {}) as MethodOptions;
83911
+
83912
+ if (typeof paramsOrCallback === 'function') {
83913
+ callback = paramsOrCallback;
83914
+ params =
83915
+ {} as Params$Resource$Projects$Locations$Notebooks$Sources$Batchdelete;
83916
+ options = {};
83917
+ }
83918
+
83919
+ if (typeof optionsOrCallback === 'function') {
83920
+ callback = optionsOrCallback;
83921
+ options = {};
83922
+ }
83923
+
83924
+ const rootUrl =
83925
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
83926
+ const parameters = {
83927
+ options: Object.assign(
83928
+ {
83929
+ url: (rootUrl + '/v1alpha/{+parent}/sources:batchDelete').replace(
83930
+ /([^:]\/)\/+/g,
83931
+ '$1'
83932
+ ),
83933
+ method: 'POST',
83934
+ apiVersion: '',
83935
+ },
83936
+ options
83937
+ ),
83938
+ params,
83939
+ requiredParams: ['parent'],
83940
+ pathParams: ['parent'],
83941
+ context: this.context,
83942
+ };
83943
+ if (callback) {
83944
+ createAPIRequest<Schema$GoogleProtobufEmpty>(
83945
+ parameters,
83946
+ callback as BodyResponseCallback<unknown>
83947
+ );
83948
+ } else {
83949
+ return createAPIRequest<Schema$GoogleProtobufEmpty>(parameters);
83950
+ }
83951
+ }
83952
+
83953
+ /**
83954
+ * Gets a Source.
83955
+ * @example
83956
+ * ```js
83957
+ * // Before running the sample:
83958
+ * // - Enable the API at:
83959
+ * // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
83960
+ * // - Login into gcloud by running:
83961
+ * // ```sh
83962
+ * // $ gcloud auth application-default login
83963
+ * // ```
83964
+ * // - Install the npm module by running:
83965
+ * // ```sh
83966
+ * // $ npm install googleapis
83967
+ * // ```
83968
+ *
83969
+ * const {google} = require('googleapis');
83970
+ * const discoveryengine = google.discoveryengine('v1alpha');
83971
+ *
83972
+ * async function main() {
83973
+ * const auth = new google.auth.GoogleAuth({
83974
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
83975
+ * scopes: [
83976
+ * 'https://www.googleapis.com/auth/cloud-platform',
83977
+ * 'https://www.googleapis.com/auth/discoveryengine.readwrite',
83978
+ * 'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
83979
+ * ],
83980
+ * });
83981
+ *
83982
+ * // Acquire an auth client, and bind it to all future calls
83983
+ * const authClient = await auth.getClient();
83984
+ * google.options({auth: authClient});
83985
+ *
83986
+ * // Do the magic
83987
+ * const res = await discoveryengine.projects.locations.notebooks.sources.get({
83988
+ * // Required. The resource name for source Format: projects/{project\}/locations/{location\}/notebooks/{notebook\}/sources/{source\}
83989
+ * name: 'projects/my-project/locations/my-location/notebooks/my-notebook/sources/my-source',
83990
+ * });
83991
+ * console.log(res.data);
83992
+ *
83993
+ * // Example response
83994
+ * // {
83995
+ * // "metadata": {},
83996
+ * // "name": "my_name",
83997
+ * // "settings": {},
83998
+ * // "sourceId": {},
83999
+ * // "title": "my_title"
84000
+ * // }
84001
+ * }
84002
+ *
84003
+ * main().catch(e => {
84004
+ * console.error(e);
84005
+ * throw e;
84006
+ * });
84007
+ *
84008
+ * ```
84009
+ *
84010
+ * @param params - Parameters for request
84011
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
84012
+ * @param callback - Optional callback that handles the response.
84013
+ * @returns A promise if used with async/await, or void if used with a callback.
84014
+ */
84015
+ get(
84016
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Get,
84017
+ options: StreamMethodOptions
84018
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
84019
+ get(
84020
+ params?: Params$Resource$Projects$Locations$Notebooks$Sources$Get,
84021
+ options?: MethodOptions
84022
+ ): Promise<
84023
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaSource>
84024
+ >;
84025
+ get(
84026
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Get,
84027
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
84028
+ callback: BodyResponseCallback<Readable>
84029
+ ): void;
84030
+ get(
84031
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Get,
84032
+ options:
84033
+ | MethodOptions
84034
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaSource>,
84035
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaSource>
84036
+ ): void;
84037
+ get(
84038
+ params: Params$Resource$Projects$Locations$Notebooks$Sources$Get,
84039
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaSource>
84040
+ ): void;
84041
+ get(
84042
+ callback: BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaSource>
84043
+ ): void;
84044
+ get(
84045
+ paramsOrCallback?:
84046
+ | Params$Resource$Projects$Locations$Notebooks$Sources$Get
84047
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaSource>
84048
+ | BodyResponseCallback<Readable>,
84049
+ optionsOrCallback?:
84050
+ | MethodOptions
84051
+ | StreamMethodOptions
84052
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaSource>
84053
+ | BodyResponseCallback<Readable>,
84054
+ callback?:
84055
+ | BodyResponseCallback<Schema$GoogleCloudNotebooklmV1alphaSource>
84056
+ | BodyResponseCallback<Readable>
84057
+ ):
84058
+ | void
84059
+ | Promise<
84060
+ GaxiosResponseWithHTTP2<Schema$GoogleCloudNotebooklmV1alphaSource>
84061
+ >
84062
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
84063
+ let params = (paramsOrCallback ||
84064
+ {}) as Params$Resource$Projects$Locations$Notebooks$Sources$Get;
84065
+ let options = (optionsOrCallback || {}) as MethodOptions;
84066
+
84067
+ if (typeof paramsOrCallback === 'function') {
84068
+ callback = paramsOrCallback;
84069
+ params = {} as Params$Resource$Projects$Locations$Notebooks$Sources$Get;
84070
+ options = {};
84071
+ }
84072
+
84073
+ if (typeof optionsOrCallback === 'function') {
84074
+ callback = optionsOrCallback;
84075
+ options = {};
84076
+ }
84077
+
84078
+ const rootUrl =
84079
+ options.rootUrl || 'https://discoveryengine.googleapis.com/';
84080
+ const parameters = {
84081
+ options: Object.assign(
84082
+ {
84083
+ url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
84084
+ method: 'GET',
84085
+ apiVersion: '',
84086
+ },
84087
+ options
84088
+ ),
84089
+ params,
84090
+ requiredParams: ['name'],
84091
+ pathParams: ['name'],
84092
+ context: this.context,
84093
+ };
84094
+ if (callback) {
84095
+ createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaSource>(
84096
+ parameters,
84097
+ callback as BodyResponseCallback<unknown>
84098
+ );
84099
+ } else {
84100
+ return createAPIRequest<Schema$GoogleCloudNotebooklmV1alphaSource>(
84101
+ parameters
84102
+ );
84103
+ }
84104
+ }
84105
+ }
84106
+
84107
+ export interface Params$Resource$Projects$Locations$Notebooks$Sources$Batchcreate extends StandardParameters {
84108
+ /**
84109
+ * Required. The parent resource where the sources will be created. Format: projects/{project\}/locations/{location\}/notebooks/{notebook\}
84110
+ */
84111
+ parent?: string;
84112
+
84113
+ /**
84114
+ * Request body metadata
84115
+ */
84116
+ requestBody?: Schema$GoogleCloudNotebooklmV1alphaBatchCreateSourcesRequest;
84117
+ }
84118
+ export interface Params$Resource$Projects$Locations$Notebooks$Sources$Batchdelete extends StandardParameters {
84119
+ /**
84120
+ * Required. The parent resource where the sources will be deleted. Format: projects/{project\}/locations/{location\}/notebooks/{notebook\}
84121
+ */
84122
+ parent?: string;
84123
+
84124
+ /**
84125
+ * Request body metadata
84126
+ */
84127
+ requestBody?: Schema$GoogleCloudNotebooklmV1alphaBatchDeleteSourcesRequest;
84128
+ }
84129
+ export interface Params$Resource$Projects$Locations$Notebooks$Sources$Get extends StandardParameters {
84130
+ /**
84131
+ * Required. The resource name for source Format: projects/{project\}/locations/{location\}/notebooks/{notebook\}/sources/{source\}
84132
+ */
84133
+ name?: string;
84134
+ }
84135
+
82170
84136
  export class Resource$Projects$Locations$Operations {
82171
84137
  context: APIRequestContext;
82172
84138
  constructor(context: APIRequestContext) {