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
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

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

Property Value
TypeDescription
string

auth

auth: gax.GoogleAuth;
Property Value
TypeDescription
gax.GoogleAuth

descriptors

descriptors: Descriptors;
Property Value
TypeDescription
Descriptors

innerApiCalls

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

pathTemplates

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

port

static get port(): number;

The port for this API service.

Property Value
TypeDescription
number

privateCatalogStub

privateCatalogStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
TypeDescription
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
TypeDescription
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
TypeDescription
string

warn

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

Methods

catalogPath(catalog)

catalogPath(catalog: string): string;

Return a fully-qualified catalog resource name string.

Parameter
NameDescription
catalog string
Returns
TypeDescription
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
TypeDescription
Promise<void>

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

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
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
TypeDescription
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
NameDescription
catalogName string

A fully-qualified path representing Catalog resource.

Returns
TypeDescription
string | number

{string} A string representing the catalog.

matchCatalogFromVersionName(versionName)

matchCatalogFromVersionName(versionName: string): string | number;

Parse the catalog from Version resource.

Parameter
NameDescription
versionName string

A fully-qualified path representing Version resource.

Returns
TypeDescription
string | number

{string} A string representing the catalog.

matchProductFromProductName(productName)

matchProductFromProductName(productName: string): string | number;

Parse the product from Product resource.

Parameter
NameDescription
productName string

A fully-qualified path representing Product resource.

Returns
TypeDescription
string | number

{string} A string representing the product.

matchProductFromVersionName(versionName)

matchProductFromVersionName(versionName: string): string | number;

Parse the product from Version resource.

Parameter
NameDescription
versionName string

A fully-qualified path representing Version resource.

Returns
TypeDescription
string | number

{string} A string representing the product.

matchVersionFromVersionName(versionName)

matchVersionFromVersionName(versionName: string): string | number;

Parse the version from Version resource.

Parameter
NameDescription
versionName string

A fully-qualified path representing Version resource.

Returns
TypeDescription
string | number

{string} A string representing the version.

productPath(product)

productPath(product: string): string;

Return a fully-qualified product resource name string.

Parameter
NameDescription
product string
Returns
TypeDescription
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
NameDescription
request protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest
options CallOptions
Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request protos.google.cloud.privatecatalog.v1beta1.ISearchCatalogsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest
options CallOptions
Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request protos.google.cloud.privatecatalog.v1beta1.ISearchProductsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest
options CallOptions
Returns
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
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
TypeDescription
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
NameDescription
request protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
request protos.google.cloud.privatecatalog.v1beta1.ISearchVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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
NameDescription
catalog string
product string
version string
Returns
TypeDescription
string

{string} Resource name string.