Class v1beta1.PrivateCatalogClient (1.0.4)

PrivateCatalog allows catalog consumers to retrieve Catalog, Product and Version resources under a target resource context.

Catalog is computed based on the s linked to the target resource and its ancestors. Each association's is transformed into a Catalog. If multiple associations have the same parent , they are de-duplicated into one Catalog. Users must have cloudprivatecatalog.catalogTargets.get IAM permission on the resource context in order to access catalogs. Catalog contains the resource name and a subset of data of the original .

Product is child resource of the catalog. A Product contains the resource name and a subset of the data of the original .

Version is child resource of the product. A Version contains the resource name and a subset of the data of the original . v1beta1

Package

@google-cloud/private-catalog!

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of PrivateCatalogClient.

Parameter
Name Description
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

Property Value
Type Description
string

auth

auth: gax.GoogleAuth;
Property Value
Type Description
gax.GoogleAuth

descriptors

descriptors: Descriptors;
Property Value
Type Description
Descriptors

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };
Property Value
Type Description
{ [name: string]: Function; }

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };
Property Value
Type Description
{ [name: string]: gax.PathTemplate; }

port

static get port(): number;

The port for this API service.

Property Value
Type Description
number

privateCatalogStub

privateCatalogStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
Type Description
Promise<{ [name: string]: Function; }>

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

Property Value
Type Description
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
Type Description
string

warn

warn: (code: string, message: string, warnType?: string) => void;
Property Value
Type Description
(code: string, message: string, warnType?: string) => void

Methods

catalogPath(catalog)

catalogPath(catalog: string): string;

Return a fully-qualified catalog resource name string.

Parameter
Name Description
catalog string
Returns
Type Description
string

{string} Resource name string.

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise<void>

{Promise} A promise that resolves when the client is closed.

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

matchCatalogFromCatalogName(catalogName)

matchCatalogFromCatalogName(catalogName: string): string | number;

Parse the catalog from Catalog resource.

Parameter
Name Description
catalogName string

A fully-qualified path representing Catalog resource.

Returns
Type Description
string | number

{string} A string representing the catalog.

matchCatalogFromVersionName(versionName)

matchCatalogFromVersionName(versionName: string): string | number;

Parse the catalog from Version resource.

Parameter
Name Description
versionName string

A fully-qualified path representing Version resource.

Returns
Type Description
string | number

{string} A string representing the catalog.

matchProductFromProductName(productName)

matchProductFromProductName(productName: string): string | number;

Parse the product from Product resource.

Parameter
Name Description
productName string

A fully-qualified path representing Product resource.

Returns
Type Description
string | number

{string} A string representing the product.

matchProductFromVersionName(versionName)

matchProductFromVersionName(versionName: string): string | number;

Parse the product from Version resource.

Parameter
Name Description
versionName string

A fully-qualified path representing Version resource.

Returns
Type Description
string | number

{string} A string representing the product.

matchVersionFromVersionName(versionName)

matchVersionFromVersionName(versionName: string): string | number;

Parse the version from Version resource.

Parameter
Name Description
versionName string

A fully-qualified path representing Version resource.

Returns
Type Description
string | number

{string} A string representing the version.

productPath(product)

productPath(product: string): string;

Return a fully-qualified product resource name string.

Parameter
Name Description
product string
Returns
Type Description
string

{string} Resource name string.

searchCatalogs(request, options)

searchCatalogs(request?: protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.privatecatalog.v1beta1.ICatalog[],
        protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest | null,
        protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsResponse
    ]>;
Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest
options CallOptions
Returns
Type Description
Promise<[ protos.google.cloud.privatecatalog.v1beta1.ICatalog[], protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest | null, protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsResponse ]>

searchCatalogs(request, options, callback)

searchCatalogs(request: protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.ICatalog>): void;
Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.ICatalog>
Returns
Type Description
void

searchCatalogs(request, callback)

searchCatalogs(request: protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest, callback: PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.ICatalog>): void;
Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest
callback PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.ICatalog>
Returns
Type Description
void

searchCatalogsAsync(request, options)

searchCatalogsAsync(request?: protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.privatecatalog.v1beta1.ICatalog>;

Equivalent to searchCatalogs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.privatecatalog.v1beta1.ICatalog>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Catalog]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

searchCatalogsStream(request, options)

searchCatalogsStream(request?: protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing [Catalog] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using searchCatalogsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

searchProducts(request, options)

searchProducts(request?: protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.privatecatalog.v1beta1.IProduct[],
        protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest | null,
        protos.google.cloud.privatecatalog.v1beta1.ISearchProductsResponse
    ]>;
Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest
options CallOptions
Returns
Type Description
Promise<[ protos.google.cloud.privatecatalog.v1beta1.IProduct[], protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest | null, protos.google.cloud.privatecatalog.v1beta1.ISearchProductsResponse ]>

searchProducts(request, options, callback)

searchProducts(request: protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchProductsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.IProduct>): void;
Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchProductsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.IProduct>
Returns
Type Description
void

searchProducts(request, callback)

searchProducts(request: protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest, callback: PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchProductsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.IProduct>): void;
Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest
callback PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchProductsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.IProduct>
Returns
Type Description
void

searchProductsAsync(request, options)

searchProductsAsync(request?: protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.privatecatalog.v1beta1.IProduct>;

Equivalent to searchProducts, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.privatecatalog.v1beta1.IProduct>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Product]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

searchProductsStream(request, options)

searchProductsStream(request?: protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing [Product] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using searchProductsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

searchVersions(request, options)

searchVersions(request?: protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.privatecatalog.v1beta1.IVersion[],
        protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest | null,
        protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsResponse
    ]>;
Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest
options CallOptions
Returns
Type Description
Promise<[ protos.google.cloud.privatecatalog.v1beta1.IVersion[], protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest | null, protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsResponse ]>

searchVersions(request, options, callback)

searchVersions(request: protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.IVersion>): void;
Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.IVersion>
Returns
Type Description
void

searchVersions(request, callback)

searchVersions(request: protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest, callback: PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.IVersion>): void;
Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest
callback PaginationCallback<protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest, protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsResponse | null | undefined, protos.google.cloud.privatecatalog.v1beta1.IVersion>
Returns
Type Description
void

searchVersionsAsync(request, options)

searchVersionsAsync(request?: protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.privatecatalog.v1beta1.IVersion>;

Equivalent to searchVersions, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.privatecatalog.v1beta1.IVersion>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Version]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

searchVersionsStream(request, options)

searchVersionsStream(request?: protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
Name Description
request protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing [Version] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using searchVersionsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

versionPath(catalog, product, version)

versionPath(catalog: string, product: string, version: string): string;

Return a fully-qualified version resource name string.

Parameters
Name Description
catalog string
product string
version string
Returns
Type Description
string

{string} Resource name string.