diff --git a/packages/google-cloud-asset/.gitignore b/packages/google-cloud-asset/.gitignore index 97cdf45ca3b..5d32b23782f 100644 --- a/packages/google-cloud-asset/.gitignore +++ b/packages/google-cloud-asset/.gitignore @@ -1,12 +1,14 @@ **/*.log **/node_modules .coverage +coverage .nyc_output docs/ +out/ build/ system-test/secrets.js system-test/*key.json *.lock -**/package-lock.json .DS_Store +package-lock.json __pycache__ diff --git a/packages/google-cloud-asset/protos/google/cloud/asset/v1p1beta1/asset_service.proto b/packages/google-cloud-asset/protos/google/cloud/asset/v1p1beta1/asset_service.proto index 025adb27fe1..2083e45706c 100644 --- a/packages/google-cloud-asset/protos/google/cloud/asset/v1p1beta1/asset_service.proto +++ b/packages/google-cloud-asset/protos/google/cloud/asset/v1p1beta1/asset_service.proto @@ -93,13 +93,14 @@ message SearchResourcesRequest { // search all the supported asset types. repeated string asset_types = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The page size for search result pagination. Returned results may be fewer - // than requested. The value of this field is capped at 2000. If set to the - // zero value, server will pick an appropriate default. + // Optional. The page size for search result pagination. Page size is capped at 500 even + // if a larger value is given. If set to zero, server will pick an appropriate + // default. Returned results may be fewer than requested. When this happens, + // there could be more results as long as `next_page_token` is returned. int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the preceding call - // to this method. `page_token` must be the value of `next_page_token` from + // to this method. `page_token` must be the value of `next_page_token` from // the previous response. The values of all other method parameters, must be // identical to those in the previous call. string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; @@ -131,9 +132,10 @@ message SearchIamPoliciesRequest { // * "policy:(myuser@mydomain.com viewer)" string query = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The page size for search result pagination. Returned results may be fewer - // than requested. The maximum is 2000. If set to the zero value, the server - // will pick an appropriate default. + // Optional. The page size for search result pagination. Page size is capped at 500 even + // if a larger value is given. If set to zero, server will pick an appropriate + // default. Returned results may be fewer than requested. When this happens, + // there could be more results as long as `next_page_token` is returned. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, retrieve the next batch of results from the preceding call to @@ -171,9 +173,10 @@ message SearchAllResourcesRequest { // search all the supported asset types. repeated string asset_types = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The page size for search result pagination. Returned results may be fewer - // than requested. The value of this field is capped at 2000. If set to the - // zero value, server will pick an appropriate default. + // Optional. The page size for search result pagination. Page size is capped at 500 even + // if a larger value is given. If set to zero, server will pick an appropriate + // default. Returned results may be fewer than requested. When this happens, + // there could be more results as long as `next_page_token` is returned. int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, then retrieve the next batch of results from the preceding call @@ -209,9 +212,10 @@ message SearchAllIamPoliciesRequest { // * "policy:(myuser@mydomain.com viewer)" string query = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The page size for search result pagination. Returned results may be fewer - // than requested. The maximum is 2000. If set to the zero value, the server - // will pick an appropriate default. + // Optional. The page size for search result pagination. Page size is capped at 500 even + // if a larger value is given. If set to zero, server will pick an appropriate + // default. Returned results may be fewer than requested. When this happens, + // there could be more results as long as `next_page_token` is returned. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. If present, retrieve the next batch of results from the preceding call to diff --git a/packages/google-cloud-asset/protos/protos.d.ts b/packages/google-cloud-asset/protos/protos.d.ts index 5c4491999a5..3396171ee31 100644 --- a/packages/google-cloud-asset/protos/protos.d.ts +++ b/packages/google-cloud-asset/protos/protos.d.ts @@ -26,2176 +26,2176 @@ export namespace google { /** Namespace v1. */ namespace v1 { - /** Properties of a TemporalAsset. */ - interface ITemporalAsset { - - /** TemporalAsset window */ - window?: (google.cloud.asset.v1.ITimeWindow|null); - - /** TemporalAsset deleted */ - deleted?: (boolean|null); - - /** TemporalAsset asset */ - asset?: (google.cloud.asset.v1.IAsset|null); - } - - /** Represents a TemporalAsset. */ - class TemporalAsset implements ITemporalAsset { + /** Represents an AssetService */ + class AssetService extends $protobuf.rpc.Service { /** - * Constructs a new TemporalAsset. - * @param [properties] Properties to set + * Constructs a new AssetService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.asset.v1.ITemporalAsset); - - /** TemporalAsset window. */ - public window?: (google.cloud.asset.v1.ITimeWindow|null); - - /** TemporalAsset deleted. */ - public deleted: boolean; - - /** TemporalAsset asset. */ - public asset?: (google.cloud.asset.v1.IAsset|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new TemporalAsset instance using the specified properties. - * @param [properties] Properties to set - * @returns TemporalAsset instance + * Creates new AssetService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(properties?: google.cloud.asset.v1.ITemporalAsset): google.cloud.asset.v1.TemporalAsset; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AssetService; /** - * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1.TemporalAsset.verify|verify} messages. - * @param message TemporalAsset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ExportAssets. + * @param request ExportAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encode(message: google.cloud.asset.v1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public exportAssets(request: google.cloud.asset.v1.IExportAssetsRequest, callback: google.cloud.asset.v1.AssetService.ExportAssetsCallback): void; /** - * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1.TemporalAsset.verify|verify} messages. - * @param message TemporalAsset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ExportAssets. + * @param request ExportAssetsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.asset.v1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public exportAssets(request: google.cloud.asset.v1.IExportAssetsRequest): Promise; /** - * Decodes a TemporalAsset message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TemporalAsset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls BatchGetAssetsHistory. + * @param request BatchGetAssetsHistoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchGetAssetsHistoryResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.TemporalAsset; + public batchGetAssetsHistory(request: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, callback: google.cloud.asset.v1.AssetService.BatchGetAssetsHistoryCallback): void; /** - * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TemporalAsset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls BatchGetAssetsHistory. + * @param request BatchGetAssetsHistoryRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.TemporalAsset; + public batchGetAssetsHistory(request: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest): Promise; /** - * Verifies a TemporalAsset message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateFeed. + * @param request CreateFeedRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Feed */ - public static verify(message: { [k: string]: any }): (string|null); + public createFeed(request: google.cloud.asset.v1.ICreateFeedRequest, callback: google.cloud.asset.v1.AssetService.CreateFeedCallback): void; /** - * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TemporalAsset + * Calls CreateFeed. + * @param request CreateFeedRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.TemporalAsset; + public createFeed(request: google.cloud.asset.v1.ICreateFeedRequest): Promise; /** - * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. - * @param message TemporalAsset - * @param [options] Conversion options - * @returns Plain object + * Calls GetFeed. + * @param request GetFeedRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Feed */ - public static toObject(message: google.cloud.asset.v1.TemporalAsset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public getFeed(request: google.cloud.asset.v1.IGetFeedRequest, callback: google.cloud.asset.v1.AssetService.GetFeedCallback): void; /** - * Converts this TemporalAsset to JSON. - * @returns JSON object + * Calls GetFeed. + * @param request GetFeedRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TimeWindow. */ - interface ITimeWindow { - - /** TimeWindow startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** TimeWindow endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } + public getFeed(request: google.cloud.asset.v1.IGetFeedRequest): Promise; - /** Represents a TimeWindow. */ - class TimeWindow implements ITimeWindow { + /** + * Calls ListFeeds. + * @param request ListFeedsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFeedsResponse + */ + public listFeeds(request: google.cloud.asset.v1.IListFeedsRequest, callback: google.cloud.asset.v1.AssetService.ListFeedsCallback): void; /** - * Constructs a new TimeWindow. - * @param [properties] Properties to set + * Calls ListFeeds. + * @param request ListFeedsRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.asset.v1.ITimeWindow); + public listFeeds(request: google.cloud.asset.v1.IListFeedsRequest): Promise; - /** TimeWindow startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** + * Calls UpdateFeed. + * @param request UpdateFeedRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Feed + */ + public updateFeed(request: google.cloud.asset.v1.IUpdateFeedRequest, callback: google.cloud.asset.v1.AssetService.UpdateFeedCallback): void; - /** TimeWindow endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** + * Calls UpdateFeed. + * @param request UpdateFeedRequest message or plain object + * @returns Promise + */ + public updateFeed(request: google.cloud.asset.v1.IUpdateFeedRequest): Promise; /** - * Creates a new TimeWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeWindow instance + * Calls DeleteFeed. + * @param request DeleteFeedRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static create(properties?: google.cloud.asset.v1.ITimeWindow): google.cloud.asset.v1.TimeWindow; + public deleteFeed(request: google.cloud.asset.v1.IDeleteFeedRequest, callback: google.cloud.asset.v1.AssetService.DeleteFeedCallback): void; /** - * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1.TimeWindow.verify|verify} messages. - * @param message TimeWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteFeed. + * @param request DeleteFeedRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.asset.v1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteFeed(request: google.cloud.asset.v1.IDeleteFeedRequest): Promise; + } + + namespace AssetService { /** - * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1.TimeWindow.verify|verify} messages. - * @param message TimeWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.asset.v1.AssetService#exportAssets}. + * @param error Error, if any + * @param [response] Operation */ - public static encodeDelimited(message: google.cloud.asset.v1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + type ExportAssetsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a TimeWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.asset.v1.AssetService#batchGetAssetsHistory}. + * @param error Error, if any + * @param [response] BatchGetAssetsHistoryResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.TimeWindow; + type BatchGetAssetsHistoryCallback = (error: (Error|null), response?: google.cloud.asset.v1.BatchGetAssetsHistoryResponse) => void; /** - * Decodes a TimeWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.asset.v1.AssetService#createFeed}. + * @param error Error, if any + * @param [response] Feed */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.TimeWindow; + type CreateFeedCallback = (error: (Error|null), response?: google.cloud.asset.v1.Feed) => void; /** - * Verifies a TimeWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.asset.v1.AssetService#getFeed}. + * @param error Error, if any + * @param [response] Feed */ - public static verify(message: { [k: string]: any }): (string|null); + type GetFeedCallback = (error: (Error|null), response?: google.cloud.asset.v1.Feed) => void; /** - * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeWindow + * Callback as used by {@link google.cloud.asset.v1.AssetService#listFeeds}. + * @param error Error, if any + * @param [response] ListFeedsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.TimeWindow; + type ListFeedsCallback = (error: (Error|null), response?: google.cloud.asset.v1.ListFeedsResponse) => void; /** - * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. - * @param message TimeWindow - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.asset.v1.AssetService#updateFeed}. + * @param error Error, if any + * @param [response] Feed */ - public static toObject(message: google.cloud.asset.v1.TimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type UpdateFeedCallback = (error: (Error|null), response?: google.cloud.asset.v1.Feed) => void; /** - * Converts this TimeWindow to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.asset.v1.AssetService#deleteFeed}. + * @param error Error, if any + * @param [response] Empty */ - public toJSON(): { [k: string]: any }; + type DeleteFeedCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of an Asset. */ - interface IAsset { + /** Properties of an ExportAssetsRequest. */ + interface IExportAssetsRequest { - /** Asset name */ - name?: (string|null); + /** ExportAssetsRequest parent */ + parent?: (string|null); - /** Asset assetType */ - assetType?: (string|null); + /** ExportAssetsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** Asset resource */ - resource?: (google.cloud.asset.v1.IResource|null); + /** ExportAssetsRequest assetTypes */ + assetTypes?: (string[]|null); - /** Asset iamPolicy */ - iamPolicy?: (google.iam.v1.IPolicy|null); + /** ExportAssetsRequest contentType */ + contentType?: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType|null); - /** Asset ancestors */ - ancestors?: (string[]|null); + /** ExportAssetsRequest outputConfig */ + outputConfig?: (google.cloud.asset.v1.IOutputConfig|null); } - /** Represents an Asset. */ - class Asset implements IAsset { + /** Represents an ExportAssetsRequest. */ + class ExportAssetsRequest implements IExportAssetsRequest { /** - * Constructs a new Asset. + * Constructs a new ExportAssetsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IAsset); + constructor(properties?: google.cloud.asset.v1.IExportAssetsRequest); - /** Asset name. */ - public name: string; + /** ExportAssetsRequest parent. */ + public parent: string; - /** Asset assetType. */ - public assetType: string; + /** ExportAssetsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** Asset resource. */ - public resource?: (google.cloud.asset.v1.IResource|null); + /** ExportAssetsRequest assetTypes. */ + public assetTypes: string[]; - /** Asset iamPolicy. */ - public iamPolicy?: (google.iam.v1.IPolicy|null); + /** ExportAssetsRequest contentType. */ + public contentType: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType); - /** Asset ancestors. */ - public ancestors: string[]; + /** ExportAssetsRequest outputConfig. */ + public outputConfig?: (google.cloud.asset.v1.IOutputConfig|null); /** - * Creates a new Asset instance using the specified properties. + * Creates a new ExportAssetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Asset instance + * @returns ExportAssetsRequest instance */ - public static create(properties?: google.cloud.asset.v1.IAsset): google.cloud.asset.v1.Asset; + public static create(properties?: google.cloud.asset.v1.IExportAssetsRequest): google.cloud.asset.v1.ExportAssetsRequest; /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode + * Encodes the specified ExportAssetsRequest message. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsRequest.verify|verify} messages. + * @param message ExportAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IExportAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode + * Encodes the specified ExportAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsRequest.verify|verify} messages. + * @param message ExportAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IExportAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Asset message from the specified reader or buffer. + * Decodes an ExportAssetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Asset + * @returns ExportAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.Asset; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.ExportAssetsRequest; /** - * Decodes an Asset message from the specified reader or buffer, length delimited. + * Decodes an ExportAssetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Asset + * @returns ExportAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.Asset; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.ExportAssetsRequest; /** - * Verifies an Asset message. + * Verifies an ExportAssetsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAssetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Asset + * @returns ExportAssetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.Asset; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.ExportAssetsRequest; /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. - * @param message Asset + * Creates a plain object from an ExportAssetsRequest message. Also converts values to other types if specified. + * @param message ExportAssetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.ExportAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Asset to JSON. + * Converts this ExportAssetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Resource. */ - interface IResource { - - /** Resource version */ - version?: (string|null); - - /** Resource discoveryDocumentUri */ - discoveryDocumentUri?: (string|null); - - /** Resource discoveryName */ - discoveryName?: (string|null); - - /** Resource resourceUrl */ - resourceUrl?: (string|null); + /** Properties of an ExportAssetsResponse. */ + interface IExportAssetsResponse { - /** Resource parent */ - parent?: (string|null); + /** ExportAssetsResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** Resource data */ - data?: (google.protobuf.IStruct|null); + /** ExportAssetsResponse outputConfig */ + outputConfig?: (google.cloud.asset.v1.IOutputConfig|null); } - /** Represents a Resource. */ - class Resource implements IResource { + /** Represents an ExportAssetsResponse. */ + class ExportAssetsResponse implements IExportAssetsResponse { /** - * Constructs a new Resource. + * Constructs a new ExportAssetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IResource); - - /** Resource version. */ - public version: string; - - /** Resource discoveryDocumentUri. */ - public discoveryDocumentUri: string; - - /** Resource discoveryName. */ - public discoveryName: string; - - /** Resource resourceUrl. */ - public resourceUrl: string; + constructor(properties?: google.cloud.asset.v1.IExportAssetsResponse); - /** Resource parent. */ - public parent: string; + /** ExportAssetsResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** Resource data. */ - public data?: (google.protobuf.IStruct|null); + /** ExportAssetsResponse outputConfig. */ + public outputConfig?: (google.cloud.asset.v1.IOutputConfig|null); /** - * Creates a new Resource instance using the specified properties. + * Creates a new ExportAssetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Resource instance + * @returns ExportAssetsResponse instance */ - public static create(properties?: google.cloud.asset.v1.IResource): google.cloud.asset.v1.Resource; + public static create(properties?: google.cloud.asset.v1.IExportAssetsResponse): google.cloud.asset.v1.ExportAssetsResponse; /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode + * Encodes the specified ExportAssetsResponse message. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsResponse.verify|verify} messages. + * @param message ExportAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IExportAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode + * Encodes the specified ExportAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsResponse.verify|verify} messages. + * @param message ExportAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IExportAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Resource message from the specified reader or buffer. + * Decodes an ExportAssetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Resource + * @returns ExportAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.Resource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.ExportAssetsResponse; /** - * Decodes a Resource message from the specified reader or buffer, length delimited. + * Decodes an ExportAssetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Resource + * @returns ExportAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.Resource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.ExportAssetsResponse; /** - * Verifies a Resource message. + * Verifies an ExportAssetsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAssetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Resource + * @returns ExportAssetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.Resource; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.ExportAssetsResponse; /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @param message Resource + * Creates a plain object from an ExportAssetsResponse message. Also converts values to other types if specified. + * @param message ExportAssetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.ExportAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Resource to JSON. + * Converts this ExportAssetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents an AssetService */ - class AssetService extends $protobuf.rpc.Service { + /** Properties of a BatchGetAssetsHistoryRequest. */ + interface IBatchGetAssetsHistoryRequest { - /** - * Constructs a new AssetService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** BatchGetAssetsHistoryRequest parent */ + parent?: (string|null); + + /** BatchGetAssetsHistoryRequest assetNames */ + assetNames?: (string[]|null); + + /** BatchGetAssetsHistoryRequest contentType */ + contentType?: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType|null); + + /** BatchGetAssetsHistoryRequest readTimeWindow */ + readTimeWindow?: (google.cloud.asset.v1.ITimeWindow|null); + } + + /** Represents a BatchGetAssetsHistoryRequest. */ + class BatchGetAssetsHistoryRequest implements IBatchGetAssetsHistoryRequest { /** - * Creates new AssetService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Constructs a new BatchGetAssetsHistoryRequest. + * @param [properties] Properties to set */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AssetService; + constructor(properties?: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest); + + /** BatchGetAssetsHistoryRequest parent. */ + public parent: string; + + /** BatchGetAssetsHistoryRequest assetNames. */ + public assetNames: string[]; + + /** BatchGetAssetsHistoryRequest contentType. */ + public contentType: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType); + + /** BatchGetAssetsHistoryRequest readTimeWindow. */ + public readTimeWindow?: (google.cloud.asset.v1.ITimeWindow|null); /** - * Calls ExportAssets. - * @param request ExportAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a new BatchGetAssetsHistoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchGetAssetsHistoryRequest instance */ - public exportAssets(request: google.cloud.asset.v1.IExportAssetsRequest, callback: google.cloud.asset.v1.AssetService.ExportAssetsCallback): void; + public static create(properties?: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest): google.cloud.asset.v1.BatchGetAssetsHistoryRequest; /** - * Calls ExportAssets. - * @param request ExportAssetsRequest message or plain object - * @returns Promise + * Encodes the specified BatchGetAssetsHistoryRequest message. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryRequest.verify|verify} messages. + * @param message BatchGetAssetsHistoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public exportAssets(request: google.cloud.asset.v1.IExportAssetsRequest): Promise; + public static encode(message: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls BatchGetAssetsHistory. - * @param request BatchGetAssetsHistoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BatchGetAssetsHistoryResponse + * Encodes the specified BatchGetAssetsHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryRequest.verify|verify} messages. + * @param message BatchGetAssetsHistoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public batchGetAssetsHistory(request: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, callback: google.cloud.asset.v1.AssetService.BatchGetAssetsHistoryCallback): void; + public static encodeDelimited(message: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls BatchGetAssetsHistory. - * @param request BatchGetAssetsHistoryRequest message or plain object - * @returns Promise - */ - public batchGetAssetsHistory(request: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest): Promise; - - /** - * Calls CreateFeed. - * @param request CreateFeedRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Feed + * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchGetAssetsHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createFeed(request: google.cloud.asset.v1.ICreateFeedRequest, callback: google.cloud.asset.v1.AssetService.CreateFeedCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.BatchGetAssetsHistoryRequest; /** - * Calls CreateFeed. - * @param request CreateFeedRequest message or plain object - * @returns Promise + * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchGetAssetsHistoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createFeed(request: google.cloud.asset.v1.ICreateFeedRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.BatchGetAssetsHistoryRequest; /** - * Calls GetFeed. - * @param request GetFeedRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Feed + * Verifies a BatchGetAssetsHistoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getFeed(request: google.cloud.asset.v1.IGetFeedRequest, callback: google.cloud.asset.v1.AssetService.GetFeedCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetFeed. - * @param request GetFeedRequest message or plain object - * @returns Promise + * Creates a BatchGetAssetsHistoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchGetAssetsHistoryRequest */ - public getFeed(request: google.cloud.asset.v1.IGetFeedRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.BatchGetAssetsHistoryRequest; /** - * Calls ListFeeds. - * @param request ListFeedsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFeedsResponse + * Creates a plain object from a BatchGetAssetsHistoryRequest message. Also converts values to other types if specified. + * @param message BatchGetAssetsHistoryRequest + * @param [options] Conversion options + * @returns Plain object */ - public listFeeds(request: google.cloud.asset.v1.IListFeedsRequest, callback: google.cloud.asset.v1.AssetService.ListFeedsCallback): void; + public static toObject(message: google.cloud.asset.v1.BatchGetAssetsHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListFeeds. - * @param request ListFeedsRequest message or plain object - * @returns Promise + * Converts this BatchGetAssetsHistoryRequest to JSON. + * @returns JSON object */ - public listFeeds(request: google.cloud.asset.v1.IListFeedsRequest): Promise; + public toJSON(): { [k: string]: any }; + } - /** - * Calls UpdateFeed. - * @param request UpdateFeedRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Feed - */ - public updateFeed(request: google.cloud.asset.v1.IUpdateFeedRequest, callback: google.cloud.asset.v1.AssetService.UpdateFeedCallback): void; + /** Properties of a BatchGetAssetsHistoryResponse. */ + interface IBatchGetAssetsHistoryResponse { + + /** BatchGetAssetsHistoryResponse assets */ + assets?: (google.cloud.asset.v1.ITemporalAsset[]|null); + } + + /** Represents a BatchGetAssetsHistoryResponse. */ + class BatchGetAssetsHistoryResponse implements IBatchGetAssetsHistoryResponse { /** - * Calls UpdateFeed. - * @param request UpdateFeedRequest message or plain object - * @returns Promise + * Constructs a new BatchGetAssetsHistoryResponse. + * @param [properties] Properties to set */ - public updateFeed(request: google.cloud.asset.v1.IUpdateFeedRequest): Promise; + constructor(properties?: google.cloud.asset.v1.IBatchGetAssetsHistoryResponse); + + /** BatchGetAssetsHistoryResponse assets. */ + public assets: google.cloud.asset.v1.ITemporalAsset[]; /** - * Calls DeleteFeed. - * @param request DeleteFeedRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a new BatchGetAssetsHistoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchGetAssetsHistoryResponse instance */ - public deleteFeed(request: google.cloud.asset.v1.IDeleteFeedRequest, callback: google.cloud.asset.v1.AssetService.DeleteFeedCallback): void; + public static create(properties?: google.cloud.asset.v1.IBatchGetAssetsHistoryResponse): google.cloud.asset.v1.BatchGetAssetsHistoryResponse; /** - * Calls DeleteFeed. - * @param request DeleteFeedRequest message or plain object - * @returns Promise + * Encodes the specified BatchGetAssetsHistoryResponse message. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryResponse.verify|verify} messages. + * @param message BatchGetAssetsHistoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteFeed(request: google.cloud.asset.v1.IDeleteFeedRequest): Promise; - } - - namespace AssetService { + public static encode(message: google.cloud.asset.v1.IBatchGetAssetsHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#exportAssets}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified BatchGetAssetsHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryResponse.verify|verify} messages. + * @param message BatchGetAssetsHistoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ExportAssetsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encodeDelimited(message: google.cloud.asset.v1.IBatchGetAssetsHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#batchGetAssetsHistory}. - * @param error Error, if any - * @param [response] BatchGetAssetsHistoryResponse + * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchGetAssetsHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type BatchGetAssetsHistoryCallback = (error: (Error|null), response?: google.cloud.asset.v1.BatchGetAssetsHistoryResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.BatchGetAssetsHistoryResponse; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#createFeed}. - * @param error Error, if any - * @param [response] Feed + * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchGetAssetsHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateFeedCallback = (error: (Error|null), response?: google.cloud.asset.v1.Feed) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.BatchGetAssetsHistoryResponse; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#getFeed}. - * @param error Error, if any - * @param [response] Feed + * Verifies a BatchGetAssetsHistoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetFeedCallback = (error: (Error|null), response?: google.cloud.asset.v1.Feed) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#listFeeds}. - * @param error Error, if any - * @param [response] ListFeedsResponse + * Creates a BatchGetAssetsHistoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchGetAssetsHistoryResponse */ - type ListFeedsCallback = (error: (Error|null), response?: google.cloud.asset.v1.ListFeedsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.BatchGetAssetsHistoryResponse; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#updateFeed}. - * @param error Error, if any - * @param [response] Feed + * Creates a plain object from a BatchGetAssetsHistoryResponse message. Also converts values to other types if specified. + * @param message BatchGetAssetsHistoryResponse + * @param [options] Conversion options + * @returns Plain object */ - type UpdateFeedCallback = (error: (Error|null), response?: google.cloud.asset.v1.Feed) => void; + public static toObject(message: google.cloud.asset.v1.BatchGetAssetsHistoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#deleteFeed}. - * @param error Error, if any - * @param [response] Empty + * Converts this BatchGetAssetsHistoryResponse to JSON. + * @returns JSON object */ - type DeleteFeedCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of an ExportAssetsRequest. */ - interface IExportAssetsRequest { + /** Properties of a CreateFeedRequest. */ + interface ICreateFeedRequest { - /** ExportAssetsRequest parent */ + /** CreateFeedRequest parent */ parent?: (string|null); - /** ExportAssetsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); - - /** ExportAssetsRequest assetTypes */ - assetTypes?: (string[]|null); - - /** ExportAssetsRequest contentType */ - contentType?: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType|null); + /** CreateFeedRequest feedId */ + feedId?: (string|null); - /** ExportAssetsRequest outputConfig */ - outputConfig?: (google.cloud.asset.v1.IOutputConfig|null); + /** CreateFeedRequest feed */ + feed?: (google.cloud.asset.v1.IFeed|null); } - /** Represents an ExportAssetsRequest. */ - class ExportAssetsRequest implements IExportAssetsRequest { + /** Represents a CreateFeedRequest. */ + class CreateFeedRequest implements ICreateFeedRequest { /** - * Constructs a new ExportAssetsRequest. + * Constructs a new CreateFeedRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IExportAssetsRequest); + constructor(properties?: google.cloud.asset.v1.ICreateFeedRequest); - /** ExportAssetsRequest parent. */ + /** CreateFeedRequest parent. */ public parent: string; - /** ExportAssetsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** ExportAssetsRequest assetTypes. */ - public assetTypes: string[]; - - /** ExportAssetsRequest contentType. */ - public contentType: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType); + /** CreateFeedRequest feedId. */ + public feedId: string; - /** ExportAssetsRequest outputConfig. */ - public outputConfig?: (google.cloud.asset.v1.IOutputConfig|null); + /** CreateFeedRequest feed. */ + public feed?: (google.cloud.asset.v1.IFeed|null); /** - * Creates a new ExportAssetsRequest instance using the specified properties. + * Creates a new CreateFeedRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportAssetsRequest instance + * @returns CreateFeedRequest instance */ - public static create(properties?: google.cloud.asset.v1.IExportAssetsRequest): google.cloud.asset.v1.ExportAssetsRequest; + public static create(properties?: google.cloud.asset.v1.ICreateFeedRequest): google.cloud.asset.v1.CreateFeedRequest; /** - * Encodes the specified ExportAssetsRequest message. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsRequest.verify|verify} messages. - * @param message ExportAssetsRequest message or plain object to encode + * Encodes the specified CreateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.CreateFeedRequest.verify|verify} messages. + * @param message CreateFeedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IExportAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.ICreateFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsRequest.verify|verify} messages. - * @param message ExportAssetsRequest message or plain object to encode + * Encodes the specified CreateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.CreateFeedRequest.verify|verify} messages. + * @param message CreateFeedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IExportAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.ICreateFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportAssetsRequest message from the specified reader or buffer. + * Decodes a CreateFeedRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportAssetsRequest + * @returns CreateFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.ExportAssetsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.CreateFeedRequest; /** - * Decodes an ExportAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFeedRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportAssetsRequest + * @returns CreateFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.ExportAssetsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.CreateFeedRequest; /** - * Verifies an ExportAssetsRequest message. + * Verifies a CreateFeedRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExportAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFeedRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportAssetsRequest + * @returns CreateFeedRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.ExportAssetsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.CreateFeedRequest; /** - * Creates a plain object from an ExportAssetsRequest message. Also converts values to other types if specified. - * @param message ExportAssetsRequest + * Creates a plain object from a CreateFeedRequest message. Also converts values to other types if specified. + * @param message CreateFeedRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.ExportAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.CreateFeedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportAssetsRequest to JSON. + * Converts this CreateFeedRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExportAssetsResponse. */ - interface IExportAssetsResponse { - - /** ExportAssetsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** Properties of a GetFeedRequest. */ + interface IGetFeedRequest { - /** ExportAssetsResponse outputConfig */ - outputConfig?: (google.cloud.asset.v1.IOutputConfig|null); + /** GetFeedRequest name */ + name?: (string|null); } - /** Represents an ExportAssetsResponse. */ - class ExportAssetsResponse implements IExportAssetsResponse { + /** Represents a GetFeedRequest. */ + class GetFeedRequest implements IGetFeedRequest { /** - * Constructs a new ExportAssetsResponse. + * Constructs a new GetFeedRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IExportAssetsResponse); - - /** ExportAssetsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.asset.v1.IGetFeedRequest); - /** ExportAssetsResponse outputConfig. */ - public outputConfig?: (google.cloud.asset.v1.IOutputConfig|null); + /** GetFeedRequest name. */ + public name: string; /** - * Creates a new ExportAssetsResponse instance using the specified properties. + * Creates a new GetFeedRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportAssetsResponse instance + * @returns GetFeedRequest instance */ - public static create(properties?: google.cloud.asset.v1.IExportAssetsResponse): google.cloud.asset.v1.ExportAssetsResponse; + public static create(properties?: google.cloud.asset.v1.IGetFeedRequest): google.cloud.asset.v1.GetFeedRequest; /** - * Encodes the specified ExportAssetsResponse message. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsResponse.verify|verify} messages. - * @param message ExportAssetsResponse message or plain object to encode + * Encodes the specified GetFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.GetFeedRequest.verify|verify} messages. + * @param message GetFeedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IExportAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IGetFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsResponse.verify|verify} messages. - * @param message ExportAssetsResponse message or plain object to encode + * Encodes the specified GetFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.GetFeedRequest.verify|verify} messages. + * @param message GetFeedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IExportAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IGetFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportAssetsResponse message from the specified reader or buffer. + * Decodes a GetFeedRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportAssetsResponse + * @returns GetFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.ExportAssetsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.GetFeedRequest; /** - * Decodes an ExportAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetFeedRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportAssetsResponse + * @returns GetFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.ExportAssetsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.GetFeedRequest; /** - * Verifies an ExportAssetsResponse message. + * Verifies a GetFeedRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExportAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetFeedRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportAssetsResponse + * @returns GetFeedRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.ExportAssetsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.GetFeedRequest; /** - * Creates a plain object from an ExportAssetsResponse message. Also converts values to other types if specified. - * @param message ExportAssetsResponse + * Creates a plain object from a GetFeedRequest message. Also converts values to other types if specified. + * @param message GetFeedRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.ExportAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.GetFeedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportAssetsResponse to JSON. + * Converts this GetFeedRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchGetAssetsHistoryRequest. */ - interface IBatchGetAssetsHistoryRequest { + /** Properties of a ListFeedsRequest. */ + interface IListFeedsRequest { - /** BatchGetAssetsHistoryRequest parent */ + /** ListFeedsRequest parent */ parent?: (string|null); - - /** BatchGetAssetsHistoryRequest assetNames */ - assetNames?: (string[]|null); - - /** BatchGetAssetsHistoryRequest contentType */ - contentType?: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType|null); - - /** BatchGetAssetsHistoryRequest readTimeWindow */ - readTimeWindow?: (google.cloud.asset.v1.ITimeWindow|null); } - /** Represents a BatchGetAssetsHistoryRequest. */ - class BatchGetAssetsHistoryRequest implements IBatchGetAssetsHistoryRequest { + /** Represents a ListFeedsRequest. */ + class ListFeedsRequest implements IListFeedsRequest { /** - * Constructs a new BatchGetAssetsHistoryRequest. + * Constructs a new ListFeedsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest); + constructor(properties?: google.cloud.asset.v1.IListFeedsRequest); - /** BatchGetAssetsHistoryRequest parent. */ + /** ListFeedsRequest parent. */ public parent: string; - /** BatchGetAssetsHistoryRequest assetNames. */ - public assetNames: string[]; - - /** BatchGetAssetsHistoryRequest contentType. */ - public contentType: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType); - - /** BatchGetAssetsHistoryRequest readTimeWindow. */ - public readTimeWindow?: (google.cloud.asset.v1.ITimeWindow|null); - /** - * Creates a new BatchGetAssetsHistoryRequest instance using the specified properties. + * Creates a new ListFeedsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BatchGetAssetsHistoryRequest instance + * @returns ListFeedsRequest instance */ - public static create(properties?: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest): google.cloud.asset.v1.BatchGetAssetsHistoryRequest; + public static create(properties?: google.cloud.asset.v1.IListFeedsRequest): google.cloud.asset.v1.ListFeedsRequest; /** - * Encodes the specified BatchGetAssetsHistoryRequest message. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryRequest.verify|verify} messages. - * @param message BatchGetAssetsHistoryRequest message or plain object to encode + * Encodes the specified ListFeedsRequest message. Does not implicitly {@link google.cloud.asset.v1.ListFeedsRequest.verify|verify} messages. + * @param message ListFeedsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IListFeedsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchGetAssetsHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryRequest.verify|verify} messages. - * @param message BatchGetAssetsHistoryRequest message or plain object to encode + * Encodes the specified ListFeedsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ListFeedsRequest.verify|verify} messages. + * @param message ListFeedsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IBatchGetAssetsHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IListFeedsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer. + * Decodes a ListFeedsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchGetAssetsHistoryRequest + * @returns ListFeedsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.BatchGetAssetsHistoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.ListFeedsRequest; /** - * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFeedsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchGetAssetsHistoryRequest + * @returns ListFeedsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.BatchGetAssetsHistoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.ListFeedsRequest; /** - * Verifies a BatchGetAssetsHistoryRequest message. + * Verifies a ListFeedsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BatchGetAssetsHistoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFeedsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchGetAssetsHistoryRequest + * @returns ListFeedsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.BatchGetAssetsHistoryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.ListFeedsRequest; /** - * Creates a plain object from a BatchGetAssetsHistoryRequest message. Also converts values to other types if specified. - * @param message BatchGetAssetsHistoryRequest + * Creates a plain object from a ListFeedsRequest message. Also converts values to other types if specified. + * @param message ListFeedsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.BatchGetAssetsHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.ListFeedsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchGetAssetsHistoryRequest to JSON. + * Converts this ListFeedsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchGetAssetsHistoryResponse. */ - interface IBatchGetAssetsHistoryResponse { + /** Properties of a ListFeedsResponse. */ + interface IListFeedsResponse { - /** BatchGetAssetsHistoryResponse assets */ - assets?: (google.cloud.asset.v1.ITemporalAsset[]|null); + /** ListFeedsResponse feeds */ + feeds?: (google.cloud.asset.v1.IFeed[]|null); } - /** Represents a BatchGetAssetsHistoryResponse. */ - class BatchGetAssetsHistoryResponse implements IBatchGetAssetsHistoryResponse { + /** Represents a ListFeedsResponse. */ + class ListFeedsResponse implements IListFeedsResponse { /** - * Constructs a new BatchGetAssetsHistoryResponse. + * Constructs a new ListFeedsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IBatchGetAssetsHistoryResponse); + constructor(properties?: google.cloud.asset.v1.IListFeedsResponse); - /** BatchGetAssetsHistoryResponse assets. */ - public assets: google.cloud.asset.v1.ITemporalAsset[]; + /** ListFeedsResponse feeds. */ + public feeds: google.cloud.asset.v1.IFeed[]; /** - * Creates a new BatchGetAssetsHistoryResponse instance using the specified properties. + * Creates a new ListFeedsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BatchGetAssetsHistoryResponse instance + * @returns ListFeedsResponse instance */ - public static create(properties?: google.cloud.asset.v1.IBatchGetAssetsHistoryResponse): google.cloud.asset.v1.BatchGetAssetsHistoryResponse; + public static create(properties?: google.cloud.asset.v1.IListFeedsResponse): google.cloud.asset.v1.ListFeedsResponse; /** - * Encodes the specified BatchGetAssetsHistoryResponse message. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryResponse.verify|verify} messages. - * @param message BatchGetAssetsHistoryResponse message or plain object to encode + * Encodes the specified ListFeedsResponse message. Does not implicitly {@link google.cloud.asset.v1.ListFeedsResponse.verify|verify} messages. + * @param message ListFeedsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IBatchGetAssetsHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IListFeedsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchGetAssetsHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryResponse.verify|verify} messages. - * @param message BatchGetAssetsHistoryResponse message or plain object to encode + * Encodes the specified ListFeedsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ListFeedsResponse.verify|verify} messages. + * @param message ListFeedsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IBatchGetAssetsHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IListFeedsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer. + * Decodes a ListFeedsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchGetAssetsHistoryResponse + * @returns ListFeedsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.BatchGetAssetsHistoryResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.ListFeedsResponse; /** - * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer, length delimited. + * Decodes a ListFeedsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchGetAssetsHistoryResponse + * @returns ListFeedsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.BatchGetAssetsHistoryResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.ListFeedsResponse; /** - * Verifies a BatchGetAssetsHistoryResponse message. + * Verifies a ListFeedsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BatchGetAssetsHistoryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListFeedsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchGetAssetsHistoryResponse + * @returns ListFeedsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.BatchGetAssetsHistoryResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.ListFeedsResponse; /** - * Creates a plain object from a BatchGetAssetsHistoryResponse message. Also converts values to other types if specified. - * @param message BatchGetAssetsHistoryResponse + * Creates a plain object from a ListFeedsResponse message. Also converts values to other types if specified. + * @param message ListFeedsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.BatchGetAssetsHistoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.ListFeedsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchGetAssetsHistoryResponse to JSON. + * Converts this ListFeedsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateFeedRequest. */ - interface ICreateFeedRequest { - - /** CreateFeedRequest parent */ - parent?: (string|null); - - /** CreateFeedRequest feedId */ - feedId?: (string|null); + /** Properties of an UpdateFeedRequest. */ + interface IUpdateFeedRequest { - /** CreateFeedRequest feed */ + /** UpdateFeedRequest feed */ feed?: (google.cloud.asset.v1.IFeed|null); + + /** UpdateFeedRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a CreateFeedRequest. */ - class CreateFeedRequest implements ICreateFeedRequest { + /** Represents an UpdateFeedRequest. */ + class UpdateFeedRequest implements IUpdateFeedRequest { /** - * Constructs a new CreateFeedRequest. + * Constructs a new UpdateFeedRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.ICreateFeedRequest); - - /** CreateFeedRequest parent. */ - public parent: string; - - /** CreateFeedRequest feedId. */ - public feedId: string; + constructor(properties?: google.cloud.asset.v1.IUpdateFeedRequest); - /** CreateFeedRequest feed. */ + /** UpdateFeedRequest feed. */ public feed?: (google.cloud.asset.v1.IFeed|null); + /** UpdateFeedRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + /** - * Creates a new CreateFeedRequest instance using the specified properties. + * Creates a new UpdateFeedRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateFeedRequest instance + * @returns UpdateFeedRequest instance */ - public static create(properties?: google.cloud.asset.v1.ICreateFeedRequest): google.cloud.asset.v1.CreateFeedRequest; + public static create(properties?: google.cloud.asset.v1.IUpdateFeedRequest): google.cloud.asset.v1.UpdateFeedRequest; /** - * Encodes the specified CreateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.CreateFeedRequest.verify|verify} messages. - * @param message CreateFeedRequest message or plain object to encode + * Encodes the specified UpdateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.UpdateFeedRequest.verify|verify} messages. + * @param message UpdateFeedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.ICreateFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IUpdateFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.CreateFeedRequest.verify|verify} messages. - * @param message CreateFeedRequest message or plain object to encode + * Encodes the specified UpdateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.UpdateFeedRequest.verify|verify} messages. + * @param message UpdateFeedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.ICreateFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IUpdateFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateFeedRequest message from the specified reader or buffer. + * Decodes an UpdateFeedRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateFeedRequest + * @returns UpdateFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.CreateFeedRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.UpdateFeedRequest; /** - * Decodes a CreateFeedRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateFeedRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateFeedRequest + * @returns UpdateFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.CreateFeedRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.UpdateFeedRequest; /** - * Verifies a CreateFeedRequest message. + * Verifies an UpdateFeedRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFeedRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateFeedRequest + * @returns UpdateFeedRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.CreateFeedRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.UpdateFeedRequest; /** - * Creates a plain object from a CreateFeedRequest message. Also converts values to other types if specified. - * @param message CreateFeedRequest + * Creates a plain object from an UpdateFeedRequest message. Also converts values to other types if specified. + * @param message UpdateFeedRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.CreateFeedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.UpdateFeedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateFeedRequest to JSON. + * Converts this UpdateFeedRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetFeedRequest. */ - interface IGetFeedRequest { + /** Properties of a DeleteFeedRequest. */ + interface IDeleteFeedRequest { - /** GetFeedRequest name */ + /** DeleteFeedRequest name */ name?: (string|null); } - /** Represents a GetFeedRequest. */ - class GetFeedRequest implements IGetFeedRequest { + /** Represents a DeleteFeedRequest. */ + class DeleteFeedRequest implements IDeleteFeedRequest { /** - * Constructs a new GetFeedRequest. + * Constructs a new DeleteFeedRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IGetFeedRequest); + constructor(properties?: google.cloud.asset.v1.IDeleteFeedRequest); - /** GetFeedRequest name. */ + /** DeleteFeedRequest name. */ public name: string; /** - * Creates a new GetFeedRequest instance using the specified properties. + * Creates a new DeleteFeedRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetFeedRequest instance + * @returns DeleteFeedRequest instance */ - public static create(properties?: google.cloud.asset.v1.IGetFeedRequest): google.cloud.asset.v1.GetFeedRequest; + public static create(properties?: google.cloud.asset.v1.IDeleteFeedRequest): google.cloud.asset.v1.DeleteFeedRequest; /** - * Encodes the specified GetFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.GetFeedRequest.verify|verify} messages. - * @param message GetFeedRequest message or plain object to encode + * Encodes the specified DeleteFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.DeleteFeedRequest.verify|verify} messages. + * @param message DeleteFeedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IGetFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IDeleteFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.GetFeedRequest.verify|verify} messages. - * @param message GetFeedRequest message or plain object to encode + * Encodes the specified DeleteFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.DeleteFeedRequest.verify|verify} messages. + * @param message DeleteFeedRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IGetFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IDeleteFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFeedRequest message from the specified reader or buffer. + * Decodes a DeleteFeedRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFeedRequest + * @returns DeleteFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.GetFeedRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.DeleteFeedRequest; /** - * Decodes a GetFeedRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFeedRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFeedRequest + * @returns DeleteFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.GetFeedRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.DeleteFeedRequest; /** - * Verifies a GetFeedRequest message. + * Verifies a DeleteFeedRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFeedRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFeedRequest + * @returns DeleteFeedRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.GetFeedRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.DeleteFeedRequest; /** - * Creates a plain object from a GetFeedRequest message. Also converts values to other types if specified. - * @param message GetFeedRequest + * Creates a plain object from a DeleteFeedRequest message. Also converts values to other types if specified. + * @param message DeleteFeedRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.GetFeedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.DeleteFeedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFeedRequest to JSON. + * Converts this DeleteFeedRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListFeedsRequest. */ - interface IListFeedsRequest { + /** Properties of an OutputConfig. */ + interface IOutputConfig { - /** ListFeedsRequest parent */ - parent?: (string|null); + /** OutputConfig gcsDestination */ + gcsDestination?: (google.cloud.asset.v1.IGcsDestination|null); + + /** OutputConfig bigqueryDestination */ + bigqueryDestination?: (google.cloud.asset.v1.IBigQueryDestination|null); } - /** Represents a ListFeedsRequest. */ - class ListFeedsRequest implements IListFeedsRequest { + /** Represents an OutputConfig. */ + class OutputConfig implements IOutputConfig { /** - * Constructs a new ListFeedsRequest. + * Constructs a new OutputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IListFeedsRequest); + constructor(properties?: google.cloud.asset.v1.IOutputConfig); - /** ListFeedsRequest parent. */ - public parent: string; + /** OutputConfig gcsDestination. */ + public gcsDestination?: (google.cloud.asset.v1.IGcsDestination|null); + + /** OutputConfig bigqueryDestination. */ + public bigqueryDestination?: (google.cloud.asset.v1.IBigQueryDestination|null); + + /** OutputConfig destination. */ + public destination?: ("gcsDestination"|"bigqueryDestination"); /** - * Creates a new ListFeedsRequest instance using the specified properties. + * Creates a new OutputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListFeedsRequest instance + * @returns OutputConfig instance */ - public static create(properties?: google.cloud.asset.v1.IListFeedsRequest): google.cloud.asset.v1.ListFeedsRequest; + public static create(properties?: google.cloud.asset.v1.IOutputConfig): google.cloud.asset.v1.OutputConfig; /** - * Encodes the specified ListFeedsRequest message. Does not implicitly {@link google.cloud.asset.v1.ListFeedsRequest.verify|verify} messages. - * @param message ListFeedsRequest message or plain object to encode + * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.asset.v1.OutputConfig.verify|verify} messages. + * @param message OutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IListFeedsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFeedsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ListFeedsRequest.verify|verify} messages. - * @param message ListFeedsRequest message or plain object to encode + * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1.OutputConfig.verify|verify} messages. + * @param message OutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IListFeedsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFeedsRequest message from the specified reader or buffer. + * Decodes an OutputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFeedsRequest + * @returns OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.ListFeedsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.OutputConfig; /** - * Decodes a ListFeedsRequest message from the specified reader or buffer, length delimited. + * Decodes an OutputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFeedsRequest + * @returns OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.ListFeedsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.OutputConfig; /** - * Verifies a ListFeedsRequest message. + * Verifies an OutputConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListFeedsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFeedsRequest + * @returns OutputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.ListFeedsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.OutputConfig; /** - * Creates a plain object from a ListFeedsRequest message. Also converts values to other types if specified. - * @param message ListFeedsRequest + * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. + * @param message OutputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.ListFeedsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.OutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFeedsRequest to JSON. + * Converts this OutputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListFeedsResponse. */ - interface IListFeedsResponse { + /** Properties of a GcsDestination. */ + interface IGcsDestination { - /** ListFeedsResponse feeds */ - feeds?: (google.cloud.asset.v1.IFeed[]|null); + /** GcsDestination uri */ + uri?: (string|null); + + /** GcsDestination uriPrefix */ + uriPrefix?: (string|null); } - /** Represents a ListFeedsResponse. */ - class ListFeedsResponse implements IListFeedsResponse { + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { /** - * Constructs a new ListFeedsResponse. + * Constructs a new GcsDestination. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IListFeedsResponse); + constructor(properties?: google.cloud.asset.v1.IGcsDestination); - /** ListFeedsResponse feeds. */ - public feeds: google.cloud.asset.v1.IFeed[]; + /** GcsDestination uri. */ + public uri: string; + + /** GcsDestination uriPrefix. */ + public uriPrefix: string; + + /** GcsDestination objectUri. */ + public objectUri?: ("uri"|"uriPrefix"); /** - * Creates a new ListFeedsResponse instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @param [properties] Properties to set - * @returns ListFeedsResponse instance + * @returns GcsDestination instance */ - public static create(properties?: google.cloud.asset.v1.IListFeedsResponse): google.cloud.asset.v1.ListFeedsResponse; + public static create(properties?: google.cloud.asset.v1.IGcsDestination): google.cloud.asset.v1.GcsDestination; /** - * Encodes the specified ListFeedsResponse message. Does not implicitly {@link google.cloud.asset.v1.ListFeedsResponse.verify|verify} messages. - * @param message ListFeedsResponse message or plain object to encode + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.asset.v1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IListFeedsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFeedsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ListFeedsResponse.verify|verify} messages. - * @param message ListFeedsResponse message or plain object to encode + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IListFeedsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFeedsResponse message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFeedsResponse + * @returns GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.ListFeedsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.GcsDestination; /** - * Decodes a ListFeedsResponse message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFeedsResponse + * @returns GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.ListFeedsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.GcsDestination; /** - * Verifies a ListFeedsResponse message. + * Verifies a GcsDestination message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListFeedsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFeedsResponse + * @returns GcsDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.ListFeedsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.GcsDestination; /** - * Creates a plain object from a ListFeedsResponse message. Also converts values to other types if specified. - * @param message ListFeedsResponse + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @param message GcsDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.ListFeedsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFeedsResponse to JSON. + * Converts this GcsDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateFeedRequest. */ - interface IUpdateFeedRequest { + /** Properties of a BigQueryDestination. */ + interface IBigQueryDestination { - /** UpdateFeedRequest feed */ - feed?: (google.cloud.asset.v1.IFeed|null); + /** BigQueryDestination dataset */ + dataset?: (string|null); - /** UpdateFeedRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** BigQueryDestination table */ + table?: (string|null); + + /** BigQueryDestination force */ + force?: (boolean|null); } - /** Represents an UpdateFeedRequest. */ - class UpdateFeedRequest implements IUpdateFeedRequest { + /** Represents a BigQueryDestination. */ + class BigQueryDestination implements IBigQueryDestination { /** - * Constructs a new UpdateFeedRequest. + * Constructs a new BigQueryDestination. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IUpdateFeedRequest); + constructor(properties?: google.cloud.asset.v1.IBigQueryDestination); - /** UpdateFeedRequest feed. */ - public feed?: (google.cloud.asset.v1.IFeed|null); + /** BigQueryDestination dataset. */ + public dataset: string; - /** UpdateFeedRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** BigQueryDestination table. */ + public table: string; + + /** BigQueryDestination force. */ + public force: boolean; /** - * Creates a new UpdateFeedRequest instance using the specified properties. + * Creates a new BigQueryDestination instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateFeedRequest instance + * @returns BigQueryDestination instance */ - public static create(properties?: google.cloud.asset.v1.IUpdateFeedRequest): google.cloud.asset.v1.UpdateFeedRequest; + public static create(properties?: google.cloud.asset.v1.IBigQueryDestination): google.cloud.asset.v1.BigQueryDestination; /** - * Encodes the specified UpdateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.UpdateFeedRequest.verify|verify} messages. - * @param message UpdateFeedRequest message or plain object to encode + * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.cloud.asset.v1.BigQueryDestination.verify|verify} messages. + * @param message BigQueryDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IUpdateFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.UpdateFeedRequest.verify|verify} messages. - * @param message UpdateFeedRequest message or plain object to encode + * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BigQueryDestination.verify|verify} messages. + * @param message BigQueryDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IUpdateFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateFeedRequest message from the specified reader or buffer. + * Decodes a BigQueryDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateFeedRequest + * @returns BigQueryDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.UpdateFeedRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.BigQueryDestination; /** - * Decodes an UpdateFeedRequest message from the specified reader or buffer, length delimited. + * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateFeedRequest + * @returns BigQueryDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.UpdateFeedRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.BigQueryDestination; /** - * Verifies an UpdateFeedRequest message. + * Verifies a BigQueryDestination message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateFeedRequest + * @returns BigQueryDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.UpdateFeedRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.BigQueryDestination; /** - * Creates a plain object from an UpdateFeedRequest message. Also converts values to other types if specified. - * @param message UpdateFeedRequest + * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. + * @param message BigQueryDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.UpdateFeedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.BigQueryDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateFeedRequest to JSON. + * Converts this BigQueryDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteFeedRequest. */ - interface IDeleteFeedRequest { + /** Properties of a PubsubDestination. */ + interface IPubsubDestination { - /** DeleteFeedRequest name */ - name?: (string|null); + /** PubsubDestination topic */ + topic?: (string|null); } - /** Represents a DeleteFeedRequest. */ - class DeleteFeedRequest implements IDeleteFeedRequest { + /** Represents a PubsubDestination. */ + class PubsubDestination implements IPubsubDestination { /** - * Constructs a new DeleteFeedRequest. + * Constructs a new PubsubDestination. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IDeleteFeedRequest); + constructor(properties?: google.cloud.asset.v1.IPubsubDestination); - /** DeleteFeedRequest name. */ - public name: string; + /** PubsubDestination topic. */ + public topic: string; /** - * Creates a new DeleteFeedRequest instance using the specified properties. + * Creates a new PubsubDestination instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteFeedRequest instance + * @returns PubsubDestination instance */ - public static create(properties?: google.cloud.asset.v1.IDeleteFeedRequest): google.cloud.asset.v1.DeleteFeedRequest; + public static create(properties?: google.cloud.asset.v1.IPubsubDestination): google.cloud.asset.v1.PubsubDestination; /** - * Encodes the specified DeleteFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.DeleteFeedRequest.verify|verify} messages. - * @param message DeleteFeedRequest message or plain object to encode + * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.asset.v1.PubsubDestination.verify|verify} messages. + * @param message PubsubDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IDeleteFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IPubsubDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.DeleteFeedRequest.verify|verify} messages. - * @param message DeleteFeedRequest message or plain object to encode + * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.PubsubDestination.verify|verify} messages. + * @param message PubsubDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IDeleteFeedRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IPubsubDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteFeedRequest message from the specified reader or buffer. + * Decodes a PubsubDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteFeedRequest + * @returns PubsubDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.DeleteFeedRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.PubsubDestination; /** - * Decodes a DeleteFeedRequest message from the specified reader or buffer, length delimited. + * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteFeedRequest + * @returns PubsubDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.DeleteFeedRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.PubsubDestination; /** - * Verifies a DeleteFeedRequest message. + * Verifies a PubsubDestination message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteFeedRequest + * @returns PubsubDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.DeleteFeedRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.PubsubDestination; /** - * Creates a plain object from a DeleteFeedRequest message. Also converts values to other types if specified. - * @param message DeleteFeedRequest + * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. + * @param message PubsubDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.DeleteFeedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.PubsubDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteFeedRequest to JSON. + * Converts this PubsubDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an OutputConfig. */ - interface IOutputConfig { + /** ContentType enum. */ + enum ContentType { + CONTENT_TYPE_UNSPECIFIED = 0, + RESOURCE = 1, + IAM_POLICY = 2, + ORG_POLICY = 4, + ACCESS_POLICY = 5 + } - /** OutputConfig gcsDestination */ - gcsDestination?: (google.cloud.asset.v1.IGcsDestination|null); + /** Properties of a FeedOutputConfig. */ + interface IFeedOutputConfig { - /** OutputConfig bigqueryDestination */ - bigqueryDestination?: (google.cloud.asset.v1.IBigQueryDestination|null); + /** FeedOutputConfig pubsubDestination */ + pubsubDestination?: (google.cloud.asset.v1.IPubsubDestination|null); } - /** Represents an OutputConfig. */ - class OutputConfig implements IOutputConfig { + /** Represents a FeedOutputConfig. */ + class FeedOutputConfig implements IFeedOutputConfig { /** - * Constructs a new OutputConfig. + * Constructs a new FeedOutputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IOutputConfig); - - /** OutputConfig gcsDestination. */ - public gcsDestination?: (google.cloud.asset.v1.IGcsDestination|null); + constructor(properties?: google.cloud.asset.v1.IFeedOutputConfig); - /** OutputConfig bigqueryDestination. */ - public bigqueryDestination?: (google.cloud.asset.v1.IBigQueryDestination|null); + /** FeedOutputConfig pubsubDestination. */ + public pubsubDestination?: (google.cloud.asset.v1.IPubsubDestination|null); - /** OutputConfig destination. */ - public destination?: ("gcsDestination"|"bigqueryDestination"); + /** FeedOutputConfig destination. */ + public destination?: "pubsubDestination"; /** - * Creates a new OutputConfig instance using the specified properties. + * Creates a new FeedOutputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns OutputConfig instance + * @returns FeedOutputConfig instance */ - public static create(properties?: google.cloud.asset.v1.IOutputConfig): google.cloud.asset.v1.OutputConfig; + public static create(properties?: google.cloud.asset.v1.IFeedOutputConfig): google.cloud.asset.v1.FeedOutputConfig; /** - * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.asset.v1.OutputConfig.verify|verify} messages. - * @param message OutputConfig message or plain object to encode + * Encodes the specified FeedOutputConfig message. Does not implicitly {@link google.cloud.asset.v1.FeedOutputConfig.verify|verify} messages. + * @param message FeedOutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IFeedOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1.OutputConfig.verify|verify} messages. - * @param message OutputConfig message or plain object to encode + * Encodes the specified FeedOutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1.FeedOutputConfig.verify|verify} messages. + * @param message FeedOutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IFeedOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OutputConfig message from the specified reader or buffer. + * Decodes a FeedOutputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OutputConfig + * @returns FeedOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.OutputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.FeedOutputConfig; /** - * Decodes an OutputConfig message from the specified reader or buffer, length delimited. + * Decodes a FeedOutputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OutputConfig + * @returns FeedOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.OutputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.FeedOutputConfig; /** - * Verifies an OutputConfig message. + * Verifies a FeedOutputConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a FeedOutputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OutputConfig + * @returns FeedOutputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.OutputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.FeedOutputConfig; /** - * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. - * @param message OutputConfig + * Creates a plain object from a FeedOutputConfig message. Also converts values to other types if specified. + * @param message FeedOutputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.OutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.FeedOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OutputConfig to JSON. + * Converts this FeedOutputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GcsDestination. */ - interface IGcsDestination { + /** Properties of a Feed. */ + interface IFeed { - /** GcsDestination uri */ - uri?: (string|null); + /** Feed name */ + name?: (string|null); - /** GcsDestination uriPrefix */ - uriPrefix?: (string|null); + /** Feed assetNames */ + assetNames?: (string[]|null); + + /** Feed assetTypes */ + assetTypes?: (string[]|null); + + /** Feed contentType */ + contentType?: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType|null); + + /** Feed feedOutputConfig */ + feedOutputConfig?: (google.cloud.asset.v1.IFeedOutputConfig|null); } - /** Represents a GcsDestination. */ - class GcsDestination implements IGcsDestination { + /** Represents a Feed. */ + class Feed implements IFeed { /** - * Constructs a new GcsDestination. + * Constructs a new Feed. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IGcsDestination); + constructor(properties?: google.cloud.asset.v1.IFeed); - /** GcsDestination uri. */ - public uri: string; + /** Feed name. */ + public name: string; - /** GcsDestination uriPrefix. */ - public uriPrefix: string; + /** Feed assetNames. */ + public assetNames: string[]; - /** GcsDestination objectUri. */ - public objectUri?: ("uri"|"uriPrefix"); + /** Feed assetTypes. */ + public assetTypes: string[]; + + /** Feed contentType. */ + public contentType: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType); + + /** Feed feedOutputConfig. */ + public feedOutputConfig?: (google.cloud.asset.v1.IFeedOutputConfig|null); /** - * Creates a new GcsDestination instance using the specified properties. + * Creates a new Feed instance using the specified properties. * @param [properties] Properties to set - * @returns GcsDestination instance + * @returns Feed instance */ - public static create(properties?: google.cloud.asset.v1.IGcsDestination): google.cloud.asset.v1.GcsDestination; + public static create(properties?: google.cloud.asset.v1.IFeed): google.cloud.asset.v1.Feed; /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.asset.v1.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode + * Encodes the specified Feed message. Does not implicitly {@link google.cloud.asset.v1.Feed.verify|verify} messages. + * @param message Feed message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IFeed, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode + * Encodes the specified Feed message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Feed.verify|verify} messages. + * @param message Feed message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IFeed, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsDestination message from the specified reader or buffer. + * Decodes a Feed message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsDestination + * @returns Feed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.GcsDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.Feed; /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * Decodes a Feed message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsDestination + * @returns Feed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.GcsDestination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.Feed; /** - * Verifies a GcsDestination message. + * Verifies a Feed message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * Creates a Feed message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsDestination + * @returns Feed */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.GcsDestination; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.Feed; /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. - * @param message GcsDestination + * Creates a plain object from a Feed message. Also converts values to other types if specified. + * @param message Feed * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.Feed, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsDestination to JSON. + * Converts this Feed to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BigQueryDestination. */ - interface IBigQueryDestination { + /** Properties of a TemporalAsset. */ + interface ITemporalAsset { - /** BigQueryDestination dataset */ - dataset?: (string|null); + /** TemporalAsset window */ + window?: (google.cloud.asset.v1.ITimeWindow|null); - /** BigQueryDestination table */ - table?: (string|null); + /** TemporalAsset deleted */ + deleted?: (boolean|null); - /** BigQueryDestination force */ - force?: (boolean|null); + /** TemporalAsset asset */ + asset?: (google.cloud.asset.v1.IAsset|null); } - /** Represents a BigQueryDestination. */ - class BigQueryDestination implements IBigQueryDestination { + /** Represents a TemporalAsset. */ + class TemporalAsset implements ITemporalAsset { /** - * Constructs a new BigQueryDestination. + * Constructs a new TemporalAsset. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IBigQueryDestination); + constructor(properties?: google.cloud.asset.v1.ITemporalAsset); - /** BigQueryDestination dataset. */ - public dataset: string; + /** TemporalAsset window. */ + public window?: (google.cloud.asset.v1.ITimeWindow|null); - /** BigQueryDestination table. */ - public table: string; + /** TemporalAsset deleted. */ + public deleted: boolean; - /** BigQueryDestination force. */ - public force: boolean; + /** TemporalAsset asset. */ + public asset?: (google.cloud.asset.v1.IAsset|null); /** - * Creates a new BigQueryDestination instance using the specified properties. + * Creates a new TemporalAsset instance using the specified properties. * @param [properties] Properties to set - * @returns BigQueryDestination instance + * @returns TemporalAsset instance */ - public static create(properties?: google.cloud.asset.v1.IBigQueryDestination): google.cloud.asset.v1.BigQueryDestination; + public static create(properties?: google.cloud.asset.v1.ITemporalAsset): google.cloud.asset.v1.TemporalAsset; /** - * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.cloud.asset.v1.BigQueryDestination.verify|verify} messages. - * @param message BigQueryDestination message or plain object to encode + * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1.TemporalAsset.verify|verify} messages. + * @param message TemporalAsset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BigQueryDestination.verify|verify} messages. - * @param message BigQueryDestination message or plain object to encode + * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1.TemporalAsset.verify|verify} messages. + * @param message TemporalAsset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQueryDestination message from the specified reader or buffer. + * Decodes a TemporalAsset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQueryDestination + * @returns TemporalAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.BigQueryDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.TemporalAsset; /** - * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. + * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQueryDestination + * @returns TemporalAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.BigQueryDestination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.TemporalAsset; /** - * Verifies a BigQueryDestination message. + * Verifies a TemporalAsset message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. + * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQueryDestination + * @returns TemporalAsset */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.BigQueryDestination; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.TemporalAsset; /** - * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. - * @param message BigQueryDestination + * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. + * @param message TemporalAsset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.BigQueryDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.TemporalAsset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQueryDestination to JSON. + * Converts this TemporalAsset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a PubsubDestination. */ - interface IPubsubDestination { + /** Properties of a TimeWindow. */ + interface ITimeWindow { - /** PubsubDestination topic */ - topic?: (string|null); + /** TimeWindow startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TimeWindow endTime */ + endTime?: (google.protobuf.ITimestamp|null); } - /** Represents a PubsubDestination. */ - class PubsubDestination implements IPubsubDestination { + /** Represents a TimeWindow. */ + class TimeWindow implements ITimeWindow { /** - * Constructs a new PubsubDestination. + * Constructs a new TimeWindow. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IPubsubDestination); + constructor(properties?: google.cloud.asset.v1.ITimeWindow); - /** PubsubDestination topic. */ - public topic: string; + /** TimeWindow startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TimeWindow endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new PubsubDestination instance using the specified properties. + * Creates a new TimeWindow instance using the specified properties. * @param [properties] Properties to set - * @returns PubsubDestination instance + * @returns TimeWindow instance */ - public static create(properties?: google.cloud.asset.v1.IPubsubDestination): google.cloud.asset.v1.PubsubDestination; + public static create(properties?: google.cloud.asset.v1.ITimeWindow): google.cloud.asset.v1.TimeWindow; /** - * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.asset.v1.PubsubDestination.verify|verify} messages. - * @param message PubsubDestination message or plain object to encode + * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1.TimeWindow.verify|verify} messages. + * @param message TimeWindow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IPubsubDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.PubsubDestination.verify|verify} messages. - * @param message PubsubDestination message or plain object to encode + * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1.TimeWindow.verify|verify} messages. + * @param message TimeWindow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IPubsubDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PubsubDestination message from the specified reader or buffer. + * Decodes a TimeWindow message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PubsubDestination + * @returns TimeWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.PubsubDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.TimeWindow; /** - * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. + * Decodes a TimeWindow message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PubsubDestination + * @returns TimeWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.PubsubDestination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.TimeWindow; /** - * Verifies a PubsubDestination message. + * Verifies a TimeWindow message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. + * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PubsubDestination + * @returns TimeWindow */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.PubsubDestination; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.TimeWindow; /** - * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. - * @param message PubsubDestination + * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. + * @param message TimeWindow * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.PubsubDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.TimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PubsubDestination to JSON. + * Converts this TimeWindow to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** ContentType enum. */ - enum ContentType { - CONTENT_TYPE_UNSPECIFIED = 0, - RESOURCE = 1, - IAM_POLICY = 2, - ORG_POLICY = 4, - ACCESS_POLICY = 5 - } + /** Properties of an Asset. */ + interface IAsset { - /** Properties of a FeedOutputConfig. */ - interface IFeedOutputConfig { + /** Asset name */ + name?: (string|null); - /** FeedOutputConfig pubsubDestination */ - pubsubDestination?: (google.cloud.asset.v1.IPubsubDestination|null); + /** Asset assetType */ + assetType?: (string|null); + + /** Asset resource */ + resource?: (google.cloud.asset.v1.IResource|null); + + /** Asset iamPolicy */ + iamPolicy?: (google.iam.v1.IPolicy|null); + + /** Asset ancestors */ + ancestors?: (string[]|null); } - /** Represents a FeedOutputConfig. */ - class FeedOutputConfig implements IFeedOutputConfig { + /** Represents an Asset. */ + class Asset implements IAsset { /** - * Constructs a new FeedOutputConfig. + * Constructs a new Asset. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IFeedOutputConfig); + constructor(properties?: google.cloud.asset.v1.IAsset); - /** FeedOutputConfig pubsubDestination. */ - public pubsubDestination?: (google.cloud.asset.v1.IPubsubDestination|null); + /** Asset name. */ + public name: string; - /** FeedOutputConfig destination. */ - public destination?: "pubsubDestination"; + /** Asset assetType. */ + public assetType: string; + + /** Asset resource. */ + public resource?: (google.cloud.asset.v1.IResource|null); + + /** Asset iamPolicy. */ + public iamPolicy?: (google.iam.v1.IPolicy|null); + + /** Asset ancestors. */ + public ancestors: string[]; /** - * Creates a new FeedOutputConfig instance using the specified properties. + * Creates a new Asset instance using the specified properties. * @param [properties] Properties to set - * @returns FeedOutputConfig instance + * @returns Asset instance */ - public static create(properties?: google.cloud.asset.v1.IFeedOutputConfig): google.cloud.asset.v1.FeedOutputConfig; + public static create(properties?: google.cloud.asset.v1.IAsset): google.cloud.asset.v1.Asset; /** - * Encodes the specified FeedOutputConfig message. Does not implicitly {@link google.cloud.asset.v1.FeedOutputConfig.verify|verify} messages. - * @param message FeedOutputConfig message or plain object to encode + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IFeedOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FeedOutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1.FeedOutputConfig.verify|verify} messages. - * @param message FeedOutputConfig message or plain object to encode + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IFeedOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FeedOutputConfig message from the specified reader or buffer. + * Decodes an Asset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FeedOutputConfig + * @returns Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.FeedOutputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.Asset; /** - * Decodes a FeedOutputConfig message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FeedOutputConfig + * @returns Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.FeedOutputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.Asset; /** - * Verifies a FeedOutputConfig message. + * Verifies an Asset message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FeedOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates an Asset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FeedOutputConfig + * @returns Asset */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.FeedOutputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.Asset; /** - * Creates a plain object from a FeedOutputConfig message. Also converts values to other types if specified. - * @param message FeedOutputConfig + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @param message Asset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.FeedOutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FeedOutputConfig to JSON. + * Converts this Asset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Feed. */ - interface IFeed { + /** Properties of a Resource. */ + interface IResource { - /** Feed name */ - name?: (string|null); + /** Resource version */ + version?: (string|null); - /** Feed assetNames */ - assetNames?: (string[]|null); + /** Resource discoveryDocumentUri */ + discoveryDocumentUri?: (string|null); - /** Feed assetTypes */ - assetTypes?: (string[]|null); + /** Resource discoveryName */ + discoveryName?: (string|null); - /** Feed contentType */ - contentType?: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType|null); + /** Resource resourceUrl */ + resourceUrl?: (string|null); - /** Feed feedOutputConfig */ - feedOutputConfig?: (google.cloud.asset.v1.IFeedOutputConfig|null); + /** Resource parent */ + parent?: (string|null); + + /** Resource data */ + data?: (google.protobuf.IStruct|null); } - /** Represents a Feed. */ - class Feed implements IFeed { + /** Represents a Resource. */ + class Resource implements IResource { /** - * Constructs a new Feed. + * Constructs a new Resource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1.IFeed); + constructor(properties?: google.cloud.asset.v1.IResource); - /** Feed name. */ - public name: string; + /** Resource version. */ + public version: string; - /** Feed assetNames. */ - public assetNames: string[]; + /** Resource discoveryDocumentUri. */ + public discoveryDocumentUri: string; - /** Feed assetTypes. */ - public assetTypes: string[]; + /** Resource discoveryName. */ + public discoveryName: string; - /** Feed contentType. */ - public contentType: (google.cloud.asset.v1.ContentType|keyof typeof google.cloud.asset.v1.ContentType); + /** Resource resourceUrl. */ + public resourceUrl: string; - /** Feed feedOutputConfig. */ - public feedOutputConfig?: (google.cloud.asset.v1.IFeedOutputConfig|null); + /** Resource parent. */ + public parent: string; + + /** Resource data. */ + public data?: (google.protobuf.IStruct|null); /** - * Creates a new Feed instance using the specified properties. + * Creates a new Resource instance using the specified properties. * @param [properties] Properties to set - * @returns Feed instance + * @returns Resource instance */ - public static create(properties?: google.cloud.asset.v1.IFeed): google.cloud.asset.v1.Feed; + public static create(properties?: google.cloud.asset.v1.IResource): google.cloud.asset.v1.Resource; /** - * Encodes the specified Feed message. Does not implicitly {@link google.cloud.asset.v1.Feed.verify|verify} messages. - * @param message Feed message or plain object to encode + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1.IFeed, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Feed message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Feed.verify|verify} messages. - * @param message Feed message or plain object to encode + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1.IFeed, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Feed message from the specified reader or buffer. + * Decodes a Resource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Feed + * @returns Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.Feed; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1.Resource; /** - * Decodes a Feed message from the specified reader or buffer, length delimited. + * Decodes a Resource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Feed + * @returns Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.Feed; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1.Resource; /** - * Verifies a Feed message. + * Verifies a Resource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Feed message from a plain object. Also converts values to their respective internal types. + * Creates a Resource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Feed + * @returns Resource */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.Feed; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1.Resource; /** - * Creates a plain object from a Feed message. Also converts values to other types if specified. - * @param message Feed + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @param message Resource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1.Feed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Feed to JSON. + * Converts this Resource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -2205,1350 +2205,1128 @@ export namespace google { /** Namespace v1beta1. */ namespace v1beta1 { - /** Properties of a TemporalAsset. */ - interface ITemporalAsset { - - /** TemporalAsset window */ - window?: (google.cloud.asset.v1beta1.ITimeWindow|null); - - /** TemporalAsset deleted */ - deleted?: (boolean|null); - - /** TemporalAsset asset */ - asset?: (google.cloud.asset.v1beta1.IAsset|null); - } - - /** Represents a TemporalAsset. */ - class TemporalAsset implements ITemporalAsset { + /** Represents an AssetService */ + class AssetService extends $protobuf.rpc.Service { /** - * Constructs a new TemporalAsset. - * @param [properties] Properties to set + * Constructs a new AssetService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.asset.v1beta1.ITemporalAsset); - - /** TemporalAsset window. */ - public window?: (google.cloud.asset.v1beta1.ITimeWindow|null); - - /** TemporalAsset deleted. */ - public deleted: boolean; - - /** TemporalAsset asset. */ - public asset?: (google.cloud.asset.v1beta1.IAsset|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new TemporalAsset instance using the specified properties. - * @param [properties] Properties to set - * @returns TemporalAsset instance + * Creates new AssetService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(properties?: google.cloud.asset.v1beta1.ITemporalAsset): google.cloud.asset.v1beta1.TemporalAsset; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AssetService; /** - * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1beta1.TemporalAsset.verify|verify} messages. - * @param message TemporalAsset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ExportAssets. + * @param request ExportAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encode(message: google.cloud.asset.v1beta1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public exportAssets(request: google.cloud.asset.v1beta1.IExportAssetsRequest, callback: google.cloud.asset.v1beta1.AssetService.ExportAssetsCallback): void; /** - * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.TemporalAsset.verify|verify} messages. - * @param message TemporalAsset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ExportAssets. + * @param request ExportAssetsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.asset.v1beta1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public exportAssets(request: google.cloud.asset.v1beta1.IExportAssetsRequest): Promise; /** - * Decodes a TemporalAsset message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TemporalAsset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls BatchGetAssetsHistory. + * @param request BatchGetAssetsHistoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchGetAssetsHistoryResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.TemporalAsset; + public batchGetAssetsHistory(request: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest, callback: google.cloud.asset.v1beta1.AssetService.BatchGetAssetsHistoryCallback): void; /** - * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TemporalAsset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls BatchGetAssetsHistory. + * @param request BatchGetAssetsHistoryRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.TemporalAsset; + public batchGetAssetsHistory(request: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest): Promise; + } + + namespace AssetService { /** - * Verifies a TemporalAsset message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.asset.v1beta1.AssetService#exportAssets}. + * @param error Error, if any + * @param [response] Operation */ - public static verify(message: { [k: string]: any }): (string|null); + type ExportAssetsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TemporalAsset + * Callback as used by {@link google.cloud.asset.v1beta1.AssetService#batchGetAssetsHistory}. + * @param error Error, if any + * @param [response] BatchGetAssetsHistoryResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.TemporalAsset; + type BatchGetAssetsHistoryCallback = (error: (Error|null), response?: google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse) => void; + } - /** - * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. - * @param message TemporalAsset - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.asset.v1beta1.TemporalAsset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of an ExportAssetsRequest. */ + interface IExportAssetsRequest { - /** - * Converts this TemporalAsset to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ExportAssetsRequest parent */ + parent?: (string|null); - /** Properties of a TimeWindow. */ - interface ITimeWindow { + /** ExportAssetsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** TimeWindow startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** ExportAssetsRequest assetTypes */ + assetTypes?: (string[]|null); - /** TimeWindow endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** ExportAssetsRequest contentType */ + contentType?: (google.cloud.asset.v1beta1.ContentType|keyof typeof google.cloud.asset.v1beta1.ContentType|null); + + /** ExportAssetsRequest outputConfig */ + outputConfig?: (google.cloud.asset.v1beta1.IOutputConfig|null); } - /** Represents a TimeWindow. */ - class TimeWindow implements ITimeWindow { + /** Represents an ExportAssetsRequest. */ + class ExportAssetsRequest implements IExportAssetsRequest { /** - * Constructs a new TimeWindow. + * Constructs a new ExportAssetsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1beta1.ITimeWindow); + constructor(properties?: google.cloud.asset.v1beta1.IExportAssetsRequest); - /** TimeWindow startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** ExportAssetsRequest parent. */ + public parent: string; - /** TimeWindow endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** ExportAssetsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** ExportAssetsRequest assetTypes. */ + public assetTypes: string[]; + + /** ExportAssetsRequest contentType. */ + public contentType: (google.cloud.asset.v1beta1.ContentType|keyof typeof google.cloud.asset.v1beta1.ContentType); + + /** ExportAssetsRequest outputConfig. */ + public outputConfig?: (google.cloud.asset.v1beta1.IOutputConfig|null); /** - * Creates a new TimeWindow instance using the specified properties. + * Creates a new ExportAssetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TimeWindow instance + * @returns ExportAssetsRequest instance */ - public static create(properties?: google.cloud.asset.v1beta1.ITimeWindow): google.cloud.asset.v1beta1.TimeWindow; + public static create(properties?: google.cloud.asset.v1beta1.IExportAssetsRequest): google.cloud.asset.v1beta1.ExportAssetsRequest; /** - * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1beta1.TimeWindow.verify|verify} messages. - * @param message TimeWindow message or plain object to encode + * Encodes the specified ExportAssetsRequest message. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsRequest.verify|verify} messages. + * @param message ExportAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1beta1.IExportAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.TimeWindow.verify|verify} messages. - * @param message TimeWindow message or plain object to encode + * Encodes the specified ExportAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsRequest.verify|verify} messages. + * @param message ExportAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1beta1.IExportAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeWindow message from the specified reader or buffer. + * Decodes an ExportAssetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeWindow + * @returns ExportAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.TimeWindow; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.ExportAssetsRequest; /** - * Decodes a TimeWindow message from the specified reader or buffer, length delimited. + * Decodes an ExportAssetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeWindow + * @returns ExportAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.TimeWindow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.ExportAssetsRequest; /** - * Verifies a TimeWindow message. + * Verifies an ExportAssetsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAssetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeWindow + * @returns ExportAssetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.TimeWindow; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.ExportAssetsRequest; /** - * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. - * @param message TimeWindow + * Creates a plain object from an ExportAssetsRequest message. Also converts values to other types if specified. + * @param message ExportAssetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1beta1.TimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1beta1.ExportAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeWindow to JSON. + * Converts this ExportAssetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Asset. */ - interface IAsset { - - /** Asset name */ - name?: (string|null); - - /** Asset assetType */ - assetType?: (string|null); + /** Properties of an ExportAssetsResponse. */ + interface IExportAssetsResponse { - /** Asset resource */ - resource?: (google.cloud.asset.v1beta1.IResource|null); + /** ExportAssetsResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** Asset iamPolicy */ - iamPolicy?: (google.iam.v1.IPolicy|null); + /** ExportAssetsResponse outputConfig */ + outputConfig?: (google.cloud.asset.v1beta1.IOutputConfig|null); } - /** Represents an Asset. */ - class Asset implements IAsset { + /** Represents an ExportAssetsResponse. */ + class ExportAssetsResponse implements IExportAssetsResponse { /** - * Constructs a new Asset. + * Constructs a new ExportAssetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1beta1.IAsset); - - /** Asset name. */ - public name: string; - - /** Asset assetType. */ - public assetType: string; + constructor(properties?: google.cloud.asset.v1beta1.IExportAssetsResponse); - /** Asset resource. */ - public resource?: (google.cloud.asset.v1beta1.IResource|null); + /** ExportAssetsResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** Asset iamPolicy. */ - public iamPolicy?: (google.iam.v1.IPolicy|null); + /** ExportAssetsResponse outputConfig. */ + public outputConfig?: (google.cloud.asset.v1beta1.IOutputConfig|null); /** - * Creates a new Asset instance using the specified properties. + * Creates a new ExportAssetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Asset instance + * @returns ExportAssetsResponse instance */ - public static create(properties?: google.cloud.asset.v1beta1.IAsset): google.cloud.asset.v1beta1.Asset; + public static create(properties?: google.cloud.asset.v1beta1.IExportAssetsResponse): google.cloud.asset.v1beta1.ExportAssetsResponse; /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1beta1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode + * Encodes the specified ExportAssetsResponse message. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsResponse.verify|verify} messages. + * @param message ExportAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1beta1.IExportAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode + * Encodes the specified ExportAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsResponse.verify|verify} messages. + * @param message ExportAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1beta1.IExportAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Asset message from the specified reader or buffer. + * Decodes an ExportAssetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Asset + * @returns ExportAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.Asset; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.ExportAssetsResponse; /** - * Decodes an Asset message from the specified reader or buffer, length delimited. + * Decodes an ExportAssetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Asset + * @returns ExportAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.Asset; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.ExportAssetsResponse; /** - * Verifies an Asset message. + * Verifies an ExportAssetsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAssetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Asset + * @returns ExportAssetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.Asset; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.ExportAssetsResponse; /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. - * @param message Asset + * Creates a plain object from an ExportAssetsResponse message. Also converts values to other types if specified. + * @param message ExportAssetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1beta1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1beta1.ExportAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Asset to JSON. + * Converts this ExportAssetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Resource. */ - interface IResource { - - /** Resource version */ - version?: (string|null); - - /** Resource discoveryDocumentUri */ - discoveryDocumentUri?: (string|null); + /** Properties of a BatchGetAssetsHistoryRequest. */ + interface IBatchGetAssetsHistoryRequest { - /** Resource discoveryName */ - discoveryName?: (string|null); + /** BatchGetAssetsHistoryRequest parent */ + parent?: (string|null); - /** Resource resourceUrl */ - resourceUrl?: (string|null); + /** BatchGetAssetsHistoryRequest assetNames */ + assetNames?: (string[]|null); - /** Resource parent */ - parent?: (string|null); + /** BatchGetAssetsHistoryRequest contentType */ + contentType?: (google.cloud.asset.v1beta1.ContentType|keyof typeof google.cloud.asset.v1beta1.ContentType|null); - /** Resource data */ - data?: (google.protobuf.IStruct|null); + /** BatchGetAssetsHistoryRequest readTimeWindow */ + readTimeWindow?: (google.cloud.asset.v1beta1.ITimeWindow|null); } - /** Represents a Resource. */ - class Resource implements IResource { + /** Represents a BatchGetAssetsHistoryRequest. */ + class BatchGetAssetsHistoryRequest implements IBatchGetAssetsHistoryRequest { /** - * Constructs a new Resource. + * Constructs a new BatchGetAssetsHistoryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1beta1.IResource); - - /** Resource version. */ - public version: string; - - /** Resource discoveryDocumentUri. */ - public discoveryDocumentUri: string; + constructor(properties?: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest); - /** Resource discoveryName. */ - public discoveryName: string; + /** BatchGetAssetsHistoryRequest parent. */ + public parent: string; - /** Resource resourceUrl. */ - public resourceUrl: string; + /** BatchGetAssetsHistoryRequest assetNames. */ + public assetNames: string[]; - /** Resource parent. */ - public parent: string; + /** BatchGetAssetsHistoryRequest contentType. */ + public contentType: (google.cloud.asset.v1beta1.ContentType|keyof typeof google.cloud.asset.v1beta1.ContentType); - /** Resource data. */ - public data?: (google.protobuf.IStruct|null); + /** BatchGetAssetsHistoryRequest readTimeWindow. */ + public readTimeWindow?: (google.cloud.asset.v1beta1.ITimeWindow|null); /** - * Creates a new Resource instance using the specified properties. + * Creates a new BatchGetAssetsHistoryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Resource instance + * @returns BatchGetAssetsHistoryRequest instance */ - public static create(properties?: google.cloud.asset.v1beta1.IResource): google.cloud.asset.v1beta1.Resource; + public static create(properties?: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest): google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest; /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1beta1.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode + * Encodes the specified BatchGetAssetsHistoryRequest message. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.verify|verify} messages. + * @param message BatchGetAssetsHistoryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1beta1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode + * Encodes the specified BatchGetAssetsHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.verify|verify} messages. + * @param message BatchGetAssetsHistoryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1beta1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Resource message from the specified reader or buffer. + * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Resource + * @returns BatchGetAssetsHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.Resource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest; /** - * Decodes a Resource message from the specified reader or buffer, length delimited. + * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Resource + * @returns BatchGetAssetsHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.Resource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest; /** - * Verifies a Resource message. + * Verifies a BatchGetAssetsHistoryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * Creates a BatchGetAssetsHistoryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Resource + * @returns BatchGetAssetsHistoryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.Resource; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest; /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @param message Resource + * Creates a plain object from a BatchGetAssetsHistoryRequest message. Also converts values to other types if specified. + * @param message BatchGetAssetsHistoryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1beta1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Resource to JSON. + * Converts this BatchGetAssetsHistoryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents an AssetService */ - class AssetService extends $protobuf.rpc.Service { - - /** - * Constructs a new AssetService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new AssetService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AssetService; - - /** - * Calls ExportAssets. - * @param request ExportAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public exportAssets(request: google.cloud.asset.v1beta1.IExportAssetsRequest, callback: google.cloud.asset.v1beta1.AssetService.ExportAssetsCallback): void; - - /** - * Calls ExportAssets. - * @param request ExportAssetsRequest message or plain object - * @returns Promise - */ - public exportAssets(request: google.cloud.asset.v1beta1.IExportAssetsRequest): Promise; - - /** - * Calls BatchGetAssetsHistory. - * @param request BatchGetAssetsHistoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BatchGetAssetsHistoryResponse - */ - public batchGetAssetsHistory(request: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest, callback: google.cloud.asset.v1beta1.AssetService.BatchGetAssetsHistoryCallback): void; - - /** - * Calls BatchGetAssetsHistory. - * @param request BatchGetAssetsHistoryRequest message or plain object - * @returns Promise - */ - public batchGetAssetsHistory(request: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest): Promise; - } - - namespace AssetService { - - /** - * Callback as used by {@link google.cloud.asset.v1beta1.AssetService#exportAssets}. - * @param error Error, if any - * @param [response] Operation - */ - type ExportAssetsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.asset.v1beta1.AssetService#batchGetAssetsHistory}. - * @param error Error, if any - * @param [response] BatchGetAssetsHistoryResponse - */ - type BatchGetAssetsHistoryCallback = (error: (Error|null), response?: google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse) => void; - } - - /** Properties of an ExportAssetsRequest. */ - interface IExportAssetsRequest { - - /** ExportAssetsRequest parent */ - parent?: (string|null); - - /** ExportAssetsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); - - /** ExportAssetsRequest assetTypes */ - assetTypes?: (string[]|null); - - /** ExportAssetsRequest contentType */ - contentType?: (google.cloud.asset.v1beta1.ContentType|keyof typeof google.cloud.asset.v1beta1.ContentType|null); + /** Properties of a BatchGetAssetsHistoryResponse. */ + interface IBatchGetAssetsHistoryResponse { - /** ExportAssetsRequest outputConfig */ - outputConfig?: (google.cloud.asset.v1beta1.IOutputConfig|null); + /** BatchGetAssetsHistoryResponse assets */ + assets?: (google.cloud.asset.v1beta1.ITemporalAsset[]|null); } - /** Represents an ExportAssetsRequest. */ - class ExportAssetsRequest implements IExportAssetsRequest { + /** Represents a BatchGetAssetsHistoryResponse. */ + class BatchGetAssetsHistoryResponse implements IBatchGetAssetsHistoryResponse { /** - * Constructs a new ExportAssetsRequest. + * Constructs a new BatchGetAssetsHistoryResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1beta1.IExportAssetsRequest); - - /** ExportAssetsRequest parent. */ - public parent: string; - - /** ExportAssetsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** ExportAssetsRequest assetTypes. */ - public assetTypes: string[]; - - /** ExportAssetsRequest contentType. */ - public contentType: (google.cloud.asset.v1beta1.ContentType|keyof typeof google.cloud.asset.v1beta1.ContentType); + constructor(properties?: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse); - /** ExportAssetsRequest outputConfig. */ - public outputConfig?: (google.cloud.asset.v1beta1.IOutputConfig|null); + /** BatchGetAssetsHistoryResponse assets. */ + public assets: google.cloud.asset.v1beta1.ITemporalAsset[]; /** - * Creates a new ExportAssetsRequest instance using the specified properties. + * Creates a new BatchGetAssetsHistoryResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ExportAssetsRequest instance + * @returns BatchGetAssetsHistoryResponse instance */ - public static create(properties?: google.cloud.asset.v1beta1.IExportAssetsRequest): google.cloud.asset.v1beta1.ExportAssetsRequest; + public static create(properties?: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse): google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse; /** - * Encodes the specified ExportAssetsRequest message. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsRequest.verify|verify} messages. - * @param message ExportAssetsRequest message or plain object to encode + * Encodes the specified BatchGetAssetsHistoryResponse message. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.verify|verify} messages. + * @param message BatchGetAssetsHistoryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1beta1.IExportAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsRequest.verify|verify} messages. - * @param message ExportAssetsRequest message or plain object to encode + * Encodes the specified BatchGetAssetsHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.verify|verify} messages. + * @param message BatchGetAssetsHistoryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1beta1.IExportAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportAssetsRequest message from the specified reader or buffer. + * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportAssetsRequest + * @returns BatchGetAssetsHistoryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.ExportAssetsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse; /** - * Decodes an ExportAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportAssetsRequest + * @returns BatchGetAssetsHistoryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.ExportAssetsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse; /** - * Verifies an ExportAssetsRequest message. + * Verifies a BatchGetAssetsHistoryResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExportAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchGetAssetsHistoryResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportAssetsRequest + * @returns BatchGetAssetsHistoryResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.ExportAssetsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse; /** - * Creates a plain object from an ExportAssetsRequest message. Also converts values to other types if specified. - * @param message ExportAssetsRequest + * Creates a plain object from a BatchGetAssetsHistoryResponse message. Also converts values to other types if specified. + * @param message BatchGetAssetsHistoryResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1beta1.ExportAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportAssetsRequest to JSON. + * Converts this BatchGetAssetsHistoryResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ExportAssetsResponse. */ - interface IExportAssetsResponse { - - /** ExportAssetsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** Properties of an OutputConfig. */ + interface IOutputConfig { - /** ExportAssetsResponse outputConfig */ - outputConfig?: (google.cloud.asset.v1beta1.IOutputConfig|null); + /** OutputConfig gcsDestination */ + gcsDestination?: (google.cloud.asset.v1beta1.IGcsDestination|null); } - /** Represents an ExportAssetsResponse. */ - class ExportAssetsResponse implements IExportAssetsResponse { + /** Represents an OutputConfig. */ + class OutputConfig implements IOutputConfig { /** - * Constructs a new ExportAssetsResponse. + * Constructs a new OutputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1beta1.IExportAssetsResponse); + constructor(properties?: google.cloud.asset.v1beta1.IOutputConfig); - /** ExportAssetsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + /** OutputConfig gcsDestination. */ + public gcsDestination?: (google.cloud.asset.v1beta1.IGcsDestination|null); - /** ExportAssetsResponse outputConfig. */ - public outputConfig?: (google.cloud.asset.v1beta1.IOutputConfig|null); + /** OutputConfig destination. */ + public destination?: "gcsDestination"; /** - * Creates a new ExportAssetsResponse instance using the specified properties. + * Creates a new OutputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ExportAssetsResponse instance + * @returns OutputConfig instance */ - public static create(properties?: google.cloud.asset.v1beta1.IExportAssetsResponse): google.cloud.asset.v1beta1.ExportAssetsResponse; + public static create(properties?: google.cloud.asset.v1beta1.IOutputConfig): google.cloud.asset.v1beta1.OutputConfig; /** - * Encodes the specified ExportAssetsResponse message. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsResponse.verify|verify} messages. - * @param message ExportAssetsResponse message or plain object to encode + * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.asset.v1beta1.OutputConfig.verify|verify} messages. + * @param message OutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1beta1.IExportAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1beta1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsResponse.verify|verify} messages. - * @param message ExportAssetsResponse message or plain object to encode + * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.OutputConfig.verify|verify} messages. + * @param message OutputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1beta1.IExportAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1beta1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportAssetsResponse message from the specified reader or buffer. + * Decodes an OutputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportAssetsResponse + * @returns OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.ExportAssetsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.OutputConfig; /** - * Decodes an ExportAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes an OutputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportAssetsResponse + * @returns OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.ExportAssetsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.OutputConfig; /** - * Verifies an ExportAssetsResponse message. + * Verifies an OutputConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExportAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportAssetsResponse + * @returns OutputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.ExportAssetsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.OutputConfig; /** - * Creates a plain object from an ExportAssetsResponse message. Also converts values to other types if specified. - * @param message ExportAssetsResponse + * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. + * @param message OutputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1beta1.ExportAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1beta1.OutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportAssetsResponse to JSON. + * Converts this OutputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchGetAssetsHistoryRequest. */ - interface IBatchGetAssetsHistoryRequest { - - /** BatchGetAssetsHistoryRequest parent */ - parent?: (string|null); - - /** BatchGetAssetsHistoryRequest assetNames */ - assetNames?: (string[]|null); + /** Properties of a GcsDestination. */ + interface IGcsDestination { - /** BatchGetAssetsHistoryRequest contentType */ - contentType?: (google.cloud.asset.v1beta1.ContentType|keyof typeof google.cloud.asset.v1beta1.ContentType|null); + /** GcsDestination uri */ + uri?: (string|null); - /** BatchGetAssetsHistoryRequest readTimeWindow */ - readTimeWindow?: (google.cloud.asset.v1beta1.ITimeWindow|null); + /** GcsDestination uriPrefix */ + uriPrefix?: (string|null); } - /** Represents a BatchGetAssetsHistoryRequest. */ - class BatchGetAssetsHistoryRequest implements IBatchGetAssetsHistoryRequest { + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { /** - * Constructs a new BatchGetAssetsHistoryRequest. + * Constructs a new GcsDestination. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest); - - /** BatchGetAssetsHistoryRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.asset.v1beta1.IGcsDestination); - /** BatchGetAssetsHistoryRequest assetNames. */ - public assetNames: string[]; + /** GcsDestination uri. */ + public uri: string; - /** BatchGetAssetsHistoryRequest contentType. */ - public contentType: (google.cloud.asset.v1beta1.ContentType|keyof typeof google.cloud.asset.v1beta1.ContentType); + /** GcsDestination uriPrefix. */ + public uriPrefix: string; - /** BatchGetAssetsHistoryRequest readTimeWindow. */ - public readTimeWindow?: (google.cloud.asset.v1beta1.ITimeWindow|null); + /** GcsDestination objectUri. */ + public objectUri?: ("uri"|"uriPrefix"); /** - * Creates a new BatchGetAssetsHistoryRequest instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @param [properties] Properties to set - * @returns BatchGetAssetsHistoryRequest instance + * @returns GcsDestination instance */ - public static create(properties?: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest): google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest; + public static create(properties?: google.cloud.asset.v1beta1.IGcsDestination): google.cloud.asset.v1beta1.GcsDestination; /** - * Encodes the specified BatchGetAssetsHistoryRequest message. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.verify|verify} messages. - * @param message BatchGetAssetsHistoryRequest message or plain object to encode + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.asset.v1beta1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchGetAssetsHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.verify|verify} messages. - * @param message BatchGetAssetsHistoryRequest message or plain object to encode + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchGetAssetsHistoryRequest + * @returns GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.GcsDestination; /** - * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchGetAssetsHistoryRequest + * @returns GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.GcsDestination; /** - * Verifies a BatchGetAssetsHistoryRequest message. + * Verifies a GcsDestination message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BatchGetAssetsHistoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchGetAssetsHistoryRequest + * @returns GcsDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.GcsDestination; /** - * Creates a plain object from a BatchGetAssetsHistoryRequest message. Also converts values to other types if specified. - * @param message BatchGetAssetsHistoryRequest + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @param message GcsDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1beta1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchGetAssetsHistoryRequest to JSON. + * Converts this GcsDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchGetAssetsHistoryResponse. */ - interface IBatchGetAssetsHistoryResponse { + /** ContentType enum. */ + enum ContentType { + CONTENT_TYPE_UNSPECIFIED = 0, + RESOURCE = 1, + IAM_POLICY = 2 + } - /** BatchGetAssetsHistoryResponse assets */ - assets?: (google.cloud.asset.v1beta1.ITemporalAsset[]|null); + /** Properties of a TemporalAsset. */ + interface ITemporalAsset { + + /** TemporalAsset window */ + window?: (google.cloud.asset.v1beta1.ITimeWindow|null); + + /** TemporalAsset deleted */ + deleted?: (boolean|null); + + /** TemporalAsset asset */ + asset?: (google.cloud.asset.v1beta1.IAsset|null); } - /** Represents a BatchGetAssetsHistoryResponse. */ - class BatchGetAssetsHistoryResponse implements IBatchGetAssetsHistoryResponse { + /** Represents a TemporalAsset. */ + class TemporalAsset implements ITemporalAsset { /** - * Constructs a new BatchGetAssetsHistoryResponse. + * Constructs a new TemporalAsset. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse); + constructor(properties?: google.cloud.asset.v1beta1.ITemporalAsset); - /** BatchGetAssetsHistoryResponse assets. */ - public assets: google.cloud.asset.v1beta1.ITemporalAsset[]; + /** TemporalAsset window. */ + public window?: (google.cloud.asset.v1beta1.ITimeWindow|null); + + /** TemporalAsset deleted. */ + public deleted: boolean; + + /** TemporalAsset asset. */ + public asset?: (google.cloud.asset.v1beta1.IAsset|null); /** - * Creates a new BatchGetAssetsHistoryResponse instance using the specified properties. + * Creates a new TemporalAsset instance using the specified properties. * @param [properties] Properties to set - * @returns BatchGetAssetsHistoryResponse instance + * @returns TemporalAsset instance */ - public static create(properties?: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse): google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse; + public static create(properties?: google.cloud.asset.v1beta1.ITemporalAsset): google.cloud.asset.v1beta1.TemporalAsset; /** - * Encodes the specified BatchGetAssetsHistoryResponse message. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.verify|verify} messages. - * @param message BatchGetAssetsHistoryResponse message or plain object to encode + * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1beta1.TemporalAsset.verify|verify} messages. + * @param message TemporalAsset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1beta1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchGetAssetsHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.verify|verify} messages. - * @param message BatchGetAssetsHistoryResponse message or plain object to encode + * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.TemporalAsset.verify|verify} messages. + * @param message TemporalAsset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1beta1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer. + * Decodes a TemporalAsset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchGetAssetsHistoryResponse + * @returns TemporalAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.TemporalAsset; /** - * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer, length delimited. + * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchGetAssetsHistoryResponse + * @returns TemporalAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.TemporalAsset; /** - * Verifies a BatchGetAssetsHistoryResponse message. + * Verifies a TemporalAsset message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BatchGetAssetsHistoryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchGetAssetsHistoryResponse + * @returns TemporalAsset */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.TemporalAsset; /** - * Creates a plain object from a BatchGetAssetsHistoryResponse message. Also converts values to other types if specified. - * @param message BatchGetAssetsHistoryResponse + * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. + * @param message TemporalAsset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1beta1.TemporalAsset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchGetAssetsHistoryResponse to JSON. + * Converts this TemporalAsset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an OutputConfig. */ - interface IOutputConfig { + /** Properties of a TimeWindow. */ + interface ITimeWindow { - /** OutputConfig gcsDestination */ - gcsDestination?: (google.cloud.asset.v1beta1.IGcsDestination|null); + /** TimeWindow startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TimeWindow endTime */ + endTime?: (google.protobuf.ITimestamp|null); } - /** Represents an OutputConfig. */ - class OutputConfig implements IOutputConfig { + /** Represents a TimeWindow. */ + class TimeWindow implements ITimeWindow { /** - * Constructs a new OutputConfig. + * Constructs a new TimeWindow. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1beta1.IOutputConfig); + constructor(properties?: google.cloud.asset.v1beta1.ITimeWindow); - /** OutputConfig gcsDestination. */ - public gcsDestination?: (google.cloud.asset.v1beta1.IGcsDestination|null); + /** TimeWindow startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** OutputConfig destination. */ - public destination?: "gcsDestination"; + /** TimeWindow endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new OutputConfig instance using the specified properties. + * Creates a new TimeWindow instance using the specified properties. * @param [properties] Properties to set - * @returns OutputConfig instance + * @returns TimeWindow instance */ - public static create(properties?: google.cloud.asset.v1beta1.IOutputConfig): google.cloud.asset.v1beta1.OutputConfig; + public static create(properties?: google.cloud.asset.v1beta1.ITimeWindow): google.cloud.asset.v1beta1.TimeWindow; /** - * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.asset.v1beta1.OutputConfig.verify|verify} messages. - * @param message OutputConfig message or plain object to encode + * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1beta1.TimeWindow.verify|verify} messages. + * @param message TimeWindow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1beta1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.OutputConfig.verify|verify} messages. - * @param message OutputConfig message or plain object to encode + * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.TimeWindow.verify|verify} messages. + * @param message TimeWindow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1beta1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OutputConfig message from the specified reader or buffer. + * Decodes a TimeWindow message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OutputConfig + * @returns TimeWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.OutputConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.TimeWindow; /** - * Decodes an OutputConfig message from the specified reader or buffer, length delimited. + * Decodes a TimeWindow message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OutputConfig + * @returns TimeWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.OutputConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.TimeWindow; /** - * Verifies an OutputConfig message. + * Verifies a TimeWindow message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OutputConfig + * @returns TimeWindow */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.OutputConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.TimeWindow; /** - * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. - * @param message OutputConfig + * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. + * @param message TimeWindow * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1beta1.OutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1beta1.TimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OutputConfig to JSON. + * Converts this TimeWindow to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GcsDestination. */ - interface IGcsDestination { + /** Properties of an Asset. */ + interface IAsset { - /** GcsDestination uri */ - uri?: (string|null); + /** Asset name */ + name?: (string|null); - /** GcsDestination uriPrefix */ - uriPrefix?: (string|null); + /** Asset assetType */ + assetType?: (string|null); + + /** Asset resource */ + resource?: (google.cloud.asset.v1beta1.IResource|null); + + /** Asset iamPolicy */ + iamPolicy?: (google.iam.v1.IPolicy|null); } - /** Represents a GcsDestination. */ - class GcsDestination implements IGcsDestination { + /** Represents an Asset. */ + class Asset implements IAsset { /** - * Constructs a new GcsDestination. + * Constructs a new Asset. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1beta1.IGcsDestination); + constructor(properties?: google.cloud.asset.v1beta1.IAsset); - /** GcsDestination uri. */ - public uri: string; + /** Asset name. */ + public name: string; - /** GcsDestination uriPrefix. */ - public uriPrefix: string; + /** Asset assetType. */ + public assetType: string; - /** GcsDestination objectUri. */ - public objectUri?: ("uri"|"uriPrefix"); + /** Asset resource. */ + public resource?: (google.cloud.asset.v1beta1.IResource|null); + + /** Asset iamPolicy. */ + public iamPolicy?: (google.iam.v1.IPolicy|null); /** - * Creates a new GcsDestination instance using the specified properties. + * Creates a new Asset instance using the specified properties. * @param [properties] Properties to set - * @returns GcsDestination instance + * @returns Asset instance */ - public static create(properties?: google.cloud.asset.v1beta1.IGcsDestination): google.cloud.asset.v1beta1.GcsDestination; + public static create(properties?: google.cloud.asset.v1beta1.IAsset): google.cloud.asset.v1beta1.Asset; /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.asset.v1beta1.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1beta1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsDestination message from the specified reader or buffer. + * Decodes an Asset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsDestination + * @returns Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.GcsDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.Asset; /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsDestination + * @returns Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.GcsDestination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.Asset; /** - * Verifies a GcsDestination message. + * Verifies an Asset message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * Creates an Asset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsDestination + * @returns Asset */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.GcsDestination; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.Asset; /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. - * @param message GcsDestination + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @param message Asset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1beta1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1beta1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsDestination to JSON. + * Converts this Asset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** ContentType enum. */ - enum ContentType { - CONTENT_TYPE_UNSPECIFIED = 0, - RESOURCE = 1, - IAM_POLICY = 2 - } - } - - /** Namespace v1p1beta1. */ - namespace v1p1beta1 { - - /** Properties of a StandardResourceMetadata. */ - interface IStandardResourceMetadata { + /** Properties of a Resource. */ + interface IResource { - /** StandardResourceMetadata name */ - name?: (string|null); + /** Resource version */ + version?: (string|null); - /** StandardResourceMetadata assetType */ - assetType?: (string|null); + /** Resource discoveryDocumentUri */ + discoveryDocumentUri?: (string|null); - /** StandardResourceMetadata project */ - project?: (string|null); + /** Resource discoveryName */ + discoveryName?: (string|null); - /** StandardResourceMetadata displayName */ - displayName?: (string|null); + /** Resource resourceUrl */ + resourceUrl?: (string|null); - /** StandardResourceMetadata description */ - description?: (string|null); + /** Resource parent */ + parent?: (string|null); - /** StandardResourceMetadata additionalAttributes */ - additionalAttributes?: (string[]|null); + /** Resource data */ + data?: (google.protobuf.IStruct|null); } - /** Represents a StandardResourceMetadata. */ - class StandardResourceMetadata implements IStandardResourceMetadata { + /** Represents a Resource. */ + class Resource implements IResource { /** - * Constructs a new StandardResourceMetadata. + * Constructs a new Resource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1p1beta1.IStandardResourceMetadata); + constructor(properties?: google.cloud.asset.v1beta1.IResource); - /** StandardResourceMetadata name. */ - public name: string; + /** Resource version. */ + public version: string; - /** StandardResourceMetadata assetType. */ - public assetType: string; + /** Resource discoveryDocumentUri. */ + public discoveryDocumentUri: string; - /** StandardResourceMetadata project. */ - public project: string; + /** Resource discoveryName. */ + public discoveryName: string; - /** StandardResourceMetadata displayName. */ - public displayName: string; + /** Resource resourceUrl. */ + public resourceUrl: string; - /** StandardResourceMetadata description. */ - public description: string; + /** Resource parent. */ + public parent: string; - /** StandardResourceMetadata additionalAttributes. */ - public additionalAttributes: string[]; + /** Resource data. */ + public data?: (google.protobuf.IStruct|null); /** - * Creates a new StandardResourceMetadata instance using the specified properties. + * Creates a new Resource instance using the specified properties. * @param [properties] Properties to set - * @returns StandardResourceMetadata instance + * @returns Resource instance */ - public static create(properties?: google.cloud.asset.v1p1beta1.IStandardResourceMetadata): google.cloud.asset.v1p1beta1.StandardResourceMetadata; + public static create(properties?: google.cloud.asset.v1beta1.IResource): google.cloud.asset.v1beta1.Resource; /** - * Encodes the specified StandardResourceMetadata message. Does not implicitly {@link google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify|verify} messages. - * @param message StandardResourceMetadata message or plain object to encode + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1beta1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1p1beta1.IStandardResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1beta1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StandardResourceMetadata message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify|verify} messages. - * @param message StandardResourceMetadata message or plain object to encode + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1p1beta1.IStandardResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1beta1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StandardResourceMetadata message from the specified reader or buffer. + * Decodes a Resource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StandardResourceMetadata + * @returns Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p1beta1.StandardResourceMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1beta1.Resource; /** - * Decodes a StandardResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a Resource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StandardResourceMetadata + * @returns Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p1beta1.StandardResourceMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1beta1.Resource; /** - * Verifies a StandardResourceMetadata message. + * Verifies a Resource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StandardResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a Resource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StandardResourceMetadata + * @returns Resource */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p1beta1.StandardResourceMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1beta1.Resource; /** - * Creates a plain object from a StandardResourceMetadata message. Also converts values to other types if specified. - * @param message StandardResourceMetadata + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @param message Resource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1p1beta1.StandardResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1beta1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StandardResourceMetadata to JSON. + * Converts this Resource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of an IamPolicySearchResult. */ - interface IIamPolicySearchResult { - - /** IamPolicySearchResult resource */ - resource?: (string|null); - - /** IamPolicySearchResult project */ - project?: (string|null); - - /** IamPolicySearchResult policy */ - policy?: (google.iam.v1.IPolicy|null); - } + /** Namespace v1p1beta1. */ + namespace v1p1beta1 { - /** Represents an IamPolicySearchResult. */ - class IamPolicySearchResult implements IIamPolicySearchResult { + /** Represents an AssetService */ + class AssetService extends $protobuf.rpc.Service { /** - * Constructs a new IamPolicySearchResult. - * @param [properties] Properties to set + * Constructs a new AssetService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.asset.v1p1beta1.IIamPolicySearchResult); - - /** IamPolicySearchResult resource. */ - public resource: string; - - /** IamPolicySearchResult project. */ - public project: string; - - /** IamPolicySearchResult policy. */ - public policy?: (google.iam.v1.IPolicy|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new IamPolicySearchResult instance using the specified properties. - * @param [properties] Properties to set - * @returns IamPolicySearchResult instance + * Creates new AssetService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create(properties?: google.cloud.asset.v1p1beta1.IIamPolicySearchResult): google.cloud.asset.v1p1beta1.IamPolicySearchResult; - - /** - * Encodes the specified IamPolicySearchResult message. Does not implicitly {@link google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify|verify} messages. - * @param message IamPolicySearchResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.asset.v1p1beta1.IIamPolicySearchResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IamPolicySearchResult message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify|verify} messages. - * @param message IamPolicySearchResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.asset.v1p1beta1.IIamPolicySearchResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IamPolicySearchResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IamPolicySearchResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p1beta1.IamPolicySearchResult; - - /** - * Decodes an IamPolicySearchResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IamPolicySearchResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p1beta1.IamPolicySearchResult; - - /** - * Verifies an IamPolicySearchResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an IamPolicySearchResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IamPolicySearchResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p1beta1.IamPolicySearchResult; - - /** - * Creates a plain object from an IamPolicySearchResult message. Also converts values to other types if specified. - * @param message IamPolicySearchResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.asset.v1p1beta1.IamPolicySearchResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IamPolicySearchResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Represents an AssetService */ - class AssetService extends $protobuf.rpc.Service { - - /** - * Constructs a new AssetService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new AssetService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AssetService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AssetService; /** * Calls SearchResources. @@ -4465,442 +4243,232 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - } - /** Namespace v1p2beta1. */ - namespace v1p2beta1 { + /** Properties of a StandardResourceMetadata. */ + interface IStandardResourceMetadata { - /** Properties of a TemporalAsset. */ - interface ITemporalAsset { + /** StandardResourceMetadata name */ + name?: (string|null); - /** TemporalAsset window */ - window?: (google.cloud.asset.v1p2beta1.ITimeWindow|null); + /** StandardResourceMetadata assetType */ + assetType?: (string|null); - /** TemporalAsset deleted */ - deleted?: (boolean|null); + /** StandardResourceMetadata project */ + project?: (string|null); - /** TemporalAsset asset */ - asset?: (google.cloud.asset.v1p2beta1.IAsset|null); + /** StandardResourceMetadata displayName */ + displayName?: (string|null); + + /** StandardResourceMetadata description */ + description?: (string|null); + + /** StandardResourceMetadata additionalAttributes */ + additionalAttributes?: (string[]|null); } - /** Represents a TemporalAsset. */ - class TemporalAsset implements ITemporalAsset { + /** Represents a StandardResourceMetadata. */ + class StandardResourceMetadata implements IStandardResourceMetadata { /** - * Constructs a new TemporalAsset. + * Constructs a new StandardResourceMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1p2beta1.ITemporalAsset); + constructor(properties?: google.cloud.asset.v1p1beta1.IStandardResourceMetadata); - /** TemporalAsset window. */ - public window?: (google.cloud.asset.v1p2beta1.ITimeWindow|null); + /** StandardResourceMetadata name. */ + public name: string; - /** TemporalAsset deleted. */ - public deleted: boolean; + /** StandardResourceMetadata assetType. */ + public assetType: string; - /** TemporalAsset asset. */ - public asset?: (google.cloud.asset.v1p2beta1.IAsset|null); + /** StandardResourceMetadata project. */ + public project: string; + + /** StandardResourceMetadata displayName. */ + public displayName: string; + + /** StandardResourceMetadata description. */ + public description: string; + + /** StandardResourceMetadata additionalAttributes. */ + public additionalAttributes: string[]; /** - * Creates a new TemporalAsset instance using the specified properties. + * Creates a new StandardResourceMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns TemporalAsset instance + * @returns StandardResourceMetadata instance */ - public static create(properties?: google.cloud.asset.v1p2beta1.ITemporalAsset): google.cloud.asset.v1p2beta1.TemporalAsset; + public static create(properties?: google.cloud.asset.v1p1beta1.IStandardResourceMetadata): google.cloud.asset.v1p1beta1.StandardResourceMetadata; /** - * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1p2beta1.TemporalAsset.verify|verify} messages. - * @param message TemporalAsset message or plain object to encode + * Encodes the specified StandardResourceMetadata message. Does not implicitly {@link google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify|verify} messages. + * @param message StandardResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1p2beta1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1p1beta1.IStandardResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.TemporalAsset.verify|verify} messages. - * @param message TemporalAsset message or plain object to encode + * Encodes the specified StandardResourceMetadata message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify|verify} messages. + * @param message StandardResourceMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1p2beta1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1p1beta1.IStandardResourceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TemporalAsset message from the specified reader or buffer. + * Decodes a StandardResourceMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TemporalAsset + * @returns StandardResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p2beta1.TemporalAsset; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p1beta1.StandardResourceMetadata; /** - * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. + * Decodes a StandardResourceMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TemporalAsset + * @returns StandardResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p2beta1.TemporalAsset; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p1beta1.StandardResourceMetadata; /** - * Verifies a TemporalAsset message. + * Verifies a StandardResourceMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. + * Creates a StandardResourceMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TemporalAsset + * @returns StandardResourceMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p2beta1.TemporalAsset; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p1beta1.StandardResourceMetadata; /** - * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. - * @param message TemporalAsset + * Creates a plain object from a StandardResourceMetadata message. Also converts values to other types if specified. + * @param message StandardResourceMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1p2beta1.TemporalAsset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1p1beta1.StandardResourceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TemporalAsset to JSON. + * Converts this StandardResourceMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TimeWindow. */ - interface ITimeWindow { + /** Properties of an IamPolicySearchResult. */ + interface IIamPolicySearchResult { - /** TimeWindow startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** IamPolicySearchResult resource */ + resource?: (string|null); - /** TimeWindow endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** IamPolicySearchResult project */ + project?: (string|null); + + /** IamPolicySearchResult policy */ + policy?: (google.iam.v1.IPolicy|null); } - /** Represents a TimeWindow. */ - class TimeWindow implements ITimeWindow { + /** Represents an IamPolicySearchResult. */ + class IamPolicySearchResult implements IIamPolicySearchResult { /** - * Constructs a new TimeWindow. + * Constructs a new IamPolicySearchResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.asset.v1p2beta1.ITimeWindow); + constructor(properties?: google.cloud.asset.v1p1beta1.IIamPolicySearchResult); - /** TimeWindow startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** IamPolicySearchResult resource. */ + public resource: string; - /** TimeWindow endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** IamPolicySearchResult project. */ + public project: string; + + /** IamPolicySearchResult policy. */ + public policy?: (google.iam.v1.IPolicy|null); /** - * Creates a new TimeWindow instance using the specified properties. + * Creates a new IamPolicySearchResult instance using the specified properties. * @param [properties] Properties to set - * @returns TimeWindow instance + * @returns IamPolicySearchResult instance */ - public static create(properties?: google.cloud.asset.v1p2beta1.ITimeWindow): google.cloud.asset.v1p2beta1.TimeWindow; + public static create(properties?: google.cloud.asset.v1p1beta1.IIamPolicySearchResult): google.cloud.asset.v1p1beta1.IamPolicySearchResult; /** - * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1p2beta1.TimeWindow.verify|verify} messages. - * @param message TimeWindow message or plain object to encode + * Encodes the specified IamPolicySearchResult message. Does not implicitly {@link google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify|verify} messages. + * @param message IamPolicySearchResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.asset.v1p2beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.asset.v1p1beta1.IIamPolicySearchResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.TimeWindow.verify|verify} messages. - * @param message TimeWindow message or plain object to encode + * Encodes the specified IamPolicySearchResult message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify|verify} messages. + * @param message IamPolicySearchResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.asset.v1p2beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.asset.v1p1beta1.IIamPolicySearchResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeWindow message from the specified reader or buffer. + * Decodes an IamPolicySearchResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeWindow + * @returns IamPolicySearchResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p2beta1.TimeWindow; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p1beta1.IamPolicySearchResult; /** - * Decodes a TimeWindow message from the specified reader or buffer, length delimited. + * Decodes an IamPolicySearchResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeWindow + * @returns IamPolicySearchResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p2beta1.TimeWindow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p1beta1.IamPolicySearchResult; /** - * Verifies a TimeWindow message. + * Verifies an IamPolicySearchResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. + * Creates an IamPolicySearchResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeWindow + * @returns IamPolicySearchResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p2beta1.TimeWindow; - - /** - * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. - * @param message TimeWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.asset.v1p2beta1.TimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimeWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Asset. */ - interface IAsset { - - /** Asset name */ - name?: (string|null); - - /** Asset assetType */ - assetType?: (string|null); - - /** Asset resource */ - resource?: (google.cloud.asset.v1p2beta1.IResource|null); - - /** Asset iamPolicy */ - iamPolicy?: (google.iam.v1.IPolicy|null); - - /** Asset ancestors */ - ancestors?: (string[]|null); - } - - /** Represents an Asset. */ - class Asset implements IAsset { - - /** - * Constructs a new Asset. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.asset.v1p2beta1.IAsset); - - /** Asset name. */ - public name: string; - - /** Asset assetType. */ - public assetType: string; - - /** Asset resource. */ - public resource?: (google.cloud.asset.v1p2beta1.IResource|null); - - /** Asset iamPolicy. */ - public iamPolicy?: (google.iam.v1.IPolicy|null); - - /** Asset ancestors. */ - public ancestors: string[]; - - /** - * Creates a new Asset instance using the specified properties. - * @param [properties] Properties to set - * @returns Asset instance - */ - public static create(properties?: google.cloud.asset.v1p2beta1.IAsset): google.cloud.asset.v1p2beta1.Asset; - - /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1p2beta1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.asset.v1p2beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.asset.v1p2beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Asset message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Asset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p2beta1.Asset; - - /** - * Decodes an Asset message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Asset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p2beta1.Asset; - - /** - * Verifies an Asset message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Asset - */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p2beta1.Asset; + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p1beta1.IamPolicySearchResult; /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. - * @param message Asset + * Creates a plain object from an IamPolicySearchResult message. Also converts values to other types if specified. + * @param message IamPolicySearchResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.asset.v1p2beta1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.asset.v1p1beta1.IamPolicySearchResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Asset to JSON. + * Converts this IamPolicySearchResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of a Resource. */ - interface IResource { - - /** Resource version */ - version?: (string|null); - - /** Resource discoveryDocumentUri */ - discoveryDocumentUri?: (string|null); - - /** Resource discoveryName */ - discoveryName?: (string|null); - - /** Resource resourceUrl */ - resourceUrl?: (string|null); - - /** Resource parent */ - parent?: (string|null); - - /** Resource data */ - data?: (google.protobuf.IStruct|null); - } - - /** Represents a Resource. */ - class Resource implements IResource { - - /** - * Constructs a new Resource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.asset.v1p2beta1.IResource); - - /** Resource version. */ - public version: string; - - /** Resource discoveryDocumentUri. */ - public discoveryDocumentUri: string; - - /** Resource discoveryName. */ - public discoveryName: string; - - /** Resource resourceUrl. */ - public resourceUrl: string; - - /** Resource parent. */ - public parent: string; - - /** Resource data. */ - public data?: (google.protobuf.IStruct|null); - - /** - * Creates a new Resource instance using the specified properties. - * @param [properties] Properties to set - * @returns Resource instance - */ - public static create(properties?: google.cloud.asset.v1p2beta1.IResource): google.cloud.asset.v1p2beta1.Resource; - - /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1p2beta1.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.asset.v1p2beta1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.asset.v1p2beta1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Resource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Resource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p2beta1.Resource; - - /** - * Decodes a Resource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Resource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p2beta1.Resource; - - /** - * Verifies a Resource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Resource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p2beta1.Resource; - - /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @param message Resource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.asset.v1p2beta1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Resource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Namespace v1p2beta1. */ + namespace v1p2beta1 { /** Represents an AssetService */ class AssetService extends $protobuf.rpc.Service { @@ -6078,238 +5646,444 @@ export namespace google { RESOURCE = 1, IAM_POLICY = 2 } - } - } - } - - /** Namespace api. */ - namespace api { - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** Properties of a TemporalAsset. */ + interface ITemporalAsset { - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** TemporalAsset window */ + window?: (google.cloud.asset.v1p2beta1.ITimeWindow|null); - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** TemporalAsset deleted */ + deleted?: (boolean|null); - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** TemporalAsset asset */ + asset?: (google.cloud.asset.v1p2beta1.IAsset|null); + } - /** ResourceDescriptor plural */ - plural?: (string|null); + /** Represents a TemporalAsset. */ + class TemporalAsset implements ITemporalAsset { - /** ResourceDescriptor singular */ - singular?: (string|null); - } + /** + * Constructs a new TemporalAsset. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.asset.v1p2beta1.ITemporalAsset); - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** TemporalAsset window. */ + public window?: (google.cloud.asset.v1p2beta1.ITimeWindow|null); - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); + /** TemporalAsset deleted. */ + public deleted: boolean; - /** ResourceDescriptor type. */ - public type: string; + /** TemporalAsset asset. */ + public asset?: (google.cloud.asset.v1p2beta1.IAsset|null); - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** + * Creates a new TemporalAsset instance using the specified properties. + * @param [properties] Properties to set + * @returns TemporalAsset instance + */ + public static create(properties?: google.cloud.asset.v1p2beta1.ITemporalAsset): google.cloud.asset.v1p2beta1.TemporalAsset; - /** ResourceDescriptor nameField. */ - public nameField: string; + /** + * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1p2beta1.TemporalAsset.verify|verify} messages. + * @param message TemporalAsset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.asset.v1p2beta1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** + * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.TemporalAsset.verify|verify} messages. + * @param message TemporalAsset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.asset.v1p2beta1.ITemporalAsset, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceDescriptor plural. */ - public plural: string; + /** + * Decodes a TemporalAsset message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TemporalAsset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p2beta1.TemporalAsset; - /** ResourceDescriptor singular. */ - public singular: string; + /** + * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TemporalAsset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p2beta1.TemporalAsset; - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + /** + * Verifies a TemporalAsset message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TemporalAsset + */ + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p2beta1.TemporalAsset; - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. + * @param message TemporalAsset + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.asset.v1p2beta1.TemporalAsset, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + /** + * Converts this TemporalAsset to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + /** Properties of a TimeWindow. */ + interface ITimeWindow { - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** TimeWindow startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + /** TimeWindow endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a TimeWindow. */ + class TimeWindow implements ITimeWindow { - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new TimeWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.asset.v1p2beta1.ITimeWindow); - namespace ResourceDescriptor { + /** TimeWindow startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - } + /** TimeWindow endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** + * Creates a new TimeWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeWindow instance + */ + public static create(properties?: google.cloud.asset.v1p2beta1.ITimeWindow): google.cloud.asset.v1p2beta1.TimeWindow; - /** ResourceReference type */ - type?: (string|null); + /** + * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1p2beta1.TimeWindow.verify|verify} messages. + * @param message TimeWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.asset.v1p2beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceReference childType */ - childType?: (string|null); - } + /** + * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.TimeWindow.verify|verify} messages. + * @param message TimeWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.asset.v1p2beta1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** + * Decodes a TimeWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p2beta1.TimeWindow; - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); + /** + * Decodes a TimeWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p2beta1.TimeWindow; - /** ResourceReference type. */ - public type: string; + /** + * Verifies a TimeWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ResourceReference childType. */ - public childType: string; + /** + * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeWindow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p2beta1.TimeWindow; - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + /** + * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. + * @param message TimeWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.asset.v1p2beta1.TimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this TimeWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an Asset. */ + interface IAsset { - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + /** Asset name */ + name?: (string|null); - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + /** Asset assetType */ + assetType?: (string|null); - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Asset resource */ + resource?: (google.cloud.asset.v1p2beta1.IResource|null); - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + /** Asset iamPolicy */ + iamPolicy?: (google.iam.v1.IPolicy|null); - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Asset ancestors */ + ancestors?: (string[]|null); + } + + /** Represents an Asset. */ + class Asset implements IAsset { + + /** + * Constructs a new Asset. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.asset.v1p2beta1.IAsset); + + /** Asset name. */ + public name: string; + + /** Asset assetType. */ + public assetType: string; + + /** Asset resource. */ + public resource?: (google.cloud.asset.v1p2beta1.IResource|null); + + /** Asset iamPolicy. */ + public iamPolicy?: (google.iam.v1.IPolicy|null); + + /** Asset ancestors. */ + public ancestors: string[]; + + /** + * Creates a new Asset instance using the specified properties. + * @param [properties] Properties to set + * @returns Asset instance + */ + public static create(properties?: google.cloud.asset.v1p2beta1.IAsset): google.cloud.asset.v1p2beta1.Asset; + + /** + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1p2beta1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.asset.v1p2beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.asset.v1p2beta1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Asset message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p2beta1.Asset; + + /** + * Decodes an Asset message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p2beta1.Asset; + + /** + * Verifies an Asset message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Asset + */ + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p2beta1.Asset; + + /** + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @param message Asset + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.asset.v1p2beta1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Asset to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Resource. */ + interface IResource { + + /** Resource version */ + version?: (string|null); + + /** Resource discoveryDocumentUri */ + discoveryDocumentUri?: (string|null); + + /** Resource discoveryName */ + discoveryName?: (string|null); + + /** Resource resourceUrl */ + resourceUrl?: (string|null); + + /** Resource parent */ + parent?: (string|null); + + /** Resource data */ + data?: (google.protobuf.IStruct|null); + } + + /** Represents a Resource. */ + class Resource implements IResource { + + /** + * Constructs a new Resource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.asset.v1p2beta1.IResource); + + /** Resource version. */ + public version: string; + + /** Resource discoveryDocumentUri. */ + public discoveryDocumentUri: string; + + /** Resource discoveryName. */ + public discoveryName: string; + + /** Resource resourceUrl. */ + public resourceUrl: string; + + /** Resource parent. */ + public parent: string; + + /** Resource data. */ + public data?: (google.protobuf.IStruct|null); + + /** + * Creates a new Resource instance using the specified properties. + * @param [properties] Properties to set + * @returns Resource instance + */ + public static create(properties?: google.cloud.asset.v1p2beta1.IResource): google.cloud.asset.v1p2beta1.Resource; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1p2beta1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.asset.v1p2beta1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.asset.v1p2beta1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Resource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.asset.v1p2beta1.Resource; + + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.asset.v1p2beta1.Resource; + + /** + * Verifies a Resource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Resource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.asset.v1p2beta1.Resource; - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @param message Resource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.asset.v1p2beta1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Resource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } + } + + /** Namespace api. */ + namespace api { /** Properties of a Http. */ interface IHttp { @@ -6659,6 +6433,232 @@ export namespace google { INPUT_ONLY = 4, IMMUTABLE = 5 } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Namespace protobuf. */ @@ -8518,11 +8518,11 @@ export namespace google { /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - /** FieldOptions .google.api.fieldBehavior */ ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); } /** Represents a FieldOptions. */ diff --git a/packages/google-cloud-asset/protos/protos.js b/packages/google-cloud-asset/protos/protos.js index f8039941e01..01e518fdca4 100644 --- a/packages/google-cloud-asset/protos/protos.js +++ b/packages/google-cloud-asset/protos/protos.js @@ -66,267 +66,295 @@ */ var v1 = {}; - v1.TemporalAsset = (function() { - - /** - * Properties of a TemporalAsset. - * @memberof google.cloud.asset.v1 - * @interface ITemporalAsset - * @property {google.cloud.asset.v1.ITimeWindow|null} [window] TemporalAsset window - * @property {boolean|null} [deleted] TemporalAsset deleted - * @property {google.cloud.asset.v1.IAsset|null} [asset] TemporalAsset asset - */ + v1.AssetService = (function() { /** - * Constructs a new TemporalAsset. + * Constructs a new AssetService service. * @memberof google.cloud.asset.v1 - * @classdesc Represents a TemporalAsset. - * @implements ITemporalAsset + * @classdesc Represents an AssetService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.asset.v1.ITemporalAsset=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function TemporalAsset(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function AssetService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (AssetService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AssetService; + /** - * TemporalAsset window. - * @member {google.cloud.asset.v1.ITimeWindow|null|undefined} window - * @memberof google.cloud.asset.v1.TemporalAsset - * @instance + * Creates new AssetService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.asset.v1.AssetService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {AssetService} RPC service. Useful where requests and/or responses are streamed. */ - TemporalAsset.prototype.window = null; + AssetService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * TemporalAsset deleted. - * @member {boolean} deleted - * @memberof google.cloud.asset.v1.TemporalAsset - * @instance + * Callback as used by {@link google.cloud.asset.v1.AssetService#exportAssets}. + * @memberof google.cloud.asset.v1.AssetService + * @typedef ExportAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - TemporalAsset.prototype.deleted = false; /** - * TemporalAsset asset. - * @member {google.cloud.asset.v1.IAsset|null|undefined} asset - * @memberof google.cloud.asset.v1.TemporalAsset + * Calls ExportAssets. + * @function exportAssets + * @memberof google.cloud.asset.v1.AssetService * @instance + * @param {google.cloud.asset.v1.IExportAssetsRequest} request ExportAssetsRequest message or plain object + * @param {google.cloud.asset.v1.AssetService.ExportAssetsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - TemporalAsset.prototype.asset = null; + Object.defineProperty(AssetService.prototype.exportAssets = function exportAssets(request, callback) { + return this.rpcCall(exportAssets, $root.google.cloud.asset.v1.ExportAssetsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportAssets" }); /** - * Creates a new TemporalAsset instance using the specified properties. - * @function create - * @memberof google.cloud.asset.v1.TemporalAsset - * @static - * @param {google.cloud.asset.v1.ITemporalAsset=} [properties] Properties to set - * @returns {google.cloud.asset.v1.TemporalAsset} TemporalAsset instance + * Calls ExportAssets. + * @function exportAssets + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.IExportAssetsRequest} request ExportAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TemporalAsset.create = function create(properties) { - return new TemporalAsset(properties); - }; /** - * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1.TemporalAsset.verify|verify} messages. - * @function encode - * @memberof google.cloud.asset.v1.TemporalAsset - * @static - * @param {google.cloud.asset.v1.ITemporalAsset} message TemporalAsset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.asset.v1.AssetService#batchGetAssetsHistory}. + * @memberof google.cloud.asset.v1.AssetService + * @typedef BatchGetAssetsHistoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} [response] BatchGetAssetsHistoryResponse */ - TemporalAsset.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.window != null && message.hasOwnProperty("window")) - $root.google.cloud.asset.v1.TimeWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.deleted != null && message.hasOwnProperty("deleted")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.deleted); - if (message.asset != null && message.hasOwnProperty("asset")) - $root.google.cloud.asset.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; /** - * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1.TemporalAsset.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.asset.v1.TemporalAsset - * @static - * @param {google.cloud.asset.v1.ITemporalAsset} message TemporalAsset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls BatchGetAssetsHistory. + * @function batchGetAssetsHistory + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest} request BatchGetAssetsHistoryRequest message or plain object + * @param {google.cloud.asset.v1.AssetService.BatchGetAssetsHistoryCallback} callback Node-style callback called with the error, if any, and BatchGetAssetsHistoryResponse + * @returns {undefined} + * @variation 1 */ - TemporalAsset.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(AssetService.prototype.batchGetAssetsHistory = function batchGetAssetsHistory(request, callback) { + return this.rpcCall(batchGetAssetsHistory, $root.google.cloud.asset.v1.BatchGetAssetsHistoryRequest, $root.google.cloud.asset.v1.BatchGetAssetsHistoryResponse, request, callback); + }, "name", { value: "BatchGetAssetsHistory" }); /** - * Decodes a TemporalAsset message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.asset.v1.TemporalAsset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.TemporalAsset} TemporalAsset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls BatchGetAssetsHistory. + * @function batchGetAssetsHistory + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest} request BatchGetAssetsHistoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TemporalAsset.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.TemporalAsset(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.window = $root.google.cloud.asset.v1.TimeWindow.decode(reader, reader.uint32()); - break; - case 2: - message.deleted = reader.bool(); - break; - case 3: - message.asset = $root.google.cloud.asset.v1.Asset.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.asset.v1.TemporalAsset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.TemporalAsset} TemporalAsset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.asset.v1.AssetService#createFeed}. + * @memberof google.cloud.asset.v1.AssetService + * @typedef CreateFeedCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1.Feed} [response] Feed */ - TemporalAsset.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a TemporalAsset message. - * @function verify - * @memberof google.cloud.asset.v1.TemporalAsset - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateFeed. + * @function createFeed + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.ICreateFeedRequest} request CreateFeedRequest message or plain object + * @param {google.cloud.asset.v1.AssetService.CreateFeedCallback} callback Node-style callback called with the error, if any, and Feed + * @returns {undefined} + * @variation 1 */ - TemporalAsset.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.window != null && message.hasOwnProperty("window")) { - var error = $root.google.cloud.asset.v1.TimeWindow.verify(message.window); - if (error) - return "window." + error; - } - if (message.deleted != null && message.hasOwnProperty("deleted")) - if (typeof message.deleted !== "boolean") - return "deleted: boolean expected"; - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.asset.v1.Asset.verify(message.asset); - if (error) - return "asset." + error; - } - return null; - }; + Object.defineProperty(AssetService.prototype.createFeed = function createFeed(request, callback) { + return this.rpcCall(createFeed, $root.google.cloud.asset.v1.CreateFeedRequest, $root.google.cloud.asset.v1.Feed, request, callback); + }, "name", { value: "CreateFeed" }); /** - * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.asset.v1.TemporalAsset - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.TemporalAsset} TemporalAsset + * Calls CreateFeed. + * @function createFeed + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.ICreateFeedRequest} request CreateFeedRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TemporalAsset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.TemporalAsset) - return object; - var message = new $root.google.cloud.asset.v1.TemporalAsset(); - if (object.window != null) { - if (typeof object.window !== "object") - throw TypeError(".google.cloud.asset.v1.TemporalAsset.window: object expected"); - message.window = $root.google.cloud.asset.v1.TimeWindow.fromObject(object.window); - } - if (object.deleted != null) - message.deleted = Boolean(object.deleted); - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.asset.v1.TemporalAsset.asset: object expected"); - message.asset = $root.google.cloud.asset.v1.Asset.fromObject(object.asset); - } - return message; - }; /** - * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.asset.v1.TemporalAsset - * @static - * @param {google.cloud.asset.v1.TemporalAsset} message TemporalAsset - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.asset.v1.AssetService#getFeed}. + * @memberof google.cloud.asset.v1.AssetService + * @typedef GetFeedCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1.Feed} [response] Feed */ - TemporalAsset.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.window = null; - object.deleted = false; - object.asset = null; - } - if (message.window != null && message.hasOwnProperty("window")) - object.window = $root.google.cloud.asset.v1.TimeWindow.toObject(message.window, options); - if (message.deleted != null && message.hasOwnProperty("deleted")) - object.deleted = message.deleted; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.asset.v1.Asset.toObject(message.asset, options); - return object; - }; /** - * Converts this TemporalAsset to JSON. - * @function toJSON - * @memberof google.cloud.asset.v1.TemporalAsset + * Calls GetFeed. + * @function getFeed + * @memberof google.cloud.asset.v1.AssetService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.asset.v1.IGetFeedRequest} request GetFeedRequest message or plain object + * @param {google.cloud.asset.v1.AssetService.GetFeedCallback} callback Node-style callback called with the error, if any, and Feed + * @returns {undefined} + * @variation 1 */ - TemporalAsset.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(AssetService.prototype.getFeed = function getFeed(request, callback) { + return this.rpcCall(getFeed, $root.google.cloud.asset.v1.GetFeedRequest, $root.google.cloud.asset.v1.Feed, request, callback); + }, "name", { value: "GetFeed" }); - return TemporalAsset; + /** + * Calls GetFeed. + * @function getFeed + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.IGetFeedRequest} request GetFeedRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.asset.v1.AssetService#listFeeds}. + * @memberof google.cloud.asset.v1.AssetService + * @typedef ListFeedsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1.ListFeedsResponse} [response] ListFeedsResponse + */ + + /** + * Calls ListFeeds. + * @function listFeeds + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.IListFeedsRequest} request ListFeedsRequest message or plain object + * @param {google.cloud.asset.v1.AssetService.ListFeedsCallback} callback Node-style callback called with the error, if any, and ListFeedsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AssetService.prototype.listFeeds = function listFeeds(request, callback) { + return this.rpcCall(listFeeds, $root.google.cloud.asset.v1.ListFeedsRequest, $root.google.cloud.asset.v1.ListFeedsResponse, request, callback); + }, "name", { value: "ListFeeds" }); + + /** + * Calls ListFeeds. + * @function listFeeds + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.IListFeedsRequest} request ListFeedsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.asset.v1.AssetService#updateFeed}. + * @memberof google.cloud.asset.v1.AssetService + * @typedef UpdateFeedCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1.Feed} [response] Feed + */ + + /** + * Calls UpdateFeed. + * @function updateFeed + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.IUpdateFeedRequest} request UpdateFeedRequest message or plain object + * @param {google.cloud.asset.v1.AssetService.UpdateFeedCallback} callback Node-style callback called with the error, if any, and Feed + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AssetService.prototype.updateFeed = function updateFeed(request, callback) { + return this.rpcCall(updateFeed, $root.google.cloud.asset.v1.UpdateFeedRequest, $root.google.cloud.asset.v1.Feed, request, callback); + }, "name", { value: "UpdateFeed" }); + + /** + * Calls UpdateFeed. + * @function updateFeed + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.IUpdateFeedRequest} request UpdateFeedRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.asset.v1.AssetService#deleteFeed}. + * @memberof google.cloud.asset.v1.AssetService + * @typedef DeleteFeedCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteFeed. + * @function deleteFeed + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.IDeleteFeedRequest} request DeleteFeedRequest message or plain object + * @param {google.cloud.asset.v1.AssetService.DeleteFeedCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AssetService.prototype.deleteFeed = function deleteFeed(request, callback) { + return this.rpcCall(deleteFeed, $root.google.cloud.asset.v1.DeleteFeedRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFeed" }); + + /** + * Calls DeleteFeed. + * @function deleteFeed + * @memberof google.cloud.asset.v1.AssetService + * @instance + * @param {google.cloud.asset.v1.IDeleteFeedRequest} request DeleteFeedRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AssetService; })(); - v1.TimeWindow = (function() { + v1.ExportAssetsRequest = (function() { /** - * Properties of a TimeWindow. + * Properties of an ExportAssetsRequest. * @memberof google.cloud.asset.v1 - * @interface ITimeWindow - * @property {google.protobuf.ITimestamp|null} [startTime] TimeWindow startTime - * @property {google.protobuf.ITimestamp|null} [endTime] TimeWindow endTime + * @interface IExportAssetsRequest + * @property {string|null} [parent] ExportAssetsRequest parent + * @property {google.protobuf.ITimestamp|null} [readTime] ExportAssetsRequest readTime + * @property {Array.|null} [assetTypes] ExportAssetsRequest assetTypes + * @property {google.cloud.asset.v1.ContentType|null} [contentType] ExportAssetsRequest contentType + * @property {google.cloud.asset.v1.IOutputConfig|null} [outputConfig] ExportAssetsRequest outputConfig */ /** - * Constructs a new TimeWindow. + * Constructs a new ExportAssetsRequest. * @memberof google.cloud.asset.v1 - * @classdesc Represents a TimeWindow. - * @implements ITimeWindow + * @classdesc Represents an ExportAssetsRequest. + * @implements IExportAssetsRequest * @constructor - * @param {google.cloud.asset.v1.ITimeWindow=} [properties] Properties to set + * @param {google.cloud.asset.v1.IExportAssetsRequest=} [properties] Properties to set */ - function TimeWindow(properties) { + function ExportAssetsRequest(properties) { + this.assetTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -334,88 +362,130 @@ } /** - * TimeWindow startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.asset.v1.TimeWindow + * ExportAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.asset.v1.ExportAssetsRequest * @instance */ - TimeWindow.prototype.startTime = null; + ExportAssetsRequest.prototype.parent = ""; /** - * TimeWindow endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.asset.v1.TimeWindow + * ExportAssetsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.asset.v1.ExportAssetsRequest * @instance */ - TimeWindow.prototype.endTime = null; + ExportAssetsRequest.prototype.readTime = null; /** - * Creates a new TimeWindow instance using the specified properties. + * ExportAssetsRequest assetTypes. + * @member {Array.} assetTypes + * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @instance + */ + ExportAssetsRequest.prototype.assetTypes = $util.emptyArray; + + /** + * ExportAssetsRequest contentType. + * @member {google.cloud.asset.v1.ContentType} contentType + * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @instance + */ + ExportAssetsRequest.prototype.contentType = 0; + + /** + * ExportAssetsRequest outputConfig. + * @member {google.cloud.asset.v1.IOutputConfig|null|undefined} outputConfig + * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @instance + */ + ExportAssetsRequest.prototype.outputConfig = null; + + /** + * Creates a new ExportAssetsRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.TimeWindow + * @memberof google.cloud.asset.v1.ExportAssetsRequest * @static - * @param {google.cloud.asset.v1.ITimeWindow=} [properties] Properties to set - * @returns {google.cloud.asset.v1.TimeWindow} TimeWindow instance + * @param {google.cloud.asset.v1.IExportAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1.ExportAssetsRequest} ExportAssetsRequest instance */ - TimeWindow.create = function create(properties) { - return new TimeWindow(properties); + ExportAssetsRequest.create = function create(properties) { + return new ExportAssetsRequest(properties); }; /** - * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1.TimeWindow.verify|verify} messages. + * Encodes the specified ExportAssetsRequest message. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.TimeWindow + * @memberof google.cloud.asset.v1.ExportAssetsRequest * @static - * @param {google.cloud.asset.v1.ITimeWindow} message TimeWindow message or plain object to encode + * @param {google.cloud.asset.v1.IExportAssetsRequest} message ExportAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeWindow.encode = function encode(message, writer) { + ExportAssetsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && message.hasOwnProperty("endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1.TimeWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.asset.v1.TimeWindow - * @static - * @param {google.cloud.asset.v1.ITimeWindow} message TimeWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.assetTypes != null && message.assetTypes.length) + for (var i = 0; i < message.assetTypes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetTypes[i]); + if (message.contentType != null && message.hasOwnProperty("contentType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.contentType); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + $root.google.cloud.asset.v1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @static + * @param {google.cloud.asset.v1.IExportAssetsRequest} message ExportAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeWindow.encodeDelimited = function encodeDelimited(message, writer) { + ExportAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeWindow message from the specified reader or buffer. + * Decodes an ExportAssetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.TimeWindow + * @memberof google.cloud.asset.v1.ExportAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.TimeWindow} TimeWindow + * @returns {google.cloud.asset.v1.ExportAssetsRequest} ExportAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeWindow.decode = function decode(reader, length) { + ExportAssetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.TimeWindow(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.ExportAssetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.assetTypes && message.assetTypes.length)) + message.assetTypes = []; + message.assetTypes.push(reader.string()); + break; + case 4: + message.contentType = reader.int32(); + break; + case 5: + message.outputConfig = $root.google.cloud.asset.v1.OutputConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -426,131 +496,192 @@ }; /** - * Decodes a TimeWindow message from the specified reader or buffer, length delimited. + * Decodes an ExportAssetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.TimeWindow + * @memberof google.cloud.asset.v1.ExportAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.TimeWindow} TimeWindow + * @returns {google.cloud.asset.v1.ExportAssetsRequest} ExportAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeWindow.decodeDelimited = function decodeDelimited(reader) { + ExportAssetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeWindow message. + * Verifies an ExportAssetsRequest message. * @function verify - * @memberof google.cloud.asset.v1.TimeWindow + * @memberof google.cloud.asset.v1.ExportAssetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeWindow.verify = function verify(message) { + ExportAssetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "startTime." + error; + return "readTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.assetTypes != null && message.hasOwnProperty("assetTypes")) { + if (!Array.isArray(message.assetTypes)) + return "assetTypes: array expected"; + for (var i = 0; i < message.assetTypes.length; ++i) + if (!$util.isString(message.assetTypes[i])) + return "assetTypes: string[] expected"; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + switch (message.contentType) { + default: + return "contentType: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + break; + } + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + var error = $root.google.cloud.asset.v1.OutputConfig.verify(message.outputConfig); if (error) - return "endTime." + error; + return "outputConfig." + error; } return null; }; /** - * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAssetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.TimeWindow + * @memberof google.cloud.asset.v1.ExportAssetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.TimeWindow} TimeWindow + * @returns {google.cloud.asset.v1.ExportAssetsRequest} ExportAssetsRequest */ - TimeWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.TimeWindow) + ExportAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.ExportAssetsRequest) return object; - var message = new $root.google.cloud.asset.v1.TimeWindow(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.asset.v1.TimeWindow.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + var message = new $root.google.cloud.asset.v1.ExportAssetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.asset.v1.ExportAssetsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.asset.v1.TimeWindow.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (object.assetTypes) { + if (!Array.isArray(object.assetTypes)) + throw TypeError(".google.cloud.asset.v1.ExportAssetsRequest.assetTypes: array expected"); + message.assetTypes = []; + for (var i = 0; i < object.assetTypes.length; ++i) + message.assetTypes[i] = String(object.assetTypes[i]); + } + switch (object.contentType) { + case "CONTENT_TYPE_UNSPECIFIED": + case 0: + message.contentType = 0; + break; + case "RESOURCE": + case 1: + message.contentType = 1; + break; + case "IAM_POLICY": + case 2: + message.contentType = 2; + break; + case "ORG_POLICY": + case 4: + message.contentType = 4; + break; + case "ACCESS_POLICY": + case 5: + message.contentType = 5; + break; + } + if (object.outputConfig != null) { + if (typeof object.outputConfig !== "object") + throw TypeError(".google.cloud.asset.v1.ExportAssetsRequest.outputConfig: object expected"); + message.outputConfig = $root.google.cloud.asset.v1.OutputConfig.fromObject(object.outputConfig); } return message; }; /** - * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. + * Creates a plain object from an ExportAssetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.TimeWindow + * @memberof google.cloud.asset.v1.ExportAssetsRequest * @static - * @param {google.cloud.asset.v1.TimeWindow} message TimeWindow + * @param {google.cloud.asset.v1.ExportAssetsRequest} message ExportAssetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeWindow.toObject = function toObject(message, options) { + ExportAssetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.assetTypes = []; if (options.defaults) { - object.startTime = null; - object.endTime = null; + object.parent = ""; + object.readTime = null; + object.contentType = options.enums === String ? "CONTENT_TYPE_UNSPECIFIED" : 0; + object.outputConfig = null; } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.assetTypes && message.assetTypes.length) { + object.assetTypes = []; + for (var j = 0; j < message.assetTypes.length; ++j) + object.assetTypes[j] = message.assetTypes[j]; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = options.enums === String ? $root.google.cloud.asset.v1.ContentType[message.contentType] : message.contentType; + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.asset.v1.OutputConfig.toObject(message.outputConfig, options); return object; }; /** - * Converts this TimeWindow to JSON. + * Converts this ExportAssetsRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.TimeWindow + * @memberof google.cloud.asset.v1.ExportAssetsRequest * @instance * @returns {Object.} JSON object */ - TimeWindow.prototype.toJSON = function toJSON() { + ExportAssetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeWindow; + return ExportAssetsRequest; })(); - v1.Asset = (function() { + v1.ExportAssetsResponse = (function() { /** - * Properties of an Asset. + * Properties of an ExportAssetsResponse. * @memberof google.cloud.asset.v1 - * @interface IAsset - * @property {string|null} [name] Asset name - * @property {string|null} [assetType] Asset assetType - * @property {google.cloud.asset.v1.IResource|null} [resource] Asset resource - * @property {google.iam.v1.IPolicy|null} [iamPolicy] Asset iamPolicy - * @property {Array.|null} [ancestors] Asset ancestors + * @interface IExportAssetsResponse + * @property {google.protobuf.ITimestamp|null} [readTime] ExportAssetsResponse readTime + * @property {google.cloud.asset.v1.IOutputConfig|null} [outputConfig] ExportAssetsResponse outputConfig */ /** - * Constructs a new Asset. + * Constructs a new ExportAssetsResponse. * @memberof google.cloud.asset.v1 - * @classdesc Represents an Asset. - * @implements IAsset + * @classdesc Represents an ExportAssetsResponse. + * @implements IExportAssetsResponse * @constructor - * @param {google.cloud.asset.v1.IAsset=} [properties] Properties to set + * @param {google.cloud.asset.v1.IExportAssetsResponse=} [properties] Properties to set */ - function Asset(properties) { - this.ancestors = []; + function ExportAssetsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -558,130 +689,88 @@ } /** - * Asset name. - * @member {string} name - * @memberof google.cloud.asset.v1.Asset + * ExportAssetsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.asset.v1.ExportAssetsResponse * @instance */ - Asset.prototype.name = ""; + ExportAssetsResponse.prototype.readTime = null; /** - * Asset assetType. - * @member {string} assetType - * @memberof google.cloud.asset.v1.Asset + * ExportAssetsResponse outputConfig. + * @member {google.cloud.asset.v1.IOutputConfig|null|undefined} outputConfig + * @memberof google.cloud.asset.v1.ExportAssetsResponse * @instance */ - Asset.prototype.assetType = ""; + ExportAssetsResponse.prototype.outputConfig = null; /** - * Asset resource. - * @member {google.cloud.asset.v1.IResource|null|undefined} resource - * @memberof google.cloud.asset.v1.Asset - * @instance + * Creates a new ExportAssetsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.asset.v1.ExportAssetsResponse + * @static + * @param {google.cloud.asset.v1.IExportAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.asset.v1.ExportAssetsResponse} ExportAssetsResponse instance */ - Asset.prototype.resource = null; + ExportAssetsResponse.create = function create(properties) { + return new ExportAssetsResponse(properties); + }; /** - * Asset iamPolicy. - * @member {google.iam.v1.IPolicy|null|undefined} iamPolicy - * @memberof google.cloud.asset.v1.Asset - * @instance - */ - Asset.prototype.iamPolicy = null; - - /** - * Asset ancestors. - * @member {Array.} ancestors - * @memberof google.cloud.asset.v1.Asset - * @instance - */ - Asset.prototype.ancestors = $util.emptyArray; - - /** - * Creates a new Asset instance using the specified properties. - * @function create - * @memberof google.cloud.asset.v1.Asset - * @static - * @param {google.cloud.asset.v1.IAsset=} [properties] Properties to set - * @returns {google.cloud.asset.v1.Asset} Asset instance - */ - Asset.create = function create(properties) { - return new Asset(properties); - }; - - /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1.Asset.verify|verify} messages. + * Encodes the specified ExportAssetsResponse message. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.Asset + * @memberof google.cloud.asset.v1.ExportAssetsResponse * @static - * @param {google.cloud.asset.v1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.asset.v1.IExportAssetsResponse} message ExportAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encode = function encode(message, writer) { + ExportAssetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.assetType != null && message.hasOwnProperty("assetType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetType); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.google.cloud.asset.v1.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) - $root.google.iam.v1.Policy.encode(message.iamPolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.ancestors != null && message.ancestors.length) - for (var i = 0; i < message.ancestors.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.ancestors[i]); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + $root.google.cloud.asset.v1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Asset.verify|verify} messages. + * Encodes the specified ExportAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.Asset + * @memberof google.cloud.asset.v1.ExportAssetsResponse * @static - * @param {google.cloud.asset.v1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.asset.v1.IExportAssetsResponse} message ExportAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encodeDelimited = function encodeDelimited(message, writer) { + ExportAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Asset message from the specified reader or buffer. + * Decodes an ExportAssetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.Asset + * @memberof google.cloud.asset.v1.ExportAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.Asset} Asset + * @returns {google.cloud.asset.v1.ExportAssetsResponse} ExportAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Asset.decode = function decode(reader, length) { + ExportAssetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.Asset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.ExportAssetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 2: - message.assetType = reader.string(); - break; - case 3: - message.resource = $root.google.cloud.asset.v1.Resource.decode(reader, reader.uint32()); - break; - case 4: - message.iamPolicy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); - break; - case 10: - if (!(message.ancestors && message.ancestors.length)) - message.ancestors = []; - message.ancestors.push(reader.string()); + message.outputConfig = $root.google.cloud.asset.v1.OutputConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -692,168 +781,130 @@ }; /** - * Decodes an Asset message from the specified reader or buffer, length delimited. + * Decodes an ExportAssetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.Asset + * @memberof google.cloud.asset.v1.ExportAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.Asset} Asset + * @returns {google.cloud.asset.v1.ExportAssetsResponse} ExportAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Asset.decodeDelimited = function decodeDelimited(reader) { + ExportAssetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Asset message. + * Verifies an ExportAssetsResponse message. * @function verify - * @memberof google.cloud.asset.v1.Asset + * @memberof google.cloud.asset.v1.ExportAssetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Asset.verify = function verify(message) { + ExportAssetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.assetType != null && message.hasOwnProperty("assetType")) - if (!$util.isString(message.assetType)) - return "assetType: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.asset.v1.Resource.verify(message.resource); + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "resource." + error; + return "readTime." + error; } - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) { - var error = $root.google.iam.v1.Policy.verify(message.iamPolicy); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + var error = $root.google.cloud.asset.v1.OutputConfig.verify(message.outputConfig); if (error) - return "iamPolicy." + error; - } - if (message.ancestors != null && message.hasOwnProperty("ancestors")) { - if (!Array.isArray(message.ancestors)) - return "ancestors: array expected"; - for (var i = 0; i < message.ancestors.length; ++i) - if (!$util.isString(message.ancestors[i])) - return "ancestors: string[] expected"; + return "outputConfig." + error; } return null; }; /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAssetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.Asset + * @memberof google.cloud.asset.v1.ExportAssetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.Asset} Asset + * @returns {google.cloud.asset.v1.ExportAssetsResponse} ExportAssetsResponse */ - Asset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.Asset) + ExportAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.ExportAssetsResponse) return object; - var message = new $root.google.cloud.asset.v1.Asset(); - if (object.name != null) - message.name = String(object.name); - if (object.assetType != null) - message.assetType = String(object.assetType); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.asset.v1.Asset.resource: object expected"); - message.resource = $root.google.cloud.asset.v1.Resource.fromObject(object.resource); - } - if (object.iamPolicy != null) { - if (typeof object.iamPolicy !== "object") - throw TypeError(".google.cloud.asset.v1.Asset.iamPolicy: object expected"); - message.iamPolicy = $root.google.iam.v1.Policy.fromObject(object.iamPolicy); + var message = new $root.google.cloud.asset.v1.ExportAssetsResponse(); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.asset.v1.ExportAssetsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } - if (object.ancestors) { - if (!Array.isArray(object.ancestors)) - throw TypeError(".google.cloud.asset.v1.Asset.ancestors: array expected"); - message.ancestors = []; - for (var i = 0; i < object.ancestors.length; ++i) - message.ancestors[i] = String(object.ancestors[i]); + if (object.outputConfig != null) { + if (typeof object.outputConfig !== "object") + throw TypeError(".google.cloud.asset.v1.ExportAssetsResponse.outputConfig: object expected"); + message.outputConfig = $root.google.cloud.asset.v1.OutputConfig.fromObject(object.outputConfig); } return message; }; /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. + * Creates a plain object from an ExportAssetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.Asset + * @memberof google.cloud.asset.v1.ExportAssetsResponse * @static - * @param {google.cloud.asset.v1.Asset} message Asset + * @param {google.cloud.asset.v1.ExportAssetsResponse} message ExportAssetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Asset.toObject = function toObject(message, options) { + ExportAssetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.ancestors = []; if (options.defaults) { - object.name = ""; - object.assetType = ""; - object.resource = null; - object.iamPolicy = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.assetType != null && message.hasOwnProperty("assetType")) - object.assetType = message.assetType; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.asset.v1.Resource.toObject(message.resource, options); - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) - object.iamPolicy = $root.google.iam.v1.Policy.toObject(message.iamPolicy, options); - if (message.ancestors && message.ancestors.length) { - object.ancestors = []; - for (var j = 0; j < message.ancestors.length; ++j) - object.ancestors[j] = message.ancestors[j]; + object.readTime = null; + object.outputConfig = null; } + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.asset.v1.OutputConfig.toObject(message.outputConfig, options); return object; }; /** - * Converts this Asset to JSON. + * Converts this ExportAssetsResponse to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.Asset + * @memberof google.cloud.asset.v1.ExportAssetsResponse * @instance * @returns {Object.} JSON object */ - Asset.prototype.toJSON = function toJSON() { + ExportAssetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Asset; + return ExportAssetsResponse; })(); - v1.Resource = (function() { + v1.BatchGetAssetsHistoryRequest = (function() { /** - * Properties of a Resource. + * Properties of a BatchGetAssetsHistoryRequest. * @memberof google.cloud.asset.v1 - * @interface IResource - * @property {string|null} [version] Resource version - * @property {string|null} [discoveryDocumentUri] Resource discoveryDocumentUri - * @property {string|null} [discoveryName] Resource discoveryName - * @property {string|null} [resourceUrl] Resource resourceUrl - * @property {string|null} [parent] Resource parent - * @property {google.protobuf.IStruct|null} [data] Resource data + * @interface IBatchGetAssetsHistoryRequest + * @property {string|null} [parent] BatchGetAssetsHistoryRequest parent + * @property {Array.|null} [assetNames] BatchGetAssetsHistoryRequest assetNames + * @property {google.cloud.asset.v1.ContentType|null} [contentType] BatchGetAssetsHistoryRequest contentType + * @property {google.cloud.asset.v1.ITimeWindow|null} [readTimeWindow] BatchGetAssetsHistoryRequest readTimeWindow */ /** - * Constructs a new Resource. + * Constructs a new BatchGetAssetsHistoryRequest. * @memberof google.cloud.asset.v1 - * @classdesc Represents a Resource. - * @implements IResource + * @classdesc Represents a BatchGetAssetsHistoryRequest. + * @implements IBatchGetAssetsHistoryRequest * @constructor - * @param {google.cloud.asset.v1.IResource=} [properties] Properties to set + * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest=} [properties] Properties to set */ - function Resource(properties) { + function BatchGetAssetsHistoryRequest(properties) { + this.assetNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -861,140 +912,117 @@ } /** - * Resource version. - * @member {string} version - * @memberof google.cloud.asset.v1.Resource + * BatchGetAssetsHistoryRequest parent. + * @member {string} parent + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @instance */ - Resource.prototype.version = ""; + BatchGetAssetsHistoryRequest.prototype.parent = ""; /** - * Resource discoveryDocumentUri. - * @member {string} discoveryDocumentUri - * @memberof google.cloud.asset.v1.Resource + * BatchGetAssetsHistoryRequest assetNames. + * @member {Array.} assetNames + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @instance */ - Resource.prototype.discoveryDocumentUri = ""; + BatchGetAssetsHistoryRequest.prototype.assetNames = $util.emptyArray; /** - * Resource discoveryName. - * @member {string} discoveryName - * @memberof google.cloud.asset.v1.Resource + * BatchGetAssetsHistoryRequest contentType. + * @member {google.cloud.asset.v1.ContentType} contentType + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @instance */ - Resource.prototype.discoveryName = ""; + BatchGetAssetsHistoryRequest.prototype.contentType = 0; /** - * Resource resourceUrl. - * @member {string} resourceUrl - * @memberof google.cloud.asset.v1.Resource + * BatchGetAssetsHistoryRequest readTimeWindow. + * @member {google.cloud.asset.v1.ITimeWindow|null|undefined} readTimeWindow + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @instance */ - Resource.prototype.resourceUrl = ""; + BatchGetAssetsHistoryRequest.prototype.readTimeWindow = null; /** - * Resource parent. - * @member {string} parent - * @memberof google.cloud.asset.v1.Resource - * @instance - */ - Resource.prototype.parent = ""; - - /** - * Resource data. - * @member {google.protobuf.IStruct|null|undefined} data - * @memberof google.cloud.asset.v1.Resource - * @instance - */ - Resource.prototype.data = null; - - /** - * Creates a new Resource instance using the specified properties. + * Creates a new BatchGetAssetsHistoryRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.Resource + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @static - * @param {google.cloud.asset.v1.IResource=} [properties] Properties to set - * @returns {google.cloud.asset.v1.Resource} Resource instance + * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest instance */ - Resource.create = function create(properties) { - return new Resource(properties); + BatchGetAssetsHistoryRequest.create = function create(properties) { + return new BatchGetAssetsHistoryRequest(properties); }; /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1.Resource.verify|verify} messages. + * Encodes the specified BatchGetAssetsHistoryRequest message. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.Resource + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @static - * @param {google.cloud.asset.v1.IResource} message Resource message or plain object to encode + * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Resource.encode = function encode(message, writer) { + BatchGetAssetsHistoryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && message.hasOwnProperty("version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.discoveryDocumentUri); - if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.discoveryName); - if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUrl); if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); - if (message.data != null && message.hasOwnProperty("data")) - $root.google.protobuf.Struct.encode(message.data, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.assetNames != null && message.assetNames.length) + for (var i = 0; i < message.assetNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetNames[i]); + if (message.contentType != null && message.hasOwnProperty("contentType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contentType); + if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) + $root.google.cloud.asset.v1.TimeWindow.encode(message.readTimeWindow, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Resource.verify|verify} messages. + * Encodes the specified BatchGetAssetsHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.Resource + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @static - * @param {google.cloud.asset.v1.IResource} message Resource message or plain object to encode + * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Resource.encodeDelimited = function encodeDelimited(message, writer) { + BatchGetAssetsHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Resource message from the specified reader or buffer. + * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.Resource + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.Resource} Resource + * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Resource.decode = function decode(reader, length) { + BatchGetAssetsHistoryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.Resource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.BatchGetAssetsHistoryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.version = reader.string(); + message.parent = reader.string(); break; case 2: - message.discoveryDocumentUri = reader.string(); + if (!(message.assetNames && message.assetNames.length)) + message.assetNames = []; + message.assetNames.push(reader.string()); break; case 3: - message.discoveryName = reader.string(); + message.contentType = reader.int32(); break; case 4: - message.resourceUrl = reader.string(); - break; - case 5: - message.parent = reader.string(); - break; - case 6: - message.data = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.readTimeWindow = $root.google.cloud.asset.v1.TimeWindow.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1005,424 +1033,623 @@ }; /** - * Decodes a Resource message from the specified reader or buffer, length delimited. + * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.Resource + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.Resource} Resource + * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Resource.decodeDelimited = function decodeDelimited(reader) { + BatchGetAssetsHistoryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Resource message. + * Verifies a BatchGetAssetsHistoryRequest message. * @function verify - * @memberof google.cloud.asset.v1.Resource + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Resource.verify = function verify(message) { + BatchGetAssetsHistoryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) - if (!$util.isString(message.discoveryDocumentUri)) - return "discoveryDocumentUri: string expected"; - if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) - if (!$util.isString(message.discoveryName)) - return "discoveryName: string expected"; - if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) - if (!$util.isString(message.resourceUrl)) - return "resourceUrl: string expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.data != null && message.hasOwnProperty("data")) { - var error = $root.google.protobuf.Struct.verify(message.data); + if (message.assetNames != null && message.hasOwnProperty("assetNames")) { + if (!Array.isArray(message.assetNames)) + return "assetNames: array expected"; + for (var i = 0; i < message.assetNames.length; ++i) + if (!$util.isString(message.assetNames[i])) + return "assetNames: string[] expected"; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + switch (message.contentType) { + default: + return "contentType: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + break; + } + if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) { + var error = $root.google.cloud.asset.v1.TimeWindow.verify(message.readTimeWindow); if (error) - return "data." + error; + return "readTimeWindow." + error; } return null; }; /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * Creates a BatchGetAssetsHistoryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.Resource + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.Resource} Resource + * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest */ - Resource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.Resource) + BatchGetAssetsHistoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) return object; - var message = new $root.google.cloud.asset.v1.Resource(); - if (object.version != null) - message.version = String(object.version); - if (object.discoveryDocumentUri != null) - message.discoveryDocumentUri = String(object.discoveryDocumentUri); - if (object.discoveryName != null) - message.discoveryName = String(object.discoveryName); - if (object.resourceUrl != null) - message.resourceUrl = String(object.resourceUrl); + var message = new $root.google.cloud.asset.v1.BatchGetAssetsHistoryRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.data != null) { - if (typeof object.data !== "object") - throw TypeError(".google.cloud.asset.v1.Resource.data: object expected"); - message.data = $root.google.protobuf.Struct.fromObject(object.data); + if (object.assetNames) { + if (!Array.isArray(object.assetNames)) + throw TypeError(".google.cloud.asset.v1.BatchGetAssetsHistoryRequest.assetNames: array expected"); + message.assetNames = []; + for (var i = 0; i < object.assetNames.length; ++i) + message.assetNames[i] = String(object.assetNames[i]); + } + switch (object.contentType) { + case "CONTENT_TYPE_UNSPECIFIED": + case 0: + message.contentType = 0; + break; + case "RESOURCE": + case 1: + message.contentType = 1; + break; + case "IAM_POLICY": + case 2: + message.contentType = 2; + break; + case "ORG_POLICY": + case 4: + message.contentType = 4; + break; + case "ACCESS_POLICY": + case 5: + message.contentType = 5; + break; + } + if (object.readTimeWindow != null) { + if (typeof object.readTimeWindow !== "object") + throw TypeError(".google.cloud.asset.v1.BatchGetAssetsHistoryRequest.readTimeWindow: object expected"); + message.readTimeWindow = $root.google.cloud.asset.v1.TimeWindow.fromObject(object.readTimeWindow); } return message; }; /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. + * Creates a plain object from a BatchGetAssetsHistoryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.Resource + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @static - * @param {google.cloud.asset.v1.Resource} message Resource + * @param {google.cloud.asset.v1.BatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Resource.toObject = function toObject(message, options) { + BatchGetAssetsHistoryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.assetNames = []; if (options.defaults) { - object.version = ""; - object.discoveryDocumentUri = ""; - object.discoveryName = ""; - object.resourceUrl = ""; object.parent = ""; - object.data = null; + object.contentType = options.enums === String ? "CONTENT_TYPE_UNSPECIFIED" : 0; + object.readTimeWindow = null; } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) - object.discoveryDocumentUri = message.discoveryDocumentUri; - if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) - object.discoveryName = message.discoveryName; - if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) - object.resourceUrl = message.resourceUrl; if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.data != null && message.hasOwnProperty("data")) - object.data = $root.google.protobuf.Struct.toObject(message.data, options); + if (message.assetNames && message.assetNames.length) { + object.assetNames = []; + for (var j = 0; j < message.assetNames.length; ++j) + object.assetNames[j] = message.assetNames[j]; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = options.enums === String ? $root.google.cloud.asset.v1.ContentType[message.contentType] : message.contentType; + if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) + object.readTimeWindow = $root.google.cloud.asset.v1.TimeWindow.toObject(message.readTimeWindow, options); return object; }; /** - * Converts this Resource to JSON. + * Converts this BatchGetAssetsHistoryRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.Resource + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest * @instance * @returns {Object.} JSON object */ - Resource.prototype.toJSON = function toJSON() { + BatchGetAssetsHistoryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Resource; + return BatchGetAssetsHistoryRequest; })(); - v1.AssetService = (function() { + v1.BatchGetAssetsHistoryResponse = (function() { /** - * Constructs a new AssetService service. + * Properties of a BatchGetAssetsHistoryResponse. * @memberof google.cloud.asset.v1 - * @classdesc Represents an AssetService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @interface IBatchGetAssetsHistoryResponse + * @property {Array.|null} [assets] BatchGetAssetsHistoryResponse assets */ - function AssetService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (AssetService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AssetService; /** - * Creates new AssetService service using the specified rpc implementation. + * Constructs a new BatchGetAssetsHistoryResponse. + * @memberof google.cloud.asset.v1 + * @classdesc Represents a BatchGetAssetsHistoryResponse. + * @implements IBatchGetAssetsHistoryResponse + * @constructor + * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryResponse=} [properties] Properties to set + */ + function BatchGetAssetsHistoryResponse(properties) { + this.assets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchGetAssetsHistoryResponse assets. + * @member {Array.} assets + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @instance + */ + BatchGetAssetsHistoryResponse.prototype.assets = $util.emptyArray; + + /** + * Creates a new BatchGetAssetsHistoryResponse instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.AssetService + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {AssetService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryResponse=} [properties] Properties to set + * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse instance */ - AssetService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + BatchGetAssetsHistoryResponse.create = function create(properties) { + return new BatchGetAssetsHistoryResponse(properties); }; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#exportAssets}. - * @memberof google.cloud.asset.v1.AssetService - * @typedef ExportAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified BatchGetAssetsHistoryResponse message. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @static + * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + BatchGetAssetsHistoryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.assets != null && message.assets.length) + for (var i = 0; i < message.assets.length; ++i) + $root.google.cloud.asset.v1.TemporalAsset.encode(message.assets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Calls ExportAssets. - * @function exportAssets - * @memberof google.cloud.asset.v1.AssetService - * @instance - * @param {google.cloud.asset.v1.IExportAssetsRequest} request ExportAssetsRequest message or plain object - * @param {google.cloud.asset.v1.AssetService.ExportAssetsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified BatchGetAssetsHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @static + * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AssetService.prototype.exportAssets = function exportAssets(request, callback) { - return this.rpcCall(exportAssets, $root.google.cloud.asset.v1.ExportAssetsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportAssets" }); + BatchGetAssetsHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ExportAssets. - * @function exportAssets - * @memberof google.cloud.asset.v1.AssetService - * @instance - * @param {google.cloud.asset.v1.IExportAssetsRequest} request ExportAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + BatchGetAssetsHistoryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.BatchGetAssetsHistoryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.assets && message.assets.length)) + message.assets = []; + message.assets.push($root.google.cloud.asset.v1.TemporalAsset.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#batchGetAssetsHistory}. - * @memberof google.cloud.asset.v1.AssetService - * @typedef BatchGetAssetsHistoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} [response] BatchGetAssetsHistoryResponse + * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + BatchGetAssetsHistoryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls BatchGetAssetsHistory. - * @function batchGetAssetsHistory - * @memberof google.cloud.asset.v1.AssetService - * @instance - * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest} request BatchGetAssetsHistoryRequest message or plain object - * @param {google.cloud.asset.v1.AssetService.BatchGetAssetsHistoryCallback} callback Node-style callback called with the error, if any, and BatchGetAssetsHistoryResponse - * @returns {undefined} - * @variation 1 + * Verifies a BatchGetAssetsHistoryResponse message. + * @function verify + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(AssetService.prototype.batchGetAssetsHistory = function batchGetAssetsHistory(request, callback) { - return this.rpcCall(batchGetAssetsHistory, $root.google.cloud.asset.v1.BatchGetAssetsHistoryRequest, $root.google.cloud.asset.v1.BatchGetAssetsHistoryResponse, request, callback); - }, "name", { value: "BatchGetAssetsHistory" }); + BatchGetAssetsHistoryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.assets != null && message.hasOwnProperty("assets")) { + if (!Array.isArray(message.assets)) + return "assets: array expected"; + for (var i = 0; i < message.assets.length; ++i) { + var error = $root.google.cloud.asset.v1.TemporalAsset.verify(message.assets[i]); + if (error) + return "assets." + error; + } + } + return null; + }; /** - * Calls BatchGetAssetsHistory. - * @function batchGetAssetsHistory - * @memberof google.cloud.asset.v1.AssetService - * @instance - * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest} request BatchGetAssetsHistoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a BatchGetAssetsHistoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse */ + BatchGetAssetsHistoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.BatchGetAssetsHistoryResponse) + return object; + var message = new $root.google.cloud.asset.v1.BatchGetAssetsHistoryResponse(); + if (object.assets) { + if (!Array.isArray(object.assets)) + throw TypeError(".google.cloud.asset.v1.BatchGetAssetsHistoryResponse.assets: array expected"); + message.assets = []; + for (var i = 0; i < object.assets.length; ++i) { + if (typeof object.assets[i] !== "object") + throw TypeError(".google.cloud.asset.v1.BatchGetAssetsHistoryResponse.assets: object expected"); + message.assets[i] = $root.google.cloud.asset.v1.TemporalAsset.fromObject(object.assets[i]); + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#createFeed}. - * @memberof google.cloud.asset.v1.AssetService - * @typedef CreateFeedCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1.Feed} [response] Feed + * Creates a plain object from a BatchGetAssetsHistoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @static + * @param {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + BatchGetAssetsHistoryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.assets = []; + if (message.assets && message.assets.length) { + object.assets = []; + for (var j = 0; j < message.assets.length; ++j) + object.assets[j] = $root.google.cloud.asset.v1.TemporalAsset.toObject(message.assets[j], options); + } + return object; + }; /** - * Calls CreateFeed. - * @function createFeed - * @memberof google.cloud.asset.v1.AssetService + * Converts this BatchGetAssetsHistoryResponse to JSON. + * @function toJSON + * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse * @instance - * @param {google.cloud.asset.v1.ICreateFeedRequest} request CreateFeedRequest message or plain object - * @param {google.cloud.asset.v1.AssetService.CreateFeedCallback} callback Node-style callback called with the error, if any, and Feed - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(AssetService.prototype.createFeed = function createFeed(request, callback) { - return this.rpcCall(createFeed, $root.google.cloud.asset.v1.CreateFeedRequest, $root.google.cloud.asset.v1.Feed, request, callback); - }, "name", { value: "CreateFeed" }); + BatchGetAssetsHistoryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BatchGetAssetsHistoryResponse; + })(); + + v1.CreateFeedRequest = (function() { /** - * Calls CreateFeed. - * @function createFeed - * @memberof google.cloud.asset.v1.AssetService - * @instance - * @param {google.cloud.asset.v1.ICreateFeedRequest} request CreateFeedRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a CreateFeedRequest. + * @memberof google.cloud.asset.v1 + * @interface ICreateFeedRequest + * @property {string|null} [parent] CreateFeedRequest parent + * @property {string|null} [feedId] CreateFeedRequest feedId + * @property {google.cloud.asset.v1.IFeed|null} [feed] CreateFeedRequest feed */ /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#getFeed}. - * @memberof google.cloud.asset.v1.AssetService - * @typedef GetFeedCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1.Feed} [response] Feed + * Constructs a new CreateFeedRequest. + * @memberof google.cloud.asset.v1 + * @classdesc Represents a CreateFeedRequest. + * @implements ICreateFeedRequest + * @constructor + * @param {google.cloud.asset.v1.ICreateFeedRequest=} [properties] Properties to set */ + function CreateFeedRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetFeed. - * @function getFeed - * @memberof google.cloud.asset.v1.AssetService + * CreateFeedRequest parent. + * @member {string} parent + * @memberof google.cloud.asset.v1.CreateFeedRequest * @instance - * @param {google.cloud.asset.v1.IGetFeedRequest} request GetFeedRequest message or plain object - * @param {google.cloud.asset.v1.AssetService.GetFeedCallback} callback Node-style callback called with the error, if any, and Feed - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AssetService.prototype.getFeed = function getFeed(request, callback) { - return this.rpcCall(getFeed, $root.google.cloud.asset.v1.GetFeedRequest, $root.google.cloud.asset.v1.Feed, request, callback); - }, "name", { value: "GetFeed" }); + CreateFeedRequest.prototype.parent = ""; /** - * Calls GetFeed. - * @function getFeed - * @memberof google.cloud.asset.v1.AssetService + * CreateFeedRequest feedId. + * @member {string} feedId + * @memberof google.cloud.asset.v1.CreateFeedRequest * @instance - * @param {google.cloud.asset.v1.IGetFeedRequest} request GetFeedRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + CreateFeedRequest.prototype.feedId = ""; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#listFeeds}. - * @memberof google.cloud.asset.v1.AssetService - * @typedef ListFeedsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1.ListFeedsResponse} [response] ListFeedsResponse + * CreateFeedRequest feed. + * @member {google.cloud.asset.v1.IFeed|null|undefined} feed + * @memberof google.cloud.asset.v1.CreateFeedRequest + * @instance */ + CreateFeedRequest.prototype.feed = null; /** - * Calls ListFeeds. - * @function listFeeds - * @memberof google.cloud.asset.v1.AssetService - * @instance - * @param {google.cloud.asset.v1.IListFeedsRequest} request ListFeedsRequest message or plain object - * @param {google.cloud.asset.v1.AssetService.ListFeedsCallback} callback Node-style callback called with the error, if any, and ListFeedsResponse - * @returns {undefined} - * @variation 1 + * Creates a new CreateFeedRequest instance using the specified properties. + * @function create + * @memberof google.cloud.asset.v1.CreateFeedRequest + * @static + * @param {google.cloud.asset.v1.ICreateFeedRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1.CreateFeedRequest} CreateFeedRequest instance */ - Object.defineProperty(AssetService.prototype.listFeeds = function listFeeds(request, callback) { - return this.rpcCall(listFeeds, $root.google.cloud.asset.v1.ListFeedsRequest, $root.google.cloud.asset.v1.ListFeedsResponse, request, callback); - }, "name", { value: "ListFeeds" }); + CreateFeedRequest.create = function create(properties) { + return new CreateFeedRequest(properties); + }; /** - * Calls ListFeeds. - * @function listFeeds - * @memberof google.cloud.asset.v1.AssetService - * @instance - * @param {google.cloud.asset.v1.IListFeedsRequest} request ListFeedsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified CreateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.CreateFeedRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.asset.v1.CreateFeedRequest + * @static + * @param {google.cloud.asset.v1.ICreateFeedRequest} message CreateFeedRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CreateFeedRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.feedId != null && message.hasOwnProperty("feedId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.feedId); + if (message.feed != null && message.hasOwnProperty("feed")) + $root.google.cloud.asset.v1.Feed.encode(message.feed, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#updateFeed}. - * @memberof google.cloud.asset.v1.AssetService - * @typedef UpdateFeedCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1.Feed} [response] Feed + * Encodes the specified CreateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.CreateFeedRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.asset.v1.CreateFeedRequest + * @static + * @param {google.cloud.asset.v1.ICreateFeedRequest} message CreateFeedRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CreateFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateFeed. - * @function updateFeed - * @memberof google.cloud.asset.v1.AssetService - * @instance - * @param {google.cloud.asset.v1.IUpdateFeedRequest} request UpdateFeedRequest message or plain object - * @param {google.cloud.asset.v1.AssetService.UpdateFeedCallback} callback Node-style callback called with the error, if any, and Feed - * @returns {undefined} - * @variation 1 + * Decodes a CreateFeedRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.asset.v1.CreateFeedRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.asset.v1.CreateFeedRequest} CreateFeedRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(AssetService.prototype.updateFeed = function updateFeed(request, callback) { - return this.rpcCall(updateFeed, $root.google.cloud.asset.v1.UpdateFeedRequest, $root.google.cloud.asset.v1.Feed, request, callback); - }, "name", { value: "UpdateFeed" }); + CreateFeedRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.CreateFeedRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.feedId = reader.string(); + break; + case 3: + message.feed = $root.google.cloud.asset.v1.Feed.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdateFeed. - * @function updateFeed - * @memberof google.cloud.asset.v1.AssetService - * @instance - * @param {google.cloud.asset.v1.IUpdateFeedRequest} request UpdateFeedRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a CreateFeedRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.asset.v1.CreateFeedRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.asset.v1.CreateFeedRequest} CreateFeedRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateFeedRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Callback as used by {@link google.cloud.asset.v1.AssetService#deleteFeed}. - * @memberof google.cloud.asset.v1.AssetService - * @typedef DeleteFeedCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Verifies a CreateFeedRequest message. + * @function verify + * @memberof google.cloud.asset.v1.CreateFeedRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + CreateFeedRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.feedId != null && message.hasOwnProperty("feedId")) + if (!$util.isString(message.feedId)) + return "feedId: string expected"; + if (message.feed != null && message.hasOwnProperty("feed")) { + var error = $root.google.cloud.asset.v1.Feed.verify(message.feed); + if (error) + return "feed." + error; + } + return null; + }; /** - * Calls DeleteFeed. - * @function deleteFeed - * @memberof google.cloud.asset.v1.AssetService - * @instance - * @param {google.cloud.asset.v1.IDeleteFeedRequest} request DeleteFeedRequest message or plain object - * @param {google.cloud.asset.v1.AssetService.DeleteFeedCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a CreateFeedRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.asset.v1.CreateFeedRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.asset.v1.CreateFeedRequest} CreateFeedRequest */ - Object.defineProperty(AssetService.prototype.deleteFeed = function deleteFeed(request, callback) { - return this.rpcCall(deleteFeed, $root.google.cloud.asset.v1.DeleteFeedRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteFeed" }); + CreateFeedRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.CreateFeedRequest) + return object; + var message = new $root.google.cloud.asset.v1.CreateFeedRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.feedId != null) + message.feedId = String(object.feedId); + if (object.feed != null) { + if (typeof object.feed !== "object") + throw TypeError(".google.cloud.asset.v1.CreateFeedRequest.feed: object expected"); + message.feed = $root.google.cloud.asset.v1.Feed.fromObject(object.feed); + } + return message; + }; + + /** + * Creates a plain object from a CreateFeedRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.asset.v1.CreateFeedRequest + * @static + * @param {google.cloud.asset.v1.CreateFeedRequest} message CreateFeedRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateFeedRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.feedId = ""; + object.feed = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.feedId != null && message.hasOwnProperty("feedId")) + object.feedId = message.feedId; + if (message.feed != null && message.hasOwnProperty("feed")) + object.feed = $root.google.cloud.asset.v1.Feed.toObject(message.feed, options); + return object; + }; /** - * Calls DeleteFeed. - * @function deleteFeed - * @memberof google.cloud.asset.v1.AssetService + * Converts this CreateFeedRequest to JSON. + * @function toJSON + * @memberof google.cloud.asset.v1.CreateFeedRequest * @instance - * @param {google.cloud.asset.v1.IDeleteFeedRequest} request DeleteFeedRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + CreateFeedRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return AssetService; + return CreateFeedRequest; })(); - v1.ExportAssetsRequest = (function() { + v1.GetFeedRequest = (function() { /** - * Properties of an ExportAssetsRequest. + * Properties of a GetFeedRequest. * @memberof google.cloud.asset.v1 - * @interface IExportAssetsRequest - * @property {string|null} [parent] ExportAssetsRequest parent - * @property {google.protobuf.ITimestamp|null} [readTime] ExportAssetsRequest readTime - * @property {Array.|null} [assetTypes] ExportAssetsRequest assetTypes - * @property {google.cloud.asset.v1.ContentType|null} [contentType] ExportAssetsRequest contentType - * @property {google.cloud.asset.v1.IOutputConfig|null} [outputConfig] ExportAssetsRequest outputConfig + * @interface IGetFeedRequest + * @property {string|null} [name] GetFeedRequest name */ /** - * Constructs a new ExportAssetsRequest. + * Constructs a new GetFeedRequest. * @memberof google.cloud.asset.v1 - * @classdesc Represents an ExportAssetsRequest. - * @implements IExportAssetsRequest + * @classdesc Represents a GetFeedRequest. + * @implements IGetFeedRequest * @constructor - * @param {google.cloud.asset.v1.IExportAssetsRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1.IGetFeedRequest=} [properties] Properties to set */ - function ExportAssetsRequest(properties) { - this.assetTypes = []; + function GetFeedRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1430,130 +1657,75 @@ } /** - * ExportAssetsRequest parent. - * @member {string} parent - * @memberof google.cloud.asset.v1.ExportAssetsRequest - * @instance - */ - ExportAssetsRequest.prototype.parent = ""; - - /** - * ExportAssetsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.asset.v1.ExportAssetsRequest - * @instance - */ - ExportAssetsRequest.prototype.readTime = null; - - /** - * ExportAssetsRequest assetTypes. - * @member {Array.} assetTypes - * @memberof google.cloud.asset.v1.ExportAssetsRequest - * @instance - */ - ExportAssetsRequest.prototype.assetTypes = $util.emptyArray; - - /** - * ExportAssetsRequest contentType. - * @member {google.cloud.asset.v1.ContentType} contentType - * @memberof google.cloud.asset.v1.ExportAssetsRequest - * @instance - */ - ExportAssetsRequest.prototype.contentType = 0; - - /** - * ExportAssetsRequest outputConfig. - * @member {google.cloud.asset.v1.IOutputConfig|null|undefined} outputConfig - * @memberof google.cloud.asset.v1.ExportAssetsRequest + * GetFeedRequest name. + * @member {string} name + * @memberof google.cloud.asset.v1.GetFeedRequest * @instance */ - ExportAssetsRequest.prototype.outputConfig = null; + GetFeedRequest.prototype.name = ""; /** - * Creates a new ExportAssetsRequest instance using the specified properties. + * Creates a new GetFeedRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @memberof google.cloud.asset.v1.GetFeedRequest * @static - * @param {google.cloud.asset.v1.IExportAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1.ExportAssetsRequest} ExportAssetsRequest instance + * @param {google.cloud.asset.v1.IGetFeedRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1.GetFeedRequest} GetFeedRequest instance */ - ExportAssetsRequest.create = function create(properties) { - return new ExportAssetsRequest(properties); + GetFeedRequest.create = function create(properties) { + return new GetFeedRequest(properties); }; /** - * Encodes the specified ExportAssetsRequest message. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsRequest.verify|verify} messages. + * Encodes the specified GetFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.GetFeedRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @memberof google.cloud.asset.v1.GetFeedRequest * @static - * @param {google.cloud.asset.v1.IExportAssetsRequest} message ExportAssetsRequest message or plain object to encode + * @param {google.cloud.asset.v1.IGetFeedRequest} message GetFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAssetsRequest.encode = function encode(message, writer) { + GetFeedRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.assetTypes != null && message.assetTypes.length) - for (var i = 0; i < message.assetTypes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetTypes[i]); - if (message.contentType != null && message.hasOwnProperty("contentType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.contentType); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - $root.google.cloud.asset.v1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ExportAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsRequest.verify|verify} messages. + * Encodes the specified GetFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.GetFeedRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @memberof google.cloud.asset.v1.GetFeedRequest * @static - * @param {google.cloud.asset.v1.IExportAssetsRequest} message ExportAssetsRequest message or plain object to encode + * @param {google.cloud.asset.v1.IGetFeedRequest} message GetFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportAssetsRequest message from the specified reader or buffer. + * Decodes a GetFeedRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @memberof google.cloud.asset.v1.GetFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.ExportAssetsRequest} ExportAssetsRequest + * @returns {google.cloud.asset.v1.GetFeedRequest} GetFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAssetsRequest.decode = function decode(reader, length) { + GetFeedRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.ExportAssetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.GetFeedRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.assetTypes && message.assetTypes.length)) - message.assetTypes = []; - message.assetTypes.push(reader.string()); - break; - case 4: - message.contentType = reader.int32(); - break; - case 5: - message.outputConfig = $root.google.cloud.asset.v1.OutputConfig.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -1564,192 +1736,107 @@ }; /** - * Decodes an ExportAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetFeedRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @memberof google.cloud.asset.v1.GetFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.ExportAssetsRequest} ExportAssetsRequest + * @returns {google.cloud.asset.v1.GetFeedRequest} GetFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + GetFeedRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportAssetsRequest message. + * Verifies a GetFeedRequest message. * @function verify - * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @memberof google.cloud.asset.v1.GetFeedRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportAssetsRequest.verify = function verify(message) { + GetFeedRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.assetTypes != null && message.hasOwnProperty("assetTypes")) { - if (!Array.isArray(message.assetTypes)) - return "assetTypes: array expected"; - for (var i = 0; i < message.assetTypes.length; ++i) - if (!$util.isString(message.assetTypes[i])) - return "assetTypes: string[] expected"; - } - if (message.contentType != null && message.hasOwnProperty("contentType")) - switch (message.contentType) { - default: - return "contentType: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 5: - break; - } - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { - var error = $root.google.cloud.asset.v1.OutputConfig.verify(message.outputConfig); - if (error) - return "outputConfig." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ExportAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetFeedRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.ExportAssetsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.ExportAssetsRequest} ExportAssetsRequest - */ - ExportAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.ExportAssetsRequest) - return object; - var message = new $root.google.cloud.asset.v1.ExportAssetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.asset.v1.ExportAssetsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.assetTypes) { - if (!Array.isArray(object.assetTypes)) - throw TypeError(".google.cloud.asset.v1.ExportAssetsRequest.assetTypes: array expected"); - message.assetTypes = []; - for (var i = 0; i < object.assetTypes.length; ++i) - message.assetTypes[i] = String(object.assetTypes[i]); - } - switch (object.contentType) { - case "CONTENT_TYPE_UNSPECIFIED": - case 0: - message.contentType = 0; - break; - case "RESOURCE": - case 1: - message.contentType = 1; - break; - case "IAM_POLICY": - case 2: - message.contentType = 2; - break; - case "ORG_POLICY": - case 4: - message.contentType = 4; - break; - case "ACCESS_POLICY": - case 5: - message.contentType = 5; - break; - } - if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") - throw TypeError(".google.cloud.asset.v1.ExportAssetsRequest.outputConfig: object expected"); - message.outputConfig = $root.google.cloud.asset.v1.OutputConfig.fromObject(object.outputConfig); - } + * @memberof google.cloud.asset.v1.GetFeedRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.asset.v1.GetFeedRequest} GetFeedRequest + */ + GetFeedRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.GetFeedRequest) + return object; + var message = new $root.google.cloud.asset.v1.GetFeedRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an ExportAssetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetFeedRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @memberof google.cloud.asset.v1.GetFeedRequest * @static - * @param {google.cloud.asset.v1.ExportAssetsRequest} message ExportAssetsRequest + * @param {google.cloud.asset.v1.GetFeedRequest} message GetFeedRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportAssetsRequest.toObject = function toObject(message, options) { + GetFeedRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.assetTypes = []; - if (options.defaults) { - object.parent = ""; - object.readTime = null; - object.contentType = options.enums === String ? "CONTENT_TYPE_UNSPECIFIED" : 0; - object.outputConfig = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.assetTypes && message.assetTypes.length) { - object.assetTypes = []; - for (var j = 0; j < message.assetTypes.length; ++j) - object.assetTypes[j] = message.assetTypes[j]; - } - if (message.contentType != null && message.hasOwnProperty("contentType")) - object.contentType = options.enums === String ? $root.google.cloud.asset.v1.ContentType[message.contentType] : message.contentType; - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.asset.v1.OutputConfig.toObject(message.outputConfig, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ExportAssetsRequest to JSON. + * Converts this GetFeedRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.ExportAssetsRequest + * @memberof google.cloud.asset.v1.GetFeedRequest * @instance * @returns {Object.} JSON object */ - ExportAssetsRequest.prototype.toJSON = function toJSON() { + GetFeedRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExportAssetsRequest; + return GetFeedRequest; })(); - v1.ExportAssetsResponse = (function() { + v1.ListFeedsRequest = (function() { /** - * Properties of an ExportAssetsResponse. + * Properties of a ListFeedsRequest. * @memberof google.cloud.asset.v1 - * @interface IExportAssetsResponse - * @property {google.protobuf.ITimestamp|null} [readTime] ExportAssetsResponse readTime - * @property {google.cloud.asset.v1.IOutputConfig|null} [outputConfig] ExportAssetsResponse outputConfig + * @interface IListFeedsRequest + * @property {string|null} [parent] ListFeedsRequest parent */ /** - * Constructs a new ExportAssetsResponse. + * Constructs a new ListFeedsRequest. * @memberof google.cloud.asset.v1 - * @classdesc Represents an ExportAssetsResponse. - * @implements IExportAssetsResponse + * @classdesc Represents a ListFeedsRequest. + * @implements IListFeedsRequest * @constructor - * @param {google.cloud.asset.v1.IExportAssetsResponse=} [properties] Properties to set + * @param {google.cloud.asset.v1.IListFeedsRequest=} [properties] Properties to set */ - function ExportAssetsResponse(properties) { + function ListFeedsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1757,88 +1844,75 @@ } /** - * ExportAssetsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.asset.v1.ExportAssetsResponse - * @instance - */ - ExportAssetsResponse.prototype.readTime = null; - - /** - * ExportAssetsResponse outputConfig. - * @member {google.cloud.asset.v1.IOutputConfig|null|undefined} outputConfig - * @memberof google.cloud.asset.v1.ExportAssetsResponse + * ListFeedsRequest parent. + * @member {string} parent + * @memberof google.cloud.asset.v1.ListFeedsRequest * @instance */ - ExportAssetsResponse.prototype.outputConfig = null; + ListFeedsRequest.prototype.parent = ""; /** - * Creates a new ExportAssetsResponse instance using the specified properties. + * Creates a new ListFeedsRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.ExportAssetsResponse + * @memberof google.cloud.asset.v1.ListFeedsRequest * @static - * @param {google.cloud.asset.v1.IExportAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.asset.v1.ExportAssetsResponse} ExportAssetsResponse instance + * @param {google.cloud.asset.v1.IListFeedsRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1.ListFeedsRequest} ListFeedsRequest instance */ - ExportAssetsResponse.create = function create(properties) { - return new ExportAssetsResponse(properties); + ListFeedsRequest.create = function create(properties) { + return new ListFeedsRequest(properties); }; /** - * Encodes the specified ExportAssetsResponse message. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsResponse.verify|verify} messages. + * Encodes the specified ListFeedsRequest message. Does not implicitly {@link google.cloud.asset.v1.ListFeedsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.ExportAssetsResponse + * @memberof google.cloud.asset.v1.ListFeedsRequest * @static - * @param {google.cloud.asset.v1.IExportAssetsResponse} message ExportAssetsResponse message or plain object to encode + * @param {google.cloud.asset.v1.IListFeedsRequest} message ListFeedsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAssetsResponse.encode = function encode(message, writer) { + ListFeedsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - $root.google.cloud.asset.v1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); return writer; }; /** - * Encodes the specified ExportAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ExportAssetsResponse.verify|verify} messages. + * Encodes the specified ListFeedsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ListFeedsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.ExportAssetsResponse + * @memberof google.cloud.asset.v1.ListFeedsRequest * @static - * @param {google.cloud.asset.v1.IExportAssetsResponse} message ExportAssetsResponse message or plain object to encode + * @param {google.cloud.asset.v1.IListFeedsRequest} message ListFeedsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListFeedsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportAssetsResponse message from the specified reader or buffer. + * Decodes a ListFeedsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.ExportAssetsResponse + * @memberof google.cloud.asset.v1.ListFeedsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.ExportAssetsResponse} ExportAssetsResponse + * @returns {google.cloud.asset.v1.ListFeedsRequest} ListFeedsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAssetsResponse.decode = function decode(reader, length) { + ListFeedsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.ExportAssetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.ListFeedsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.outputConfig = $root.google.cloud.asset.v1.OutputConfig.decode(reader, reader.uint32()); + message.parent = reader.string(); break; default: reader.skipType(tag & 7); @@ -1849,248 +1923,187 @@ }; /** - * Decodes an ExportAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListFeedsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.ExportAssetsResponse + * @memberof google.cloud.asset.v1.ListFeedsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.ExportAssetsResponse} ExportAssetsResponse + * @returns {google.cloud.asset.v1.ListFeedsRequest} ListFeedsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + ListFeedsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportAssetsResponse message. + * Verifies a ListFeedsRequest message. * @function verify - * @memberof google.cloud.asset.v1.ExportAssetsResponse + * @memberof google.cloud.asset.v1.ListFeedsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportAssetsResponse.verify = function verify(message) { + ListFeedsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { - var error = $root.google.cloud.asset.v1.OutputConfig.verify(message.outputConfig); - if (error) - return "outputConfig." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; return null; }; /** - * Creates an ExportAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListFeedsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.ExportAssetsResponse + * @memberof google.cloud.asset.v1.ListFeedsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.ExportAssetsResponse} ExportAssetsResponse + * @returns {google.cloud.asset.v1.ListFeedsRequest} ListFeedsRequest */ - ExportAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.ExportAssetsResponse) + ListFeedsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.ListFeedsRequest) return object; - var message = new $root.google.cloud.asset.v1.ExportAssetsResponse(); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.asset.v1.ExportAssetsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") - throw TypeError(".google.cloud.asset.v1.ExportAssetsResponse.outputConfig: object expected"); - message.outputConfig = $root.google.cloud.asset.v1.OutputConfig.fromObject(object.outputConfig); - } + var message = new $root.google.cloud.asset.v1.ListFeedsRequest(); + if (object.parent != null) + message.parent = String(object.parent); return message; }; /** - * Creates a plain object from an ExportAssetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListFeedsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.ExportAssetsResponse + * @memberof google.cloud.asset.v1.ListFeedsRequest * @static - * @param {google.cloud.asset.v1.ExportAssetsResponse} message ExportAssetsResponse + * @param {google.cloud.asset.v1.ListFeedsRequest} message ListFeedsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportAssetsResponse.toObject = function toObject(message, options) { + ListFeedsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.readTime = null; - object.outputConfig = null; - } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.asset.v1.OutputConfig.toObject(message.outputConfig, options); + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; return object; }; /** - * Converts this ExportAssetsResponse to JSON. + * Converts this ListFeedsRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.ExportAssetsResponse + * @memberof google.cloud.asset.v1.ListFeedsRequest * @instance * @returns {Object.} JSON object */ - ExportAssetsResponse.prototype.toJSON = function toJSON() { + ListFeedsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExportAssetsResponse; + return ListFeedsRequest; })(); - v1.BatchGetAssetsHistoryRequest = (function() { - - /** - * Properties of a BatchGetAssetsHistoryRequest. - * @memberof google.cloud.asset.v1 - * @interface IBatchGetAssetsHistoryRequest - * @property {string|null} [parent] BatchGetAssetsHistoryRequest parent - * @property {Array.|null} [assetNames] BatchGetAssetsHistoryRequest assetNames - * @property {google.cloud.asset.v1.ContentType|null} [contentType] BatchGetAssetsHistoryRequest contentType - * @property {google.cloud.asset.v1.ITimeWindow|null} [readTimeWindow] BatchGetAssetsHistoryRequest readTimeWindow - */ - - /** - * Constructs a new BatchGetAssetsHistoryRequest. - * @memberof google.cloud.asset.v1 - * @classdesc Represents a BatchGetAssetsHistoryRequest. - * @implements IBatchGetAssetsHistoryRequest - * @constructor - * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest=} [properties] Properties to set - */ - function BatchGetAssetsHistoryRequest(properties) { - this.assetNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BatchGetAssetsHistoryRequest parent. - * @member {string} parent - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest - * @instance - */ - BatchGetAssetsHistoryRequest.prototype.parent = ""; + v1.ListFeedsResponse = (function() { /** - * BatchGetAssetsHistoryRequest assetNames. - * @member {Array.} assetNames - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest - * @instance + * Properties of a ListFeedsResponse. + * @memberof google.cloud.asset.v1 + * @interface IListFeedsResponse + * @property {Array.|null} [feeds] ListFeedsResponse feeds */ - BatchGetAssetsHistoryRequest.prototype.assetNames = $util.emptyArray; /** - * BatchGetAssetsHistoryRequest contentType. - * @member {google.cloud.asset.v1.ContentType} contentType - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest - * @instance + * Constructs a new ListFeedsResponse. + * @memberof google.cloud.asset.v1 + * @classdesc Represents a ListFeedsResponse. + * @implements IListFeedsResponse + * @constructor + * @param {google.cloud.asset.v1.IListFeedsResponse=} [properties] Properties to set */ - BatchGetAssetsHistoryRequest.prototype.contentType = 0; + function ListFeedsResponse(properties) { + this.feeds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * BatchGetAssetsHistoryRequest readTimeWindow. - * @member {google.cloud.asset.v1.ITimeWindow|null|undefined} readTimeWindow - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest + * ListFeedsResponse feeds. + * @member {Array.} feeds + * @memberof google.cloud.asset.v1.ListFeedsResponse * @instance */ - BatchGetAssetsHistoryRequest.prototype.readTimeWindow = null; + ListFeedsResponse.prototype.feeds = $util.emptyArray; /** - * Creates a new BatchGetAssetsHistoryRequest instance using the specified properties. + * Creates a new ListFeedsResponse instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1.ListFeedsResponse * @static - * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest instance + * @param {google.cloud.asset.v1.IListFeedsResponse=} [properties] Properties to set + * @returns {google.cloud.asset.v1.ListFeedsResponse} ListFeedsResponse instance */ - BatchGetAssetsHistoryRequest.create = function create(properties) { - return new BatchGetAssetsHistoryRequest(properties); + ListFeedsResponse.create = function create(properties) { + return new ListFeedsResponse(properties); }; /** - * Encodes the specified BatchGetAssetsHistoryRequest message. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryRequest.verify|verify} messages. + * Encodes the specified ListFeedsResponse message. Does not implicitly {@link google.cloud.asset.v1.ListFeedsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1.ListFeedsResponse * @static - * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest message or plain object to encode + * @param {google.cloud.asset.v1.IListFeedsResponse} message ListFeedsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchGetAssetsHistoryRequest.encode = function encode(message, writer) { + ListFeedsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.assetNames != null && message.assetNames.length) - for (var i = 0; i < message.assetNames.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetNames[i]); - if (message.contentType != null && message.hasOwnProperty("contentType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contentType); - if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) - $root.google.cloud.asset.v1.TimeWindow.encode(message.readTimeWindow, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.feeds != null && message.feeds.length) + for (var i = 0; i < message.feeds.length; ++i) + $root.google.cloud.asset.v1.Feed.encode(message.feeds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchGetAssetsHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryRequest.verify|verify} messages. + * Encodes the specified ListFeedsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ListFeedsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1.ListFeedsResponse * @static - * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest message or plain object to encode + * @param {google.cloud.asset.v1.IListFeedsResponse} message ListFeedsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchGetAssetsHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListFeedsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer. + * Decodes a ListFeedsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1.ListFeedsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest + * @returns {google.cloud.asset.v1.ListFeedsResponse} ListFeedsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchGetAssetsHistoryRequest.decode = function decode(reader, length) { + ListFeedsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.BatchGetAssetsHistoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.ListFeedsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - if (!(message.assetNames && message.assetNames.length)) - message.assetNames = []; - message.assetNames.push(reader.string()); - break; - case 3: - message.contentType = reader.int32(); - break; - case 4: - message.readTimeWindow = $root.google.cloud.asset.v1.TimeWindow.decode(reader, reader.uint32()); + if (!(message.feeds && message.feeds.length)) + message.feeds = []; + message.feeds.push($root.google.cloud.asset.v1.Feed.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -2101,179 +2114,125 @@ }; /** - * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFeedsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1.ListFeedsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest + * @returns {google.cloud.asset.v1.ListFeedsResponse} ListFeedsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchGetAssetsHistoryRequest.decodeDelimited = function decodeDelimited(reader) { + ListFeedsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchGetAssetsHistoryRequest message. + * Verifies a ListFeedsResponse message. * @function verify - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1.ListFeedsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchGetAssetsHistoryRequest.verify = function verify(message) { + ListFeedsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.assetNames != null && message.hasOwnProperty("assetNames")) { - if (!Array.isArray(message.assetNames)) - return "assetNames: array expected"; - for (var i = 0; i < message.assetNames.length; ++i) - if (!$util.isString(message.assetNames[i])) - return "assetNames: string[] expected"; - } - if (message.contentType != null && message.hasOwnProperty("contentType")) - switch (message.contentType) { - default: - return "contentType: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 5: - break; + if (message.feeds != null && message.hasOwnProperty("feeds")) { + if (!Array.isArray(message.feeds)) + return "feeds: array expected"; + for (var i = 0; i < message.feeds.length; ++i) { + var error = $root.google.cloud.asset.v1.Feed.verify(message.feeds[i]); + if (error) + return "feeds." + error; } - if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) { - var error = $root.google.cloud.asset.v1.TimeWindow.verify(message.readTimeWindow); - if (error) - return "readTimeWindow." + error; } return null; }; /** - * Creates a BatchGetAssetsHistoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFeedsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1.ListFeedsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest + * @returns {google.cloud.asset.v1.ListFeedsResponse} ListFeedsResponse */ - BatchGetAssetsHistoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) + ListFeedsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.ListFeedsResponse) return object; - var message = new $root.google.cloud.asset.v1.BatchGetAssetsHistoryRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.assetNames) { - if (!Array.isArray(object.assetNames)) - throw TypeError(".google.cloud.asset.v1.BatchGetAssetsHistoryRequest.assetNames: array expected"); - message.assetNames = []; - for (var i = 0; i < object.assetNames.length; ++i) - message.assetNames[i] = String(object.assetNames[i]); - } - switch (object.contentType) { - case "CONTENT_TYPE_UNSPECIFIED": - case 0: - message.contentType = 0; - break; - case "RESOURCE": - case 1: - message.contentType = 1; - break; - case "IAM_POLICY": - case 2: - message.contentType = 2; - break; - case "ORG_POLICY": - case 4: - message.contentType = 4; - break; - case "ACCESS_POLICY": - case 5: - message.contentType = 5; - break; - } - if (object.readTimeWindow != null) { - if (typeof object.readTimeWindow !== "object") - throw TypeError(".google.cloud.asset.v1.BatchGetAssetsHistoryRequest.readTimeWindow: object expected"); - message.readTimeWindow = $root.google.cloud.asset.v1.TimeWindow.fromObject(object.readTimeWindow); + var message = new $root.google.cloud.asset.v1.ListFeedsResponse(); + if (object.feeds) { + if (!Array.isArray(object.feeds)) + throw TypeError(".google.cloud.asset.v1.ListFeedsResponse.feeds: array expected"); + message.feeds = []; + for (var i = 0; i < object.feeds.length; ++i) { + if (typeof object.feeds[i] !== "object") + throw TypeError(".google.cloud.asset.v1.ListFeedsResponse.feeds: object expected"); + message.feeds[i] = $root.google.cloud.asset.v1.Feed.fromObject(object.feeds[i]); + } } return message; }; /** - * Creates a plain object from a BatchGetAssetsHistoryRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListFeedsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1.ListFeedsResponse * @static - * @param {google.cloud.asset.v1.BatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest + * @param {google.cloud.asset.v1.ListFeedsResponse} message ListFeedsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchGetAssetsHistoryRequest.toObject = function toObject(message, options) { + ListFeedsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.assetNames = []; - if (options.defaults) { - object.parent = ""; - object.contentType = options.enums === String ? "CONTENT_TYPE_UNSPECIFIED" : 0; - object.readTimeWindow = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.assetNames && message.assetNames.length) { - object.assetNames = []; - for (var j = 0; j < message.assetNames.length; ++j) - object.assetNames[j] = message.assetNames[j]; + object.feeds = []; + if (message.feeds && message.feeds.length) { + object.feeds = []; + for (var j = 0; j < message.feeds.length; ++j) + object.feeds[j] = $root.google.cloud.asset.v1.Feed.toObject(message.feeds[j], options); } - if (message.contentType != null && message.hasOwnProperty("contentType")) - object.contentType = options.enums === String ? $root.google.cloud.asset.v1.ContentType[message.contentType] : message.contentType; - if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) - object.readTimeWindow = $root.google.cloud.asset.v1.TimeWindow.toObject(message.readTimeWindow, options); return object; }; /** - * Converts this BatchGetAssetsHistoryRequest to JSON. + * Converts this ListFeedsResponse to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1.ListFeedsResponse * @instance * @returns {Object.} JSON object */ - BatchGetAssetsHistoryRequest.prototype.toJSON = function toJSON() { + ListFeedsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchGetAssetsHistoryRequest; + return ListFeedsResponse; })(); - v1.BatchGetAssetsHistoryResponse = (function() { + v1.UpdateFeedRequest = (function() { /** - * Properties of a BatchGetAssetsHistoryResponse. + * Properties of an UpdateFeedRequest. * @memberof google.cloud.asset.v1 - * @interface IBatchGetAssetsHistoryResponse - * @property {Array.|null} [assets] BatchGetAssetsHistoryResponse assets + * @interface IUpdateFeedRequest + * @property {google.cloud.asset.v1.IFeed|null} [feed] UpdateFeedRequest feed + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFeedRequest updateMask */ /** - * Constructs a new BatchGetAssetsHistoryResponse. + * Constructs a new UpdateFeedRequest. * @memberof google.cloud.asset.v1 - * @classdesc Represents a BatchGetAssetsHistoryResponse. - * @implements IBatchGetAssetsHistoryResponse + * @classdesc Represents an UpdateFeedRequest. + * @implements IUpdateFeedRequest * @constructor - * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryResponse=} [properties] Properties to set + * @param {google.cloud.asset.v1.IUpdateFeedRequest=} [properties] Properties to set */ - function BatchGetAssetsHistoryResponse(properties) { - this.assets = []; + function UpdateFeedRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2281,78 +2240,88 @@ } /** - * BatchGetAssetsHistoryResponse assets. - * @member {Array.} assets - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * UpdateFeedRequest feed. + * @member {google.cloud.asset.v1.IFeed|null|undefined} feed + * @memberof google.cloud.asset.v1.UpdateFeedRequest + * @instance + */ + UpdateFeedRequest.prototype.feed = null; + + /** + * UpdateFeedRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.asset.v1.UpdateFeedRequest * @instance */ - BatchGetAssetsHistoryResponse.prototype.assets = $util.emptyArray; + UpdateFeedRequest.prototype.updateMask = null; /** - * Creates a new BatchGetAssetsHistoryResponse instance using the specified properties. + * Creates a new UpdateFeedRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1.UpdateFeedRequest * @static - * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryResponse=} [properties] Properties to set - * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse instance + * @param {google.cloud.asset.v1.IUpdateFeedRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1.UpdateFeedRequest} UpdateFeedRequest instance */ - BatchGetAssetsHistoryResponse.create = function create(properties) { - return new BatchGetAssetsHistoryResponse(properties); + UpdateFeedRequest.create = function create(properties) { + return new UpdateFeedRequest(properties); }; /** - * Encodes the specified BatchGetAssetsHistoryResponse message. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryResponse.verify|verify} messages. + * Encodes the specified UpdateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.UpdateFeedRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1.UpdateFeedRequest * @static - * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse message or plain object to encode + * @param {google.cloud.asset.v1.IUpdateFeedRequest} message UpdateFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchGetAssetsHistoryResponse.encode = function encode(message, writer) { + UpdateFeedRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.assets != null && message.assets.length) - for (var i = 0; i < message.assets.length; ++i) - $root.google.cloud.asset.v1.TemporalAsset.encode(message.assets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.feed != null && message.hasOwnProperty("feed")) + $root.google.cloud.asset.v1.Feed.encode(message.feed, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchGetAssetsHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BatchGetAssetsHistoryResponse.verify|verify} messages. + * Encodes the specified UpdateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.UpdateFeedRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1.UpdateFeedRequest * @static - * @param {google.cloud.asset.v1.IBatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse message or plain object to encode + * @param {google.cloud.asset.v1.IUpdateFeedRequest} message UpdateFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchGetAssetsHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer. + * Decodes an UpdateFeedRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1.UpdateFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse + * @returns {google.cloud.asset.v1.UpdateFeedRequest} UpdateFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchGetAssetsHistoryResponse.decode = function decode(reader, length) { + UpdateFeedRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.BatchGetAssetsHistoryResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.UpdateFeedRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.assets && message.assets.length)) - message.assets = []; - message.assets.push($root.google.cloud.asset.v1.TemporalAsset.decode(reader, reader.uint32())); + message.feed = $root.google.cloud.asset.v1.Feed.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2363,126 +2332,126 @@ }; /** - * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateFeedRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1.UpdateFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse + * @returns {google.cloud.asset.v1.UpdateFeedRequest} UpdateFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchGetAssetsHistoryResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateFeedRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchGetAssetsHistoryResponse message. + * Verifies an UpdateFeedRequest message. * @function verify - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1.UpdateFeedRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchGetAssetsHistoryResponse.verify = function verify(message) { + UpdateFeedRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.assets != null && message.hasOwnProperty("assets")) { - if (!Array.isArray(message.assets)) - return "assets: array expected"; - for (var i = 0; i < message.assets.length; ++i) { - var error = $root.google.cloud.asset.v1.TemporalAsset.verify(message.assets[i]); - if (error) - return "assets." + error; - } + if (message.feed != null && message.hasOwnProperty("feed")) { + var error = $root.google.cloud.asset.v1.Feed.verify(message.feed); + if (error) + return "feed." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } return null; }; /** - * Creates a BatchGetAssetsHistoryResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFeedRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1.UpdateFeedRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse + * @returns {google.cloud.asset.v1.UpdateFeedRequest} UpdateFeedRequest */ - BatchGetAssetsHistoryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.BatchGetAssetsHistoryResponse) + UpdateFeedRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.UpdateFeedRequest) return object; - var message = new $root.google.cloud.asset.v1.BatchGetAssetsHistoryResponse(); - if (object.assets) { - if (!Array.isArray(object.assets)) - throw TypeError(".google.cloud.asset.v1.BatchGetAssetsHistoryResponse.assets: array expected"); - message.assets = []; - for (var i = 0; i < object.assets.length; ++i) { - if (typeof object.assets[i] !== "object") - throw TypeError(".google.cloud.asset.v1.BatchGetAssetsHistoryResponse.assets: object expected"); - message.assets[i] = $root.google.cloud.asset.v1.TemporalAsset.fromObject(object.assets[i]); - } + var message = new $root.google.cloud.asset.v1.UpdateFeedRequest(); + if (object.feed != null) { + if (typeof object.feed !== "object") + throw TypeError(".google.cloud.asset.v1.UpdateFeedRequest.feed: object expected"); + message.feed = $root.google.cloud.asset.v1.Feed.fromObject(object.feed); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.asset.v1.UpdateFeedRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a BatchGetAssetsHistoryResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateFeedRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1.UpdateFeedRequest * @static - * @param {google.cloud.asset.v1.BatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse + * @param {google.cloud.asset.v1.UpdateFeedRequest} message UpdateFeedRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchGetAssetsHistoryResponse.toObject = function toObject(message, options) { + UpdateFeedRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.assets = []; - if (message.assets && message.assets.length) { - object.assets = []; - for (var j = 0; j < message.assets.length; ++j) - object.assets[j] = $root.google.cloud.asset.v1.TemporalAsset.toObject(message.assets[j], options); + if (options.defaults) { + object.feed = null; + object.updateMask = null; } + if (message.feed != null && message.hasOwnProperty("feed")) + object.feed = $root.google.cloud.asset.v1.Feed.toObject(message.feed, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this BatchGetAssetsHistoryResponse to JSON. + * Converts this UpdateFeedRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1.UpdateFeedRequest * @instance * @returns {Object.} JSON object */ - BatchGetAssetsHistoryResponse.prototype.toJSON = function toJSON() { + UpdateFeedRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchGetAssetsHistoryResponse; + return UpdateFeedRequest; })(); - v1.CreateFeedRequest = (function() { + v1.DeleteFeedRequest = (function() { /** - * Properties of a CreateFeedRequest. + * Properties of a DeleteFeedRequest. * @memberof google.cloud.asset.v1 - * @interface ICreateFeedRequest - * @property {string|null} [parent] CreateFeedRequest parent - * @property {string|null} [feedId] CreateFeedRequest feedId - * @property {google.cloud.asset.v1.IFeed|null} [feed] CreateFeedRequest feed + * @interface IDeleteFeedRequest + * @property {string|null} [name] DeleteFeedRequest name */ /** - * Constructs a new CreateFeedRequest. + * Constructs a new DeleteFeedRequest. * @memberof google.cloud.asset.v1 - * @classdesc Represents a CreateFeedRequest. - * @implements ICreateFeedRequest + * @classdesc Represents a DeleteFeedRequest. + * @implements IDeleteFeedRequest * @constructor - * @param {google.cloud.asset.v1.ICreateFeedRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1.IDeleteFeedRequest=} [properties] Properties to set */ - function CreateFeedRequest(properties) { + function DeleteFeedRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2490,101 +2459,75 @@ } /** - * CreateFeedRequest parent. - * @member {string} parent - * @memberof google.cloud.asset.v1.CreateFeedRequest - * @instance - */ - CreateFeedRequest.prototype.parent = ""; - - /** - * CreateFeedRequest feedId. - * @member {string} feedId - * @memberof google.cloud.asset.v1.CreateFeedRequest - * @instance - */ - CreateFeedRequest.prototype.feedId = ""; - - /** - * CreateFeedRequest feed. - * @member {google.cloud.asset.v1.IFeed|null|undefined} feed - * @memberof google.cloud.asset.v1.CreateFeedRequest + * DeleteFeedRequest name. + * @member {string} name + * @memberof google.cloud.asset.v1.DeleteFeedRequest * @instance */ - CreateFeedRequest.prototype.feed = null; + DeleteFeedRequest.prototype.name = ""; /** - * Creates a new CreateFeedRequest instance using the specified properties. + * Creates a new DeleteFeedRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.CreateFeedRequest + * @memberof google.cloud.asset.v1.DeleteFeedRequest * @static - * @param {google.cloud.asset.v1.ICreateFeedRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1.CreateFeedRequest} CreateFeedRequest instance + * @param {google.cloud.asset.v1.IDeleteFeedRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1.DeleteFeedRequest} DeleteFeedRequest instance */ - CreateFeedRequest.create = function create(properties) { - return new CreateFeedRequest(properties); + DeleteFeedRequest.create = function create(properties) { + return new DeleteFeedRequest(properties); }; /** - * Encodes the specified CreateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.CreateFeedRequest.verify|verify} messages. + * Encodes the specified DeleteFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.DeleteFeedRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.CreateFeedRequest + * @memberof google.cloud.asset.v1.DeleteFeedRequest * @static - * @param {google.cloud.asset.v1.ICreateFeedRequest} message CreateFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1.IDeleteFeedRequest} message DeleteFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFeedRequest.encode = function encode(message, writer) { + DeleteFeedRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.feedId != null && message.hasOwnProperty("feedId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.feedId); - if (message.feed != null && message.hasOwnProperty("feed")) - $root.google.cloud.asset.v1.Feed.encode(message.feed, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.CreateFeedRequest.verify|verify} messages. + * Encodes the specified DeleteFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.DeleteFeedRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.CreateFeedRequest + * @memberof google.cloud.asset.v1.DeleteFeedRequest * @static - * @param {google.cloud.asset.v1.ICreateFeedRequest} message CreateFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1.IDeleteFeedRequest} message DeleteFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateFeedRequest message from the specified reader or buffer. + * Decodes a DeleteFeedRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.CreateFeedRequest + * @memberof google.cloud.asset.v1.DeleteFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.CreateFeedRequest} CreateFeedRequest + * @returns {google.cloud.asset.v1.DeleteFeedRequest} DeleteFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFeedRequest.decode = function decode(reader, length) { + DeleteFeedRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.CreateFeedRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.DeleteFeedRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.feedId = reader.string(); - break; - case 3: - message.feed = $root.google.cloud.asset.v1.Feed.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -2595,129 +2538,108 @@ }; /** - * Decodes a CreateFeedRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFeedRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.CreateFeedRequest + * @memberof google.cloud.asset.v1.DeleteFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.CreateFeedRequest} CreateFeedRequest + * @returns {google.cloud.asset.v1.DeleteFeedRequest} DeleteFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFeedRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteFeedRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateFeedRequest message. + * Verifies a DeleteFeedRequest message. * @function verify - * @memberof google.cloud.asset.v1.CreateFeedRequest + * @memberof google.cloud.asset.v1.DeleteFeedRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateFeedRequest.verify = function verify(message) { + DeleteFeedRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.feedId != null && message.hasOwnProperty("feedId")) - if (!$util.isString(message.feedId)) - return "feedId: string expected"; - if (message.feed != null && message.hasOwnProperty("feed")) { - var error = $root.google.cloud.asset.v1.Feed.verify(message.feed); - if (error) - return "feed." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFeedRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.CreateFeedRequest + * @memberof google.cloud.asset.v1.DeleteFeedRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.CreateFeedRequest} CreateFeedRequest + * @returns {google.cloud.asset.v1.DeleteFeedRequest} DeleteFeedRequest */ - CreateFeedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.CreateFeedRequest) + DeleteFeedRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.DeleteFeedRequest) return object; - var message = new $root.google.cloud.asset.v1.CreateFeedRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.feedId != null) - message.feedId = String(object.feedId); - if (object.feed != null) { - if (typeof object.feed !== "object") - throw TypeError(".google.cloud.asset.v1.CreateFeedRequest.feed: object expected"); - message.feed = $root.google.cloud.asset.v1.Feed.fromObject(object.feed); - } + var message = new $root.google.cloud.asset.v1.DeleteFeedRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateFeedRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteFeedRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.CreateFeedRequest + * @memberof google.cloud.asset.v1.DeleteFeedRequest * @static - * @param {google.cloud.asset.v1.CreateFeedRequest} message CreateFeedRequest + * @param {google.cloud.asset.v1.DeleteFeedRequest} message DeleteFeedRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateFeedRequest.toObject = function toObject(message, options) { + DeleteFeedRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.feedId = ""; - object.feed = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.feedId != null && message.hasOwnProperty("feedId")) - object.feedId = message.feedId; - if (message.feed != null && message.hasOwnProperty("feed")) - object.feed = $root.google.cloud.asset.v1.Feed.toObject(message.feed, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateFeedRequest to JSON. + * Converts this DeleteFeedRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.CreateFeedRequest + * @memberof google.cloud.asset.v1.DeleteFeedRequest * @instance * @returns {Object.} JSON object */ - CreateFeedRequest.prototype.toJSON = function toJSON() { + DeleteFeedRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateFeedRequest; + return DeleteFeedRequest; })(); - v1.GetFeedRequest = (function() { + v1.OutputConfig = (function() { /** - * Properties of a GetFeedRequest. + * Properties of an OutputConfig. * @memberof google.cloud.asset.v1 - * @interface IGetFeedRequest - * @property {string|null} [name] GetFeedRequest name + * @interface IOutputConfig + * @property {google.cloud.asset.v1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination + * @property {google.cloud.asset.v1.IBigQueryDestination|null} [bigqueryDestination] OutputConfig bigqueryDestination */ /** - * Constructs a new GetFeedRequest. + * Constructs a new OutputConfig. * @memberof google.cloud.asset.v1 - * @classdesc Represents a GetFeedRequest. - * @implements IGetFeedRequest + * @classdesc Represents an OutputConfig. + * @implements IOutputConfig * @constructor - * @param {google.cloud.asset.v1.IGetFeedRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1.IOutputConfig=} [properties] Properties to set */ - function GetFeedRequest(properties) { + function OutputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2725,75 +2647,102 @@ } /** - * GetFeedRequest name. - * @member {string} name - * @memberof google.cloud.asset.v1.GetFeedRequest + * OutputConfig gcsDestination. + * @member {google.cloud.asset.v1.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.asset.v1.OutputConfig * @instance */ - GetFeedRequest.prototype.name = ""; + OutputConfig.prototype.gcsDestination = null; /** - * Creates a new GetFeedRequest instance using the specified properties. + * OutputConfig bigqueryDestination. + * @member {google.cloud.asset.v1.IBigQueryDestination|null|undefined} bigqueryDestination + * @memberof google.cloud.asset.v1.OutputConfig + * @instance + */ + OutputConfig.prototype.bigqueryDestination = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OutputConfig destination. + * @member {"gcsDestination"|"bigqueryDestination"|undefined} destination + * @memberof google.cloud.asset.v1.OutputConfig + * @instance + */ + Object.defineProperty(OutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination", "bigqueryDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OutputConfig instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.GetFeedRequest + * @memberof google.cloud.asset.v1.OutputConfig * @static - * @param {google.cloud.asset.v1.IGetFeedRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1.GetFeedRequest} GetFeedRequest instance + * @param {google.cloud.asset.v1.IOutputConfig=} [properties] Properties to set + * @returns {google.cloud.asset.v1.OutputConfig} OutputConfig instance */ - GetFeedRequest.create = function create(properties) { - return new GetFeedRequest(properties); + OutputConfig.create = function create(properties) { + return new OutputConfig(properties); }; /** - * Encodes the specified GetFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.GetFeedRequest.verify|verify} messages. + * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.asset.v1.OutputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.GetFeedRequest + * @memberof google.cloud.asset.v1.OutputConfig * @static - * @param {google.cloud.asset.v1.IGetFeedRequest} message GetFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1.IOutputConfig} message OutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFeedRequest.encode = function encode(message, writer) { + OutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) + $root.google.cloud.asset.v1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) + $root.google.cloud.asset.v1.BigQueryDestination.encode(message.bigqueryDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.GetFeedRequest.verify|verify} messages. + * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1.OutputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.GetFeedRequest + * @memberof google.cloud.asset.v1.OutputConfig * @static - * @param {google.cloud.asset.v1.IGetFeedRequest} message GetFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1.IOutputConfig} message OutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { + OutputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFeedRequest message from the specified reader or buffer. + * Decodes an OutputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.GetFeedRequest + * @memberof google.cloud.asset.v1.OutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.GetFeedRequest} GetFeedRequest + * @returns {google.cloud.asset.v1.OutputConfig} OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFeedRequest.decode = function decode(reader, length) { + OutputConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.GetFeedRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.OutputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.gcsDestination = $root.google.cloud.asset.v1.GcsDestination.decode(reader, reader.uint32()); + break; + case 2: + message.bigqueryDestination = $root.google.cloud.asset.v1.BigQueryDestination.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2804,107 +2753,138 @@ }; /** - * Decodes a GetFeedRequest message from the specified reader or buffer, length delimited. + * Decodes an OutputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.GetFeedRequest + * @memberof google.cloud.asset.v1.OutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.GetFeedRequest} GetFeedRequest + * @returns {google.cloud.asset.v1.OutputConfig} OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFeedRequest.decodeDelimited = function decodeDelimited(reader) { + OutputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFeedRequest message. + * Verifies an OutputConfig message. * @function verify - * @memberof google.cloud.asset.v1.GetFeedRequest + * @memberof google.cloud.asset.v1.OutputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFeedRequest.verify = function verify(message) { + OutputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.asset.v1.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } + } + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { + if (properties.destination === 1) + return "destination: multiple values"; + properties.destination = 1; + { + var error = $root.google.cloud.asset.v1.BigQueryDestination.verify(message.bigqueryDestination); + if (error) + return "bigqueryDestination." + error; + } + } return null; }; /** - * Creates a GetFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.GetFeedRequest + * @memberof google.cloud.asset.v1.OutputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.GetFeedRequest} GetFeedRequest + * @returns {google.cloud.asset.v1.OutputConfig} OutputConfig */ - GetFeedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.GetFeedRequest) + OutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.OutputConfig) return object; - var message = new $root.google.cloud.asset.v1.GetFeedRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.asset.v1.OutputConfig(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.asset.v1.OutputConfig.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.asset.v1.GcsDestination.fromObject(object.gcsDestination); + } + if (object.bigqueryDestination != null) { + if (typeof object.bigqueryDestination !== "object") + throw TypeError(".google.cloud.asset.v1.OutputConfig.bigqueryDestination: object expected"); + message.bigqueryDestination = $root.google.cloud.asset.v1.BigQueryDestination.fromObject(object.bigqueryDestination); + } return message; }; /** - * Creates a plain object from a GetFeedRequest message. Also converts values to other types if specified. + * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.GetFeedRequest + * @memberof google.cloud.asset.v1.OutputConfig * @static - * @param {google.cloud.asset.v1.GetFeedRequest} message GetFeedRequest + * @param {google.cloud.asset.v1.OutputConfig} message OutputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFeedRequest.toObject = function toObject(message, options) { + OutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.asset.v1.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.destination = "gcsDestination"; + } + if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { + object.bigqueryDestination = $root.google.cloud.asset.v1.BigQueryDestination.toObject(message.bigqueryDestination, options); + if (options.oneofs) + object.destination = "bigqueryDestination"; + } return object; }; /** - * Converts this GetFeedRequest to JSON. + * Converts this OutputConfig to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.GetFeedRequest + * @memberof google.cloud.asset.v1.OutputConfig * @instance * @returns {Object.} JSON object */ - GetFeedRequest.prototype.toJSON = function toJSON() { + OutputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetFeedRequest; + return OutputConfig; })(); - v1.ListFeedsRequest = (function() { + v1.GcsDestination = (function() { /** - * Properties of a ListFeedsRequest. + * Properties of a GcsDestination. * @memberof google.cloud.asset.v1 - * @interface IListFeedsRequest - * @property {string|null} [parent] ListFeedsRequest parent + * @interface IGcsDestination + * @property {string|null} [uri] GcsDestination uri + * @property {string|null} [uriPrefix] GcsDestination uriPrefix */ /** - * Constructs a new ListFeedsRequest. + * Constructs a new GcsDestination. * @memberof google.cloud.asset.v1 - * @classdesc Represents a ListFeedsRequest. - * @implements IListFeedsRequest + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination * @constructor - * @param {google.cloud.asset.v1.IListFeedsRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1.IGcsDestination=} [properties] Properties to set */ - function ListFeedsRequest(properties) { + function GcsDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2912,75 +2892,102 @@ } /** - * ListFeedsRequest parent. - * @member {string} parent - * @memberof google.cloud.asset.v1.ListFeedsRequest + * GcsDestination uri. + * @member {string} uri + * @memberof google.cloud.asset.v1.GcsDestination * @instance */ - ListFeedsRequest.prototype.parent = ""; + GcsDestination.prototype.uri = ""; /** - * Creates a new ListFeedsRequest instance using the specified properties. + * GcsDestination uriPrefix. + * @member {string} uriPrefix + * @memberof google.cloud.asset.v1.GcsDestination + * @instance + */ + GcsDestination.prototype.uriPrefix = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GcsDestination objectUri. + * @member {"uri"|"uriPrefix"|undefined} objectUri + * @memberof google.cloud.asset.v1.GcsDestination + * @instance + */ + Object.defineProperty(GcsDestination.prototype, "objectUri", { + get: $util.oneOfGetter($oneOfFields = ["uri", "uriPrefix"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GcsDestination instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.ListFeedsRequest + * @memberof google.cloud.asset.v1.GcsDestination * @static - * @param {google.cloud.asset.v1.IListFeedsRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1.ListFeedsRequest} ListFeedsRequest instance + * @param {google.cloud.asset.v1.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.asset.v1.GcsDestination} GcsDestination instance */ - ListFeedsRequest.create = function create(properties) { - return new ListFeedsRequest(properties); + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); }; /** - * Encodes the specified ListFeedsRequest message. Does not implicitly {@link google.cloud.asset.v1.ListFeedsRequest.verify|verify} messages. + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.asset.v1.GcsDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.ListFeedsRequest + * @memberof google.cloud.asset.v1.GcsDestination * @static - * @param {google.cloud.asset.v1.IListFeedsRequest} message ListFeedsRequest message or plain object to encode + * @param {google.cloud.asset.v1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeedsRequest.encode = function encode(message, writer) { + GcsDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.uri != null && message.hasOwnProperty("uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uriPrefix); return writer; }; /** - * Encodes the specified ListFeedsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ListFeedsRequest.verify|verify} messages. + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.GcsDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.ListFeedsRequest + * @memberof google.cloud.asset.v1.GcsDestination * @static - * @param {google.cloud.asset.v1.IListFeedsRequest} message ListFeedsRequest message or plain object to encode + * @param {google.cloud.asset.v1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeedsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFeedsRequest message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.ListFeedsRequest + * @memberof google.cloud.asset.v1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.ListFeedsRequest} ListFeedsRequest + * @returns {google.cloud.asset.v1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeedsRequest.decode = function decode(reader, length) { + GcsDestination.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.ListFeedsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.GcsDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.uri = reader.string(); + break; + case 2: + message.uriPrefix = reader.string(); break; default: reader.skipType(tag & 7); @@ -2991,108 +2998,127 @@ }; /** - * Decodes a ListFeedsRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.ListFeedsRequest + * @memberof google.cloud.asset.v1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.ListFeedsRequest} ListFeedsRequest + * @returns {google.cloud.asset.v1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeedsRequest.decodeDelimited = function decodeDelimited(reader) { + GcsDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFeedsRequest message. + * Verifies a GcsDestination message. * @function verify - * @memberof google.cloud.asset.v1.ListFeedsRequest + * @memberof google.cloud.asset.v1.GcsDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFeedsRequest.verify = function verify(message) { + GcsDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; + var properties = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + properties.objectUri = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) { + if (properties.objectUri === 1) + return "objectUri: multiple values"; + properties.objectUri = 1; + if (!$util.isString(message.uriPrefix)) + return "uriPrefix: string expected"; + } return null; }; /** - * Creates a ListFeedsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.ListFeedsRequest + * @memberof google.cloud.asset.v1.GcsDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.ListFeedsRequest} ListFeedsRequest + * @returns {google.cloud.asset.v1.GcsDestination} GcsDestination */ - ListFeedsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.ListFeedsRequest) + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.GcsDestination) return object; - var message = new $root.google.cloud.asset.v1.ListFeedsRequest(); - if (object.parent != null) - message.parent = String(object.parent); + var message = new $root.google.cloud.asset.v1.GcsDestination(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.uriPrefix != null) + message.uriPrefix = String(object.uriPrefix); return message; }; /** - * Creates a plain object from a ListFeedsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.ListFeedsRequest + * @memberof google.cloud.asset.v1.GcsDestination * @static - * @param {google.cloud.asset.v1.ListFeedsRequest} message ListFeedsRequest + * @param {google.cloud.asset.v1.GcsDestination} message GcsDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFeedsRequest.toObject = function toObject(message, options) { + GcsDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.objectUri = "uri"; + } + if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) { + object.uriPrefix = message.uriPrefix; + if (options.oneofs) + object.objectUri = "uriPrefix"; + } return object; }; /** - * Converts this ListFeedsRequest to JSON. + * Converts this GcsDestination to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.ListFeedsRequest + * @memberof google.cloud.asset.v1.GcsDestination * @instance * @returns {Object.} JSON object */ - ListFeedsRequest.prototype.toJSON = function toJSON() { + GcsDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListFeedsRequest; + return GcsDestination; })(); - v1.ListFeedsResponse = (function() { + v1.BigQueryDestination = (function() { /** - * Properties of a ListFeedsResponse. + * Properties of a BigQueryDestination. * @memberof google.cloud.asset.v1 - * @interface IListFeedsResponse - * @property {Array.|null} [feeds] ListFeedsResponse feeds + * @interface IBigQueryDestination + * @property {string|null} [dataset] BigQueryDestination dataset + * @property {string|null} [table] BigQueryDestination table + * @property {boolean|null} [force] BigQueryDestination force */ /** - * Constructs a new ListFeedsResponse. + * Constructs a new BigQueryDestination. * @memberof google.cloud.asset.v1 - * @classdesc Represents a ListFeedsResponse. - * @implements IListFeedsResponse + * @classdesc Represents a BigQueryDestination. + * @implements IBigQueryDestination * @constructor - * @param {google.cloud.asset.v1.IListFeedsResponse=} [properties] Properties to set + * @param {google.cloud.asset.v1.IBigQueryDestination=} [properties] Properties to set */ - function ListFeedsResponse(properties) { - this.feeds = []; + function BigQueryDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3100,78 +3126,101 @@ } /** - * ListFeedsResponse feeds. - * @member {Array.} feeds - * @memberof google.cloud.asset.v1.ListFeedsResponse + * BigQueryDestination dataset. + * @member {string} dataset + * @memberof google.cloud.asset.v1.BigQueryDestination * @instance */ - ListFeedsResponse.prototype.feeds = $util.emptyArray; + BigQueryDestination.prototype.dataset = ""; /** - * Creates a new ListFeedsResponse instance using the specified properties. + * BigQueryDestination table. + * @member {string} table + * @memberof google.cloud.asset.v1.BigQueryDestination + * @instance + */ + BigQueryDestination.prototype.table = ""; + + /** + * BigQueryDestination force. + * @member {boolean} force + * @memberof google.cloud.asset.v1.BigQueryDestination + * @instance + */ + BigQueryDestination.prototype.force = false; + + /** + * Creates a new BigQueryDestination instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.ListFeedsResponse + * @memberof google.cloud.asset.v1.BigQueryDestination * @static - * @param {google.cloud.asset.v1.IListFeedsResponse=} [properties] Properties to set - * @returns {google.cloud.asset.v1.ListFeedsResponse} ListFeedsResponse instance + * @param {google.cloud.asset.v1.IBigQueryDestination=} [properties] Properties to set + * @returns {google.cloud.asset.v1.BigQueryDestination} BigQueryDestination instance */ - ListFeedsResponse.create = function create(properties) { - return new ListFeedsResponse(properties); + BigQueryDestination.create = function create(properties) { + return new BigQueryDestination(properties); }; /** - * Encodes the specified ListFeedsResponse message. Does not implicitly {@link google.cloud.asset.v1.ListFeedsResponse.verify|verify} messages. + * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.cloud.asset.v1.BigQueryDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.ListFeedsResponse + * @memberof google.cloud.asset.v1.BigQueryDestination * @static - * @param {google.cloud.asset.v1.IListFeedsResponse} message ListFeedsResponse message or plain object to encode + * @param {google.cloud.asset.v1.IBigQueryDestination} message BigQueryDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeedsResponse.encode = function encode(message, writer) { + BigQueryDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.feeds != null && message.feeds.length) - for (var i = 0; i < message.feeds.length; ++i) - $root.google.cloud.asset.v1.Feed.encode(message.feeds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dataset != null && message.hasOwnProperty("dataset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); + if (message.table != null && message.hasOwnProperty("table")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); + if (message.force != null && message.hasOwnProperty("force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified ListFeedsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1.ListFeedsResponse.verify|verify} messages. + * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BigQueryDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.ListFeedsResponse + * @memberof google.cloud.asset.v1.BigQueryDestination * @static - * @param {google.cloud.asset.v1.IListFeedsResponse} message ListFeedsResponse message or plain object to encode + * @param {google.cloud.asset.v1.IBigQueryDestination} message BigQueryDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeedsResponse.encodeDelimited = function encodeDelimited(message, writer) { + BigQueryDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFeedsResponse message from the specified reader or buffer. + * Decodes a BigQueryDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.ListFeedsResponse + * @memberof google.cloud.asset.v1.BigQueryDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.ListFeedsResponse} ListFeedsResponse + * @returns {google.cloud.asset.v1.BigQueryDestination} BigQueryDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeedsResponse.decode = function decode(reader, length) { + BigQueryDestination.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.ListFeedsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.BigQueryDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.feeds && message.feeds.length)) - message.feeds = []; - message.feeds.push($root.google.cloud.asset.v1.Feed.decode(reader, reader.uint32())); + message.dataset = reader.string(); + break; + case 2: + message.table = reader.string(); + break; + case 3: + message.force = reader.bool(); break; default: reader.skipType(tag & 7); @@ -3182,125 +3231,124 @@ }; /** - * Decodes a ListFeedsResponse message from the specified reader or buffer, length delimited. + * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.ListFeedsResponse + * @memberof google.cloud.asset.v1.BigQueryDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.ListFeedsResponse} ListFeedsResponse + * @returns {google.cloud.asset.v1.BigQueryDestination} BigQueryDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeedsResponse.decodeDelimited = function decodeDelimited(reader) { + BigQueryDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFeedsResponse message. + * Verifies a BigQueryDestination message. * @function verify - * @memberof google.cloud.asset.v1.ListFeedsResponse + * @memberof google.cloud.asset.v1.BigQueryDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFeedsResponse.verify = function verify(message) { + BigQueryDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.feeds != null && message.hasOwnProperty("feeds")) { - if (!Array.isArray(message.feeds)) - return "feeds: array expected"; - for (var i = 0; i < message.feeds.length; ++i) { - var error = $root.google.cloud.asset.v1.Feed.verify(message.feeds[i]); - if (error) - return "feeds." + error; - } - } + if (message.dataset != null && message.hasOwnProperty("dataset")) + if (!$util.isString(message.dataset)) + return "dataset: string expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a ListFeedsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.ListFeedsResponse + * @memberof google.cloud.asset.v1.BigQueryDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.ListFeedsResponse} ListFeedsResponse + * @returns {google.cloud.asset.v1.BigQueryDestination} BigQueryDestination */ - ListFeedsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.ListFeedsResponse) + BigQueryDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.BigQueryDestination) return object; - var message = new $root.google.cloud.asset.v1.ListFeedsResponse(); - if (object.feeds) { - if (!Array.isArray(object.feeds)) - throw TypeError(".google.cloud.asset.v1.ListFeedsResponse.feeds: array expected"); - message.feeds = []; - for (var i = 0; i < object.feeds.length; ++i) { - if (typeof object.feeds[i] !== "object") - throw TypeError(".google.cloud.asset.v1.ListFeedsResponse.feeds: object expected"); - message.feeds[i] = $root.google.cloud.asset.v1.Feed.fromObject(object.feeds[i]); - } - } + var message = new $root.google.cloud.asset.v1.BigQueryDestination(); + if (object.dataset != null) + message.dataset = String(object.dataset); + if (object.table != null) + message.table = String(object.table); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a ListFeedsResponse message. Also converts values to other types if specified. + * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.ListFeedsResponse + * @memberof google.cloud.asset.v1.BigQueryDestination * @static - * @param {google.cloud.asset.v1.ListFeedsResponse} message ListFeedsResponse + * @param {google.cloud.asset.v1.BigQueryDestination} message BigQueryDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFeedsResponse.toObject = function toObject(message, options) { + BigQueryDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.feeds = []; - if (message.feeds && message.feeds.length) { - object.feeds = []; - for (var j = 0; j < message.feeds.length; ++j) - object.feeds[j] = $root.google.cloud.asset.v1.Feed.toObject(message.feeds[j], options); + if (options.defaults) { + object.dataset = ""; + object.table = ""; + object.force = false; } + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = message.dataset; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this ListFeedsResponse to JSON. + * Converts this BigQueryDestination to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.ListFeedsResponse + * @memberof google.cloud.asset.v1.BigQueryDestination * @instance * @returns {Object.} JSON object */ - ListFeedsResponse.prototype.toJSON = function toJSON() { + BigQueryDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListFeedsResponse; + return BigQueryDestination; })(); - v1.UpdateFeedRequest = (function() { + v1.PubsubDestination = (function() { /** - * Properties of an UpdateFeedRequest. + * Properties of a PubsubDestination. * @memberof google.cloud.asset.v1 - * @interface IUpdateFeedRequest - * @property {google.cloud.asset.v1.IFeed|null} [feed] UpdateFeedRequest feed - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFeedRequest updateMask + * @interface IPubsubDestination + * @property {string|null} [topic] PubsubDestination topic */ /** - * Constructs a new UpdateFeedRequest. + * Constructs a new PubsubDestination. * @memberof google.cloud.asset.v1 - * @classdesc Represents an UpdateFeedRequest. - * @implements IUpdateFeedRequest + * @classdesc Represents a PubsubDestination. + * @implements IPubsubDestination * @constructor - * @param {google.cloud.asset.v1.IUpdateFeedRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1.IPubsubDestination=} [properties] Properties to set */ - function UpdateFeedRequest(properties) { + function PubsubDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3308,88 +3356,75 @@ } /** - * UpdateFeedRequest feed. - * @member {google.cloud.asset.v1.IFeed|null|undefined} feed - * @memberof google.cloud.asset.v1.UpdateFeedRequest - * @instance - */ - UpdateFeedRequest.prototype.feed = null; - - /** - * UpdateFeedRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.asset.v1.UpdateFeedRequest + * PubsubDestination topic. + * @member {string} topic + * @memberof google.cloud.asset.v1.PubsubDestination * @instance */ - UpdateFeedRequest.prototype.updateMask = null; + PubsubDestination.prototype.topic = ""; /** - * Creates a new UpdateFeedRequest instance using the specified properties. + * Creates a new PubsubDestination instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.UpdateFeedRequest + * @memberof google.cloud.asset.v1.PubsubDestination * @static - * @param {google.cloud.asset.v1.IUpdateFeedRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1.UpdateFeedRequest} UpdateFeedRequest instance + * @param {google.cloud.asset.v1.IPubsubDestination=} [properties] Properties to set + * @returns {google.cloud.asset.v1.PubsubDestination} PubsubDestination instance */ - UpdateFeedRequest.create = function create(properties) { - return new UpdateFeedRequest(properties); + PubsubDestination.create = function create(properties) { + return new PubsubDestination(properties); }; /** - * Encodes the specified UpdateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.UpdateFeedRequest.verify|verify} messages. + * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.asset.v1.PubsubDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.UpdateFeedRequest + * @memberof google.cloud.asset.v1.PubsubDestination * @static - * @param {google.cloud.asset.v1.IUpdateFeedRequest} message UpdateFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1.IPubsubDestination} message PubsubDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFeedRequest.encode = function encode(message, writer) { + PubsubDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.feed != null && message.hasOwnProperty("feed")) - $root.google.cloud.asset.v1.Feed.encode(message.feed, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.topic != null && message.hasOwnProperty("topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); return writer; }; /** - * Encodes the specified UpdateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.UpdateFeedRequest.verify|verify} messages. + * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.PubsubDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.UpdateFeedRequest + * @memberof google.cloud.asset.v1.PubsubDestination * @static - * @param {google.cloud.asset.v1.IUpdateFeedRequest} message UpdateFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1.IPubsubDestination} message PubsubDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { + PubsubDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateFeedRequest message from the specified reader or buffer. + * Decodes a PubsubDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.UpdateFeedRequest + * @memberof google.cloud.asset.v1.PubsubDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.UpdateFeedRequest} UpdateFeedRequest + * @returns {google.cloud.asset.v1.PubsubDestination} PubsubDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFeedRequest.decode = function decode(reader, length) { + PubsubDestination.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.UpdateFeedRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.PubsubDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.feed = $root.google.cloud.asset.v1.Feed.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.topic = reader.string(); break; default: reader.skipType(tag & 7); @@ -3400,126 +3435,127 @@ }; /** - * Decodes an UpdateFeedRequest message from the specified reader or buffer, length delimited. + * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.UpdateFeedRequest + * @memberof google.cloud.asset.v1.PubsubDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.UpdateFeedRequest} UpdateFeedRequest + * @returns {google.cloud.asset.v1.PubsubDestination} PubsubDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFeedRequest.decodeDelimited = function decodeDelimited(reader) { + PubsubDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateFeedRequest message. + * Verifies a PubsubDestination message. * @function verify - * @memberof google.cloud.asset.v1.UpdateFeedRequest + * @memberof google.cloud.asset.v1.PubsubDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateFeedRequest.verify = function verify(message) { + PubsubDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.feed != null && message.hasOwnProperty("feed")) { - var error = $root.google.cloud.asset.v1.Feed.verify(message.feed); - if (error) - return "feed." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; return null; }; /** - * Creates an UpdateFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.UpdateFeedRequest + * @memberof google.cloud.asset.v1.PubsubDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.UpdateFeedRequest} UpdateFeedRequest - */ - UpdateFeedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.UpdateFeedRequest) - return object; - var message = new $root.google.cloud.asset.v1.UpdateFeedRequest(); - if (object.feed != null) { - if (typeof object.feed !== "object") - throw TypeError(".google.cloud.asset.v1.UpdateFeedRequest.feed: object expected"); - message.feed = $root.google.cloud.asset.v1.Feed.fromObject(object.feed); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.asset.v1.UpdateFeedRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + * @returns {google.cloud.asset.v1.PubsubDestination} PubsubDestination + */ + PubsubDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.PubsubDestination) + return object; + var message = new $root.google.cloud.asset.v1.PubsubDestination(); + if (object.topic != null) + message.topic = String(object.topic); return message; }; /** - * Creates a plain object from an UpdateFeedRequest message. Also converts values to other types if specified. + * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.UpdateFeedRequest + * @memberof google.cloud.asset.v1.PubsubDestination * @static - * @param {google.cloud.asset.v1.UpdateFeedRequest} message UpdateFeedRequest + * @param {google.cloud.asset.v1.PubsubDestination} message PubsubDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateFeedRequest.toObject = function toObject(message, options) { + PubsubDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.feed = null; - object.updateMask = null; - } - if (message.feed != null && message.hasOwnProperty("feed")) - object.feed = $root.google.cloud.asset.v1.Feed.toObject(message.feed, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.topic = ""; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; return object; }; /** - * Converts this UpdateFeedRequest to JSON. + * Converts this PubsubDestination to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.UpdateFeedRequest + * @memberof google.cloud.asset.v1.PubsubDestination * @instance * @returns {Object.} JSON object */ - UpdateFeedRequest.prototype.toJSON = function toJSON() { + PubsubDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateFeedRequest; + return PubsubDestination; })(); - v1.DeleteFeedRequest = (function() { + /** + * ContentType enum. + * @name google.cloud.asset.v1.ContentType + * @enum {string} + * @property {number} CONTENT_TYPE_UNSPECIFIED=0 CONTENT_TYPE_UNSPECIFIED value + * @property {number} RESOURCE=1 RESOURCE value + * @property {number} IAM_POLICY=2 IAM_POLICY value + * @property {number} ORG_POLICY=4 ORG_POLICY value + * @property {number} ACCESS_POLICY=5 ACCESS_POLICY value + */ + v1.ContentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RESOURCE"] = 1; + values[valuesById[2] = "IAM_POLICY"] = 2; + values[valuesById[4] = "ORG_POLICY"] = 4; + values[valuesById[5] = "ACCESS_POLICY"] = 5; + return values; + })(); + + v1.FeedOutputConfig = (function() { /** - * Properties of a DeleteFeedRequest. + * Properties of a FeedOutputConfig. * @memberof google.cloud.asset.v1 - * @interface IDeleteFeedRequest - * @property {string|null} [name] DeleteFeedRequest name + * @interface IFeedOutputConfig + * @property {google.cloud.asset.v1.IPubsubDestination|null} [pubsubDestination] FeedOutputConfig pubsubDestination */ /** - * Constructs a new DeleteFeedRequest. + * Constructs a new FeedOutputConfig. * @memberof google.cloud.asset.v1 - * @classdesc Represents a DeleteFeedRequest. - * @implements IDeleteFeedRequest + * @classdesc Represents a FeedOutputConfig. + * @implements IFeedOutputConfig * @constructor - * @param {google.cloud.asset.v1.IDeleteFeedRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1.IFeedOutputConfig=} [properties] Properties to set */ - function DeleteFeedRequest(properties) { + function FeedOutputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3527,75 +3563,89 @@ } /** - * DeleteFeedRequest name. - * @member {string} name - * @memberof google.cloud.asset.v1.DeleteFeedRequest + * FeedOutputConfig pubsubDestination. + * @member {google.cloud.asset.v1.IPubsubDestination|null|undefined} pubsubDestination + * @memberof google.cloud.asset.v1.FeedOutputConfig * @instance */ - DeleteFeedRequest.prototype.name = ""; + FeedOutputConfig.prototype.pubsubDestination = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new DeleteFeedRequest instance using the specified properties. + * FeedOutputConfig destination. + * @member {"pubsubDestination"|undefined} destination + * @memberof google.cloud.asset.v1.FeedOutputConfig + * @instance + */ + Object.defineProperty(FeedOutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["pubsubDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FeedOutputConfig instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.DeleteFeedRequest + * @memberof google.cloud.asset.v1.FeedOutputConfig * @static - * @param {google.cloud.asset.v1.IDeleteFeedRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1.DeleteFeedRequest} DeleteFeedRequest instance + * @param {google.cloud.asset.v1.IFeedOutputConfig=} [properties] Properties to set + * @returns {google.cloud.asset.v1.FeedOutputConfig} FeedOutputConfig instance */ - DeleteFeedRequest.create = function create(properties) { - return new DeleteFeedRequest(properties); + FeedOutputConfig.create = function create(properties) { + return new FeedOutputConfig(properties); }; /** - * Encodes the specified DeleteFeedRequest message. Does not implicitly {@link google.cloud.asset.v1.DeleteFeedRequest.verify|verify} messages. + * Encodes the specified FeedOutputConfig message. Does not implicitly {@link google.cloud.asset.v1.FeedOutputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.DeleteFeedRequest + * @memberof google.cloud.asset.v1.FeedOutputConfig * @static - * @param {google.cloud.asset.v1.IDeleteFeedRequest} message DeleteFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1.IFeedOutputConfig} message FeedOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFeedRequest.encode = function encode(message, writer) { + FeedOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) + $root.google.cloud.asset.v1.PubsubDestination.encode(message.pubsubDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1.DeleteFeedRequest.verify|verify} messages. + * Encodes the specified FeedOutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1.FeedOutputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.DeleteFeedRequest + * @memberof google.cloud.asset.v1.FeedOutputConfig * @static - * @param {google.cloud.asset.v1.IDeleteFeedRequest} message DeleteFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1.IFeedOutputConfig} message FeedOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { + FeedOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteFeedRequest message from the specified reader or buffer. + * Decodes a FeedOutputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.DeleteFeedRequest + * @memberof google.cloud.asset.v1.FeedOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.DeleteFeedRequest} DeleteFeedRequest + * @returns {google.cloud.asset.v1.FeedOutputConfig} FeedOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFeedRequest.decode = function decode(reader, length) { + FeedOutputConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.DeleteFeedRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.FeedOutputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.pubsubDestination = $root.google.cloud.asset.v1.PubsubDestination.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3606,108 +3656,123 @@ }; /** - * Decodes a DeleteFeedRequest message from the specified reader or buffer, length delimited. + * Decodes a FeedOutputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.DeleteFeedRequest + * @memberof google.cloud.asset.v1.FeedOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.DeleteFeedRequest} DeleteFeedRequest + * @returns {google.cloud.asset.v1.FeedOutputConfig} FeedOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFeedRequest.decodeDelimited = function decodeDelimited(reader) { + FeedOutputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteFeedRequest message. + * Verifies a FeedOutputConfig message. * @function verify - * @memberof google.cloud.asset.v1.DeleteFeedRequest + * @memberof google.cloud.asset.v1.FeedOutputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteFeedRequest.verify = function verify(message) { + FeedOutputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + var properties = {}; + if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.asset.v1.PubsubDestination.verify(message.pubsubDestination); + if (error) + return "pubsubDestination." + error; + } + } return null; }; /** - * Creates a DeleteFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FeedOutputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.DeleteFeedRequest + * @memberof google.cloud.asset.v1.FeedOutputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.DeleteFeedRequest} DeleteFeedRequest + * @returns {google.cloud.asset.v1.FeedOutputConfig} FeedOutputConfig */ - DeleteFeedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.DeleteFeedRequest) + FeedOutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.FeedOutputConfig) return object; - var message = new $root.google.cloud.asset.v1.DeleteFeedRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.asset.v1.FeedOutputConfig(); + if (object.pubsubDestination != null) { + if (typeof object.pubsubDestination !== "object") + throw TypeError(".google.cloud.asset.v1.FeedOutputConfig.pubsubDestination: object expected"); + message.pubsubDestination = $root.google.cloud.asset.v1.PubsubDestination.fromObject(object.pubsubDestination); + } return message; }; /** - * Creates a plain object from a DeleteFeedRequest message. Also converts values to other types if specified. + * Creates a plain object from a FeedOutputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.DeleteFeedRequest + * @memberof google.cloud.asset.v1.FeedOutputConfig * @static - * @param {google.cloud.asset.v1.DeleteFeedRequest} message DeleteFeedRequest + * @param {google.cloud.asset.v1.FeedOutputConfig} message FeedOutputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFeedRequest.toObject = function toObject(message, options) { + FeedOutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) { + object.pubsubDestination = $root.google.cloud.asset.v1.PubsubDestination.toObject(message.pubsubDestination, options); + if (options.oneofs) + object.destination = "pubsubDestination"; + } return object; }; /** - * Converts this DeleteFeedRequest to JSON. + * Converts this FeedOutputConfig to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.DeleteFeedRequest + * @memberof google.cloud.asset.v1.FeedOutputConfig * @instance * @returns {Object.} JSON object */ - DeleteFeedRequest.prototype.toJSON = function toJSON() { + FeedOutputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteFeedRequest; + return FeedOutputConfig; })(); - v1.OutputConfig = (function() { + v1.Feed = (function() { /** - * Properties of an OutputConfig. + * Properties of a Feed. * @memberof google.cloud.asset.v1 - * @interface IOutputConfig - * @property {google.cloud.asset.v1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination - * @property {google.cloud.asset.v1.IBigQueryDestination|null} [bigqueryDestination] OutputConfig bigqueryDestination + * @interface IFeed + * @property {string|null} [name] Feed name + * @property {Array.|null} [assetNames] Feed assetNames + * @property {Array.|null} [assetTypes] Feed assetTypes + * @property {google.cloud.asset.v1.ContentType|null} [contentType] Feed contentType + * @property {google.cloud.asset.v1.IFeedOutputConfig|null} [feedOutputConfig] Feed feedOutputConfig */ /** - * Constructs a new OutputConfig. + * Constructs a new Feed. * @memberof google.cloud.asset.v1 - * @classdesc Represents an OutputConfig. - * @implements IOutputConfig + * @classdesc Represents a Feed. + * @implements IFeed * @constructor - * @param {google.cloud.asset.v1.IOutputConfig=} [properties] Properties to set + * @param {google.cloud.asset.v1.IFeed=} [properties] Properties to set */ - function OutputConfig(properties) { + function Feed(properties) { + this.assetNames = []; + this.assetTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3715,102 +3780,133 @@ } /** - * OutputConfig gcsDestination. - * @member {google.cloud.asset.v1.IGcsDestination|null|undefined} gcsDestination - * @memberof google.cloud.asset.v1.OutputConfig + * Feed name. + * @member {string} name + * @memberof google.cloud.asset.v1.Feed + * @instance + */ + Feed.prototype.name = ""; + + /** + * Feed assetNames. + * @member {Array.} assetNames + * @memberof google.cloud.asset.v1.Feed + * @instance + */ + Feed.prototype.assetNames = $util.emptyArray; + + /** + * Feed assetTypes. + * @member {Array.} assetTypes + * @memberof google.cloud.asset.v1.Feed * @instance */ - OutputConfig.prototype.gcsDestination = null; + Feed.prototype.assetTypes = $util.emptyArray; /** - * OutputConfig bigqueryDestination. - * @member {google.cloud.asset.v1.IBigQueryDestination|null|undefined} bigqueryDestination - * @memberof google.cloud.asset.v1.OutputConfig + * Feed contentType. + * @member {google.cloud.asset.v1.ContentType} contentType + * @memberof google.cloud.asset.v1.Feed * @instance */ - OutputConfig.prototype.bigqueryDestination = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Feed.prototype.contentType = 0; /** - * OutputConfig destination. - * @member {"gcsDestination"|"bigqueryDestination"|undefined} destination - * @memberof google.cloud.asset.v1.OutputConfig + * Feed feedOutputConfig. + * @member {google.cloud.asset.v1.IFeedOutputConfig|null|undefined} feedOutputConfig + * @memberof google.cloud.asset.v1.Feed * @instance */ - Object.defineProperty(OutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestination", "bigqueryDestination"]), - set: $util.oneOfSetter($oneOfFields) - }); + Feed.prototype.feedOutputConfig = null; /** - * Creates a new OutputConfig instance using the specified properties. + * Creates a new Feed instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.OutputConfig + * @memberof google.cloud.asset.v1.Feed * @static - * @param {google.cloud.asset.v1.IOutputConfig=} [properties] Properties to set - * @returns {google.cloud.asset.v1.OutputConfig} OutputConfig instance + * @param {google.cloud.asset.v1.IFeed=} [properties] Properties to set + * @returns {google.cloud.asset.v1.Feed} Feed instance */ - OutputConfig.create = function create(properties) { - return new OutputConfig(properties); + Feed.create = function create(properties) { + return new Feed(properties); }; /** - * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.asset.v1.OutputConfig.verify|verify} messages. + * Encodes the specified Feed message. Does not implicitly {@link google.cloud.asset.v1.Feed.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.OutputConfig + * @memberof google.cloud.asset.v1.Feed * @static - * @param {google.cloud.asset.v1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {google.cloud.asset.v1.IFeed} message Feed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputConfig.encode = function encode(message, writer) { + Feed.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) - $root.google.cloud.asset.v1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) - $root.google.cloud.asset.v1.BigQueryDestination.encode(message.bigqueryDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.assetNames != null && message.assetNames.length) + for (var i = 0; i < message.assetNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetNames[i]); + if (message.assetTypes != null && message.assetTypes.length) + for (var i = 0; i < message.assetTypes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetTypes[i]); + if (message.contentType != null && message.hasOwnProperty("contentType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.contentType); + if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) + $root.google.cloud.asset.v1.FeedOutputConfig.encode(message.feedOutputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1.OutputConfig.verify|verify} messages. + * Encodes the specified Feed message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Feed.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.OutputConfig + * @memberof google.cloud.asset.v1.Feed * @static - * @param {google.cloud.asset.v1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {google.cloud.asset.v1.IFeed} message Feed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + Feed.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OutputConfig message from the specified reader or buffer. + * Decodes a Feed message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.OutputConfig + * @memberof google.cloud.asset.v1.Feed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.OutputConfig} OutputConfig + * @returns {google.cloud.asset.v1.Feed} Feed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputConfig.decode = function decode(reader, length) { + Feed.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.OutputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.Feed(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.gcsDestination = $root.google.cloud.asset.v1.GcsDestination.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.bigqueryDestination = $root.google.cloud.asset.v1.BigQueryDestination.decode(reader, reader.uint32()); + if (!(message.assetNames && message.assetNames.length)) + message.assetNames = []; + message.assetNames.push(reader.string()); + break; + case 3: + if (!(message.assetTypes && message.assetTypes.length)) + message.assetTypes = []; + message.assetTypes.push(reader.string()); + break; + case 4: + message.contentType = reader.int32(); + break; + case 5: + message.feedOutputConfig = $root.google.cloud.asset.v1.FeedOutputConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3821,138 +3917,201 @@ }; /** - * Decodes an OutputConfig message from the specified reader or buffer, length delimited. + * Decodes a Feed message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.OutputConfig + * @memberof google.cloud.asset.v1.Feed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.OutputConfig} OutputConfig + * @returns {google.cloud.asset.v1.Feed} Feed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputConfig.decodeDelimited = function decodeDelimited(reader) { + Feed.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputConfig message. + * Verifies a Feed message. * @function verify - * @memberof google.cloud.asset.v1.OutputConfig + * @memberof google.cloud.asset.v1.Feed * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OutputConfig.verify = function verify(message) { + Feed.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - properties.destination = 1; - { - var error = $root.google.cloud.asset.v1.GcsDestination.verify(message.gcsDestination); - if (error) - return "gcsDestination." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.assetNames != null && message.hasOwnProperty("assetNames")) { + if (!Array.isArray(message.assetNames)) + return "assetNames: array expected"; + for (var i = 0; i < message.assetNames.length; ++i) + if (!$util.isString(message.assetNames[i])) + return "assetNames: string[] expected"; } - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { - if (properties.destination === 1) - return "destination: multiple values"; - properties.destination = 1; - { - var error = $root.google.cloud.asset.v1.BigQueryDestination.verify(message.bigqueryDestination); - if (error) - return "bigqueryDestination." + error; + if (message.assetTypes != null && message.hasOwnProperty("assetTypes")) { + if (!Array.isArray(message.assetTypes)) + return "assetTypes: array expected"; + for (var i = 0; i < message.assetTypes.length; ++i) + if (!$util.isString(message.assetTypes[i])) + return "assetTypes: string[] expected"; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + switch (message.contentType) { + default: + return "contentType: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + break; } + if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) { + var error = $root.google.cloud.asset.v1.FeedOutputConfig.verify(message.feedOutputConfig); + if (error) + return "feedOutputConfig." + error; } return null; }; /** - * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Feed message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.OutputConfig + * @memberof google.cloud.asset.v1.Feed * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.OutputConfig} OutputConfig + * @returns {google.cloud.asset.v1.Feed} Feed */ - OutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.OutputConfig) + Feed.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.Feed) return object; - var message = new $root.google.cloud.asset.v1.OutputConfig(); - if (object.gcsDestination != null) { - if (typeof object.gcsDestination !== "object") - throw TypeError(".google.cloud.asset.v1.OutputConfig.gcsDestination: object expected"); - message.gcsDestination = $root.google.cloud.asset.v1.GcsDestination.fromObject(object.gcsDestination); + var message = new $root.google.cloud.asset.v1.Feed(); + if (object.name != null) + message.name = String(object.name); + if (object.assetNames) { + if (!Array.isArray(object.assetNames)) + throw TypeError(".google.cloud.asset.v1.Feed.assetNames: array expected"); + message.assetNames = []; + for (var i = 0; i < object.assetNames.length; ++i) + message.assetNames[i] = String(object.assetNames[i]); } - if (object.bigqueryDestination != null) { - if (typeof object.bigqueryDestination !== "object") - throw TypeError(".google.cloud.asset.v1.OutputConfig.bigqueryDestination: object expected"); - message.bigqueryDestination = $root.google.cloud.asset.v1.BigQueryDestination.fromObject(object.bigqueryDestination); + if (object.assetTypes) { + if (!Array.isArray(object.assetTypes)) + throw TypeError(".google.cloud.asset.v1.Feed.assetTypes: array expected"); + message.assetTypes = []; + for (var i = 0; i < object.assetTypes.length; ++i) + message.assetTypes[i] = String(object.assetTypes[i]); + } + switch (object.contentType) { + case "CONTENT_TYPE_UNSPECIFIED": + case 0: + message.contentType = 0; + break; + case "RESOURCE": + case 1: + message.contentType = 1; + break; + case "IAM_POLICY": + case 2: + message.contentType = 2; + break; + case "ORG_POLICY": + case 4: + message.contentType = 4; + break; + case "ACCESS_POLICY": + case 5: + message.contentType = 5; + break; + } + if (object.feedOutputConfig != null) { + if (typeof object.feedOutputConfig !== "object") + throw TypeError(".google.cloud.asset.v1.Feed.feedOutputConfig: object expected"); + message.feedOutputConfig = $root.google.cloud.asset.v1.FeedOutputConfig.fromObject(object.feedOutputConfig); } return message; }; /** - * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. + * Creates a plain object from a Feed message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.OutputConfig + * @memberof google.cloud.asset.v1.Feed * @static - * @param {google.cloud.asset.v1.OutputConfig} message OutputConfig + * @param {google.cloud.asset.v1.Feed} message Feed * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputConfig.toObject = function toObject(message, options) { + Feed.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - object.gcsDestination = $root.google.cloud.asset.v1.GcsDestination.toObject(message.gcsDestination, options); - if (options.oneofs) - object.destination = "gcsDestination"; + if (options.arrays || options.defaults) { + object.assetNames = []; + object.assetTypes = []; } - if (message.bigqueryDestination != null && message.hasOwnProperty("bigqueryDestination")) { - object.bigqueryDestination = $root.google.cloud.asset.v1.BigQueryDestination.toObject(message.bigqueryDestination, options); - if (options.oneofs) - object.destination = "bigqueryDestination"; + if (options.defaults) { + object.name = ""; + object.contentType = options.enums === String ? "CONTENT_TYPE_UNSPECIFIED" : 0; + object.feedOutputConfig = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.assetNames && message.assetNames.length) { + object.assetNames = []; + for (var j = 0; j < message.assetNames.length; ++j) + object.assetNames[j] = message.assetNames[j]; + } + if (message.assetTypes && message.assetTypes.length) { + object.assetTypes = []; + for (var j = 0; j < message.assetTypes.length; ++j) + object.assetTypes[j] = message.assetTypes[j]; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = options.enums === String ? $root.google.cloud.asset.v1.ContentType[message.contentType] : message.contentType; + if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) + object.feedOutputConfig = $root.google.cloud.asset.v1.FeedOutputConfig.toObject(message.feedOutputConfig, options); return object; }; /** - * Converts this OutputConfig to JSON. + * Converts this Feed to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.OutputConfig + * @memberof google.cloud.asset.v1.Feed * @instance * @returns {Object.} JSON object */ - OutputConfig.prototype.toJSON = function toJSON() { + Feed.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OutputConfig; + return Feed; })(); - v1.GcsDestination = (function() { + v1.TemporalAsset = (function() { /** - * Properties of a GcsDestination. + * Properties of a TemporalAsset. * @memberof google.cloud.asset.v1 - * @interface IGcsDestination - * @property {string|null} [uri] GcsDestination uri - * @property {string|null} [uriPrefix] GcsDestination uriPrefix + * @interface ITemporalAsset + * @property {google.cloud.asset.v1.ITimeWindow|null} [window] TemporalAsset window + * @property {boolean|null} [deleted] TemporalAsset deleted + * @property {google.cloud.asset.v1.IAsset|null} [asset] TemporalAsset asset */ /** - * Constructs a new GcsDestination. + * Constructs a new TemporalAsset. * @memberof google.cloud.asset.v1 - * @classdesc Represents a GcsDestination. - * @implements IGcsDestination + * @classdesc Represents a TemporalAsset. + * @implements ITemporalAsset * @constructor - * @param {google.cloud.asset.v1.IGcsDestination=} [properties] Properties to set + * @param {google.cloud.asset.v1.ITemporalAsset=} [properties] Properties to set */ - function GcsDestination(properties) { + function TemporalAsset(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3960,102 +4119,101 @@ } /** - * GcsDestination uri. - * @member {string} uri - * @memberof google.cloud.asset.v1.GcsDestination + * TemporalAsset window. + * @member {google.cloud.asset.v1.ITimeWindow|null|undefined} window + * @memberof google.cloud.asset.v1.TemporalAsset * @instance */ - GcsDestination.prototype.uri = ""; + TemporalAsset.prototype.window = null; /** - * GcsDestination uriPrefix. - * @member {string} uriPrefix - * @memberof google.cloud.asset.v1.GcsDestination + * TemporalAsset deleted. + * @member {boolean} deleted + * @memberof google.cloud.asset.v1.TemporalAsset * @instance */ - GcsDestination.prototype.uriPrefix = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + TemporalAsset.prototype.deleted = false; /** - * GcsDestination objectUri. - * @member {"uri"|"uriPrefix"|undefined} objectUri - * @memberof google.cloud.asset.v1.GcsDestination + * TemporalAsset asset. + * @member {google.cloud.asset.v1.IAsset|null|undefined} asset + * @memberof google.cloud.asset.v1.TemporalAsset * @instance */ - Object.defineProperty(GcsDestination.prototype, "objectUri", { - get: $util.oneOfGetter($oneOfFields = ["uri", "uriPrefix"]), - set: $util.oneOfSetter($oneOfFields) - }); + TemporalAsset.prototype.asset = null; /** - * Creates a new GcsDestination instance using the specified properties. + * Creates a new TemporalAsset instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.GcsDestination + * @memberof google.cloud.asset.v1.TemporalAsset * @static - * @param {google.cloud.asset.v1.IGcsDestination=} [properties] Properties to set - * @returns {google.cloud.asset.v1.GcsDestination} GcsDestination instance + * @param {google.cloud.asset.v1.ITemporalAsset=} [properties] Properties to set + * @returns {google.cloud.asset.v1.TemporalAsset} TemporalAsset instance */ - GcsDestination.create = function create(properties) { - return new GcsDestination(properties); + TemporalAsset.create = function create(properties) { + return new TemporalAsset(properties); }; /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.asset.v1.GcsDestination.verify|verify} messages. + * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1.TemporalAsset.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.GcsDestination + * @memberof google.cloud.asset.v1.TemporalAsset * @static - * @param {google.cloud.asset.v1.IGcsDestination} message GcsDestination message or plain object to encode + * @param {google.cloud.asset.v1.ITemporalAsset} message TemporalAsset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsDestination.encode = function encode(message, writer) { + TemporalAsset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.uri != null && message.hasOwnProperty("uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uriPrefix); + if (message.window != null && message.hasOwnProperty("window")) + $root.google.cloud.asset.v1.TimeWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deleted != null && message.hasOwnProperty("deleted")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.deleted); + if (message.asset != null && message.hasOwnProperty("asset")) + $root.google.cloud.asset.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.GcsDestination.verify|verify} messages. + * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1.TemporalAsset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.GcsDestination + * @memberof google.cloud.asset.v1.TemporalAsset * @static - * @param {google.cloud.asset.v1.IGcsDestination} message GcsDestination message or plain object to encode + * @param {google.cloud.asset.v1.ITemporalAsset} message TemporalAsset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { + TemporalAsset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsDestination message from the specified reader or buffer. + * Decodes a TemporalAsset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.GcsDestination + * @memberof google.cloud.asset.v1.TemporalAsset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.GcsDestination} GcsDestination + * @returns {google.cloud.asset.v1.TemporalAsset} TemporalAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsDestination.decode = function decode(reader, length) { + TemporalAsset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.GcsDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.TemporalAsset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.uri = reader.string(); + message.window = $root.google.cloud.asset.v1.TimeWindow.decode(reader, reader.uint32()); break; case 2: - message.uriPrefix = reader.string(); + message.deleted = reader.bool(); + break; + case 3: + message.asset = $root.google.cloud.asset.v1.Asset.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4066,127 +4224,135 @@ }; /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.GcsDestination + * @memberof google.cloud.asset.v1.TemporalAsset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.GcsDestination} GcsDestination + * @returns {google.cloud.asset.v1.TemporalAsset} TemporalAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsDestination.decodeDelimited = function decodeDelimited(reader) { + TemporalAsset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsDestination message. + * Verifies a TemporalAsset message. * @function verify - * @memberof google.cloud.asset.v1.GcsDestination + * @memberof google.cloud.asset.v1.TemporalAsset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsDestination.verify = function verify(message) { + TemporalAsset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.uri != null && message.hasOwnProperty("uri")) { - properties.objectUri = 1; - if (!$util.isString(message.uri)) - return "uri: string expected"; + if (message.window != null && message.hasOwnProperty("window")) { + var error = $root.google.cloud.asset.v1.TimeWindow.verify(message.window); + if (error) + return "window." + error; } - if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) { - if (properties.objectUri === 1) - return "objectUri: multiple values"; - properties.objectUri = 1; - if (!$util.isString(message.uriPrefix)) - return "uriPrefix: string expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.asset.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; } return null; }; /** - * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.GcsDestination + * @memberof google.cloud.asset.v1.TemporalAsset * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.GcsDestination} GcsDestination + * @returns {google.cloud.asset.v1.TemporalAsset} TemporalAsset */ - GcsDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.GcsDestination) + TemporalAsset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.TemporalAsset) return object; - var message = new $root.google.cloud.asset.v1.GcsDestination(); - if (object.uri != null) - message.uri = String(object.uri); - if (object.uriPrefix != null) - message.uriPrefix = String(object.uriPrefix); + var message = new $root.google.cloud.asset.v1.TemporalAsset(); + if (object.window != null) { + if (typeof object.window !== "object") + throw TypeError(".google.cloud.asset.v1.TemporalAsset.window: object expected"); + message.window = $root.google.cloud.asset.v1.TimeWindow.fromObject(object.window); + } + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.asset.v1.TemporalAsset.asset: object expected"); + message.asset = $root.google.cloud.asset.v1.Asset.fromObject(object.asset); + } return message; }; /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.GcsDestination + * @memberof google.cloud.asset.v1.TemporalAsset * @static - * @param {google.cloud.asset.v1.GcsDestination} message GcsDestination + * @param {google.cloud.asset.v1.TemporalAsset} message TemporalAsset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsDestination.toObject = function toObject(message, options) { + TemporalAsset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.uri != null && message.hasOwnProperty("uri")) { - object.uri = message.uri; - if (options.oneofs) - object.objectUri = "uri"; - } - if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) { - object.uriPrefix = message.uriPrefix; - if (options.oneofs) - object.objectUri = "uriPrefix"; + if (options.defaults) { + object.window = null; + object.deleted = false; + object.asset = null; } + if (message.window != null && message.hasOwnProperty("window")) + object.window = $root.google.cloud.asset.v1.TimeWindow.toObject(message.window, options); + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.asset.v1.Asset.toObject(message.asset, options); return object; }; /** - * Converts this GcsDestination to JSON. + * Converts this TemporalAsset to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.GcsDestination + * @memberof google.cloud.asset.v1.TemporalAsset * @instance * @returns {Object.} JSON object */ - GcsDestination.prototype.toJSON = function toJSON() { + TemporalAsset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GcsDestination; + return TemporalAsset; })(); - v1.BigQueryDestination = (function() { + v1.TimeWindow = (function() { /** - * Properties of a BigQueryDestination. + * Properties of a TimeWindow. * @memberof google.cloud.asset.v1 - * @interface IBigQueryDestination - * @property {string|null} [dataset] BigQueryDestination dataset - * @property {string|null} [table] BigQueryDestination table - * @property {boolean|null} [force] BigQueryDestination force + * @interface ITimeWindow + * @property {google.protobuf.ITimestamp|null} [startTime] TimeWindow startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TimeWindow endTime */ /** - * Constructs a new BigQueryDestination. + * Constructs a new TimeWindow. * @memberof google.cloud.asset.v1 - * @classdesc Represents a BigQueryDestination. - * @implements IBigQueryDestination + * @classdesc Represents a TimeWindow. + * @implements ITimeWindow * @constructor - * @param {google.cloud.asset.v1.IBigQueryDestination=} [properties] Properties to set + * @param {google.cloud.asset.v1.ITimeWindow=} [properties] Properties to set */ - function BigQueryDestination(properties) { + function TimeWindow(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4194,101 +4360,88 @@ } /** - * BigQueryDestination dataset. - * @member {string} dataset - * @memberof google.cloud.asset.v1.BigQueryDestination - * @instance - */ - BigQueryDestination.prototype.dataset = ""; - - /** - * BigQueryDestination table. - * @member {string} table - * @memberof google.cloud.asset.v1.BigQueryDestination + * TimeWindow startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.asset.v1.TimeWindow * @instance */ - BigQueryDestination.prototype.table = ""; + TimeWindow.prototype.startTime = null; /** - * BigQueryDestination force. - * @member {boolean} force - * @memberof google.cloud.asset.v1.BigQueryDestination + * TimeWindow endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.asset.v1.TimeWindow * @instance */ - BigQueryDestination.prototype.force = false; + TimeWindow.prototype.endTime = null; /** - * Creates a new BigQueryDestination instance using the specified properties. + * Creates a new TimeWindow instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.BigQueryDestination + * @memberof google.cloud.asset.v1.TimeWindow * @static - * @param {google.cloud.asset.v1.IBigQueryDestination=} [properties] Properties to set - * @returns {google.cloud.asset.v1.BigQueryDestination} BigQueryDestination instance + * @param {google.cloud.asset.v1.ITimeWindow=} [properties] Properties to set + * @returns {google.cloud.asset.v1.TimeWindow} TimeWindow instance */ - BigQueryDestination.create = function create(properties) { - return new BigQueryDestination(properties); + TimeWindow.create = function create(properties) { + return new TimeWindow(properties); }; /** - * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.cloud.asset.v1.BigQueryDestination.verify|verify} messages. + * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1.TimeWindow.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.BigQueryDestination + * @memberof google.cloud.asset.v1.TimeWindow * @static - * @param {google.cloud.asset.v1.IBigQueryDestination} message BigQueryDestination message or plain object to encode + * @param {google.cloud.asset.v1.ITimeWindow} message TimeWindow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDestination.encode = function encode(message, writer) { + TimeWindow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataset != null && message.hasOwnProperty("dataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); - if (message.table != null && message.hasOwnProperty("table")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); - if (message.force != null && message.hasOwnProperty("force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.BigQueryDestination.verify|verify} messages. + * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1.TimeWindow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.BigQueryDestination + * @memberof google.cloud.asset.v1.TimeWindow * @static - * @param {google.cloud.asset.v1.IBigQueryDestination} message BigQueryDestination message or plain object to encode + * @param {google.cloud.asset.v1.ITimeWindow} message TimeWindow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDestination.encodeDelimited = function encodeDelimited(message, writer) { + TimeWindow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryDestination message from the specified reader or buffer. + * Decodes a TimeWindow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.BigQueryDestination + * @memberof google.cloud.asset.v1.TimeWindow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.BigQueryDestination} BigQueryDestination + * @returns {google.cloud.asset.v1.TimeWindow} TimeWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDestination.decode = function decode(reader, length) { + TimeWindow.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.BigQueryDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.TimeWindow(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.dataset = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 2: - message.table = reader.string(); - break; - case 3: - message.force = reader.bool(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4299,124 +4452,131 @@ }; /** - * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. + * Decodes a TimeWindow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.BigQueryDestination + * @memberof google.cloud.asset.v1.TimeWindow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.BigQueryDestination} BigQueryDestination + * @returns {google.cloud.asset.v1.TimeWindow} TimeWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDestination.decodeDelimited = function decodeDelimited(reader) { + TimeWindow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryDestination message. + * Verifies a TimeWindow message. * @function verify - * @memberof google.cloud.asset.v1.BigQueryDestination + * @memberof google.cloud.asset.v1.TimeWindow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryDestination.verify = function verify(message) { + TimeWindow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataset != null && message.hasOwnProperty("dataset")) - if (!$util.isString(message.dataset)) - return "dataset: string expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } return null; }; /** - * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. + * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.BigQueryDestination + * @memberof google.cloud.asset.v1.TimeWindow * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.BigQueryDestination} BigQueryDestination + * @returns {google.cloud.asset.v1.TimeWindow} TimeWindow */ - BigQueryDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.BigQueryDestination) + TimeWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.TimeWindow) return object; - var message = new $root.google.cloud.asset.v1.BigQueryDestination(); - if (object.dataset != null) - message.dataset = String(object.dataset); - if (object.table != null) - message.table = String(object.table); - if (object.force != null) - message.force = Boolean(object.force); + var message = new $root.google.cloud.asset.v1.TimeWindow(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.asset.v1.TimeWindow.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.asset.v1.TimeWindow.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } return message; }; /** - * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. + * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.BigQueryDestination + * @memberof google.cloud.asset.v1.TimeWindow * @static - * @param {google.cloud.asset.v1.BigQueryDestination} message BigQueryDestination + * @param {google.cloud.asset.v1.TimeWindow} message TimeWindow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryDestination.toObject = function toObject(message, options) { + TimeWindow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dataset = ""; - object.table = ""; - object.force = false; + object.startTime = null; + object.endTime = null; } - if (message.dataset != null && message.hasOwnProperty("dataset")) - object.dataset = message.dataset; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); return object; }; /** - * Converts this BigQueryDestination to JSON. + * Converts this TimeWindow to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.BigQueryDestination + * @memberof google.cloud.asset.v1.TimeWindow * @instance * @returns {Object.} JSON object */ - BigQueryDestination.prototype.toJSON = function toJSON() { + TimeWindow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BigQueryDestination; + return TimeWindow; })(); - v1.PubsubDestination = (function() { + v1.Asset = (function() { /** - * Properties of a PubsubDestination. + * Properties of an Asset. * @memberof google.cloud.asset.v1 - * @interface IPubsubDestination - * @property {string|null} [topic] PubsubDestination topic + * @interface IAsset + * @property {string|null} [name] Asset name + * @property {string|null} [assetType] Asset assetType + * @property {google.cloud.asset.v1.IResource|null} [resource] Asset resource + * @property {google.iam.v1.IPolicy|null} [iamPolicy] Asset iamPolicy + * @property {Array.|null} [ancestors] Asset ancestors */ /** - * Constructs a new PubsubDestination. + * Constructs a new Asset. * @memberof google.cloud.asset.v1 - * @classdesc Represents a PubsubDestination. - * @implements IPubsubDestination + * @classdesc Represents an Asset. + * @implements IAsset * @constructor - * @param {google.cloud.asset.v1.IPubsubDestination=} [properties] Properties to set + * @param {google.cloud.asset.v1.IAsset=} [properties] Properties to set */ - function PubsubDestination(properties) { + function Asset(properties) { + this.ancestors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4424,75 +4584,130 @@ } /** - * PubsubDestination topic. - * @member {string} topic - * @memberof google.cloud.asset.v1.PubsubDestination + * Asset name. + * @member {string} name + * @memberof google.cloud.asset.v1.Asset * @instance */ - PubsubDestination.prototype.topic = ""; + Asset.prototype.name = ""; /** - * Creates a new PubsubDestination instance using the specified properties. + * Asset assetType. + * @member {string} assetType + * @memberof google.cloud.asset.v1.Asset + * @instance + */ + Asset.prototype.assetType = ""; + + /** + * Asset resource. + * @member {google.cloud.asset.v1.IResource|null|undefined} resource + * @memberof google.cloud.asset.v1.Asset + * @instance + */ + Asset.prototype.resource = null; + + /** + * Asset iamPolicy. + * @member {google.iam.v1.IPolicy|null|undefined} iamPolicy + * @memberof google.cloud.asset.v1.Asset + * @instance + */ + Asset.prototype.iamPolicy = null; + + /** + * Asset ancestors. + * @member {Array.} ancestors + * @memberof google.cloud.asset.v1.Asset + * @instance + */ + Asset.prototype.ancestors = $util.emptyArray; + + /** + * Creates a new Asset instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.PubsubDestination + * @memberof google.cloud.asset.v1.Asset * @static - * @param {google.cloud.asset.v1.IPubsubDestination=} [properties] Properties to set - * @returns {google.cloud.asset.v1.PubsubDestination} PubsubDestination instance + * @param {google.cloud.asset.v1.IAsset=} [properties] Properties to set + * @returns {google.cloud.asset.v1.Asset} Asset instance */ - PubsubDestination.create = function create(properties) { - return new PubsubDestination(properties); + Asset.create = function create(properties) { + return new Asset(properties); }; /** - * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.asset.v1.PubsubDestination.verify|verify} messages. + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1.Asset.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.PubsubDestination + * @memberof google.cloud.asset.v1.Asset * @static - * @param {google.cloud.asset.v1.IPubsubDestination} message PubsubDestination message or plain object to encode + * @param {google.cloud.asset.v1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PubsubDestination.encode = function encode(message, writer) { + Asset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.topic != null && message.hasOwnProperty("topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.assetType != null && message.hasOwnProperty("assetType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetType); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.cloud.asset.v1.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) + $root.google.iam.v1.Policy.encode(message.iamPolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ancestors != null && message.ancestors.length) + for (var i = 0; i < message.ancestors.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.ancestors[i]); return writer; }; /** - * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1.PubsubDestination.verify|verify} messages. + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Asset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.PubsubDestination + * @memberof google.cloud.asset.v1.Asset * @static - * @param {google.cloud.asset.v1.IPubsubDestination} message PubsubDestination message or plain object to encode + * @param {google.cloud.asset.v1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PubsubDestination.encodeDelimited = function encodeDelimited(message, writer) { + Asset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PubsubDestination message from the specified reader or buffer. + * Decodes an Asset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.PubsubDestination + * @memberof google.cloud.asset.v1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.PubsubDestination} PubsubDestination + * @returns {google.cloud.asset.v1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PubsubDestination.decode = function decode(reader, length) { + Asset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.PubsubDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.Asset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.topic = reader.string(); + message.name = reader.string(); + break; + case 2: + message.assetType = reader.string(); + break; + case 3: + message.resource = $root.google.cloud.asset.v1.Resource.decode(reader, reader.uint32()); + break; + case 4: + message.iamPolicy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + case 10: + if (!(message.ancestors && message.ancestors.length)) + message.ancestors = []; + message.ancestors.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -4503,127 +4718,168 @@ }; /** - * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.PubsubDestination + * @memberof google.cloud.asset.v1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.PubsubDestination} PubsubDestination + * @returns {google.cloud.asset.v1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PubsubDestination.decodeDelimited = function decodeDelimited(reader) { + Asset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PubsubDestination message. + * Verifies an Asset message. * @function verify - * @memberof google.cloud.asset.v1.PubsubDestination + * @memberof google.cloud.asset.v1.Asset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PubsubDestination.verify = function verify(message) { + Asset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.topic != null && message.hasOwnProperty("topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.assetType != null && message.hasOwnProperty("assetType")) + if (!$util.isString(message.assetType)) + return "assetType: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.asset.v1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) { + var error = $root.google.iam.v1.Policy.verify(message.iamPolicy); + if (error) + return "iamPolicy." + error; + } + if (message.ancestors != null && message.hasOwnProperty("ancestors")) { + if (!Array.isArray(message.ancestors)) + return "ancestors: array expected"; + for (var i = 0; i < message.ancestors.length; ++i) + if (!$util.isString(message.ancestors[i])) + return "ancestors: string[] expected"; + } return null; }; /** - * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. + * Creates an Asset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.PubsubDestination + * @memberof google.cloud.asset.v1.Asset * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.PubsubDestination} PubsubDestination + * @returns {google.cloud.asset.v1.Asset} Asset */ - PubsubDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.PubsubDestination) + Asset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.Asset) return object; - var message = new $root.google.cloud.asset.v1.PubsubDestination(); - if (object.topic != null) - message.topic = String(object.topic); + var message = new $root.google.cloud.asset.v1.Asset(); + if (object.name != null) + message.name = String(object.name); + if (object.assetType != null) + message.assetType = String(object.assetType); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.asset.v1.Asset.resource: object expected"); + message.resource = $root.google.cloud.asset.v1.Resource.fromObject(object.resource); + } + if (object.iamPolicy != null) { + if (typeof object.iamPolicy !== "object") + throw TypeError(".google.cloud.asset.v1.Asset.iamPolicy: object expected"); + message.iamPolicy = $root.google.iam.v1.Policy.fromObject(object.iamPolicy); + } + if (object.ancestors) { + if (!Array.isArray(object.ancestors)) + throw TypeError(".google.cloud.asset.v1.Asset.ancestors: array expected"); + message.ancestors = []; + for (var i = 0; i < object.ancestors.length; ++i) + message.ancestors[i] = String(object.ancestors[i]); + } return message; }; /** - * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. + * Creates a plain object from an Asset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.PubsubDestination + * @memberof google.cloud.asset.v1.Asset * @static - * @param {google.cloud.asset.v1.PubsubDestination} message PubsubDestination + * @param {google.cloud.asset.v1.Asset} message Asset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PubsubDestination.toObject = function toObject(message, options) { + Asset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.topic = ""; - if (message.topic != null && message.hasOwnProperty("topic")) - object.topic = message.topic; + if (options.arrays || options.defaults) + object.ancestors = []; + if (options.defaults) { + object.name = ""; + object.assetType = ""; + object.resource = null; + object.iamPolicy = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.assetType != null && message.hasOwnProperty("assetType")) + object.assetType = message.assetType; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.asset.v1.Resource.toObject(message.resource, options); + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) + object.iamPolicy = $root.google.iam.v1.Policy.toObject(message.iamPolicy, options); + if (message.ancestors && message.ancestors.length) { + object.ancestors = []; + for (var j = 0; j < message.ancestors.length; ++j) + object.ancestors[j] = message.ancestors[j]; + } return object; }; /** - * Converts this PubsubDestination to JSON. + * Converts this Asset to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.PubsubDestination + * @memberof google.cloud.asset.v1.Asset * @instance * @returns {Object.} JSON object */ - PubsubDestination.prototype.toJSON = function toJSON() { + Asset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PubsubDestination; - })(); - - /** - * ContentType enum. - * @name google.cloud.asset.v1.ContentType - * @enum {string} - * @property {number} CONTENT_TYPE_UNSPECIFIED=0 CONTENT_TYPE_UNSPECIFIED value - * @property {number} RESOURCE=1 RESOURCE value - * @property {number} IAM_POLICY=2 IAM_POLICY value - * @property {number} ORG_POLICY=4 ORG_POLICY value - * @property {number} ACCESS_POLICY=5 ACCESS_POLICY value - */ - v1.ContentType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONTENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RESOURCE"] = 1; - values[valuesById[2] = "IAM_POLICY"] = 2; - values[valuesById[4] = "ORG_POLICY"] = 4; - values[valuesById[5] = "ACCESS_POLICY"] = 5; - return values; + return Asset; })(); - v1.FeedOutputConfig = (function() { + v1.Resource = (function() { /** - * Properties of a FeedOutputConfig. + * Properties of a Resource. * @memberof google.cloud.asset.v1 - * @interface IFeedOutputConfig - * @property {google.cloud.asset.v1.IPubsubDestination|null} [pubsubDestination] FeedOutputConfig pubsubDestination + * @interface IResource + * @property {string|null} [version] Resource version + * @property {string|null} [discoveryDocumentUri] Resource discoveryDocumentUri + * @property {string|null} [discoveryName] Resource discoveryName + * @property {string|null} [resourceUrl] Resource resourceUrl + * @property {string|null} [parent] Resource parent + * @property {google.protobuf.IStruct|null} [data] Resource data */ /** - * Constructs a new FeedOutputConfig. + * Constructs a new Resource. * @memberof google.cloud.asset.v1 - * @classdesc Represents a FeedOutputConfig. - * @implements IFeedOutputConfig + * @classdesc Represents a Resource. + * @implements IResource * @constructor - * @param {google.cloud.asset.v1.IFeedOutputConfig=} [properties] Properties to set + * @param {google.cloud.asset.v1.IResource=} [properties] Properties to set */ - function FeedOutputConfig(properties) { + function Resource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4631,89 +4887,140 @@ } /** - * FeedOutputConfig pubsubDestination. - * @member {google.cloud.asset.v1.IPubsubDestination|null|undefined} pubsubDestination - * @memberof google.cloud.asset.v1.FeedOutputConfig + * Resource version. + * @member {string} version + * @memberof google.cloud.asset.v1.Resource * @instance */ - FeedOutputConfig.prototype.pubsubDestination = null; + Resource.prototype.version = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Resource discoveryDocumentUri. + * @member {string} discoveryDocumentUri + * @memberof google.cloud.asset.v1.Resource + * @instance + */ + Resource.prototype.discoveryDocumentUri = ""; /** - * FeedOutputConfig destination. - * @member {"pubsubDestination"|undefined} destination - * @memberof google.cloud.asset.v1.FeedOutputConfig + * Resource discoveryName. + * @member {string} discoveryName + * @memberof google.cloud.asset.v1.Resource * @instance */ - Object.defineProperty(FeedOutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["pubsubDestination"]), - set: $util.oneOfSetter($oneOfFields) - }); + Resource.prototype.discoveryName = ""; /** - * Creates a new FeedOutputConfig instance using the specified properties. + * Resource resourceUrl. + * @member {string} resourceUrl + * @memberof google.cloud.asset.v1.Resource + * @instance + */ + Resource.prototype.resourceUrl = ""; + + /** + * Resource parent. + * @member {string} parent + * @memberof google.cloud.asset.v1.Resource + * @instance + */ + Resource.prototype.parent = ""; + + /** + * Resource data. + * @member {google.protobuf.IStruct|null|undefined} data + * @memberof google.cloud.asset.v1.Resource + * @instance + */ + Resource.prototype.data = null; + + /** + * Creates a new Resource instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.FeedOutputConfig + * @memberof google.cloud.asset.v1.Resource * @static - * @param {google.cloud.asset.v1.IFeedOutputConfig=} [properties] Properties to set - * @returns {google.cloud.asset.v1.FeedOutputConfig} FeedOutputConfig instance + * @param {google.cloud.asset.v1.IResource=} [properties] Properties to set + * @returns {google.cloud.asset.v1.Resource} Resource instance */ - FeedOutputConfig.create = function create(properties) { - return new FeedOutputConfig(properties); + Resource.create = function create(properties) { + return new Resource(properties); }; /** - * Encodes the specified FeedOutputConfig message. Does not implicitly {@link google.cloud.asset.v1.FeedOutputConfig.verify|verify} messages. + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1.Resource.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.FeedOutputConfig + * @memberof google.cloud.asset.v1.Resource * @static - * @param {google.cloud.asset.v1.IFeedOutputConfig} message FeedOutputConfig message or plain object to encode + * @param {google.cloud.asset.v1.IResource} message Resource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeedOutputConfig.encode = function encode(message, writer) { + Resource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) - $root.google.cloud.asset.v1.PubsubDestination.encode(message.pubsubDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.discoveryDocumentUri); + if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.discoveryName); + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUrl); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); + if (message.data != null && message.hasOwnProperty("data")) + $root.google.protobuf.Struct.encode(message.data, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified FeedOutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1.FeedOutputConfig.verify|verify} messages. + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Resource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.FeedOutputConfig + * @memberof google.cloud.asset.v1.Resource * @static - * @param {google.cloud.asset.v1.IFeedOutputConfig} message FeedOutputConfig message or plain object to encode + * @param {google.cloud.asset.v1.IResource} message Resource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeedOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + Resource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeedOutputConfig message from the specified reader or buffer. + * Decodes a Resource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.FeedOutputConfig + * @memberof google.cloud.asset.v1.Resource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.FeedOutputConfig} FeedOutputConfig + * @returns {google.cloud.asset.v1.Resource} Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeedOutputConfig.decode = function decode(reader, length) { + Resource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.FeedOutputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.Resource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.pubsubDestination = $root.google.cloud.asset.v1.PubsubDestination.decode(reader, reader.uint32()); + message.version = reader.string(); + break; + case 2: + message.discoveryDocumentUri = reader.string(); + break; + case 3: + message.discoveryName = reader.string(); + break; + case 4: + message.resourceUrl = reader.string(); + break; + case 5: + message.parent = reader.string(); + break; + case 6: + message.data = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4724,122 +5031,270 @@ }; /** - * Decodes a FeedOutputConfig message from the specified reader or buffer, length delimited. + * Decodes a Resource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.FeedOutputConfig + * @memberof google.cloud.asset.v1.Resource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.FeedOutputConfig} FeedOutputConfig + * @returns {google.cloud.asset.v1.Resource} Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeedOutputConfig.decodeDelimited = function decodeDelimited(reader) { + Resource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FeedOutputConfig message. + * Verifies a Resource message. * @function verify - * @memberof google.cloud.asset.v1.FeedOutputConfig + * @memberof google.cloud.asset.v1.Resource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FeedOutputConfig.verify = function verify(message) { + Resource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) { - properties.destination = 1; - { - var error = $root.google.cloud.asset.v1.PubsubDestination.verify(message.pubsubDestination); - if (error) - return "pubsubDestination." + error; - } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) + if (!$util.isString(message.discoveryDocumentUri)) + return "discoveryDocumentUri: string expected"; + if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) + if (!$util.isString(message.discoveryName)) + return "discoveryName: string expected"; + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + if (!$util.isString(message.resourceUrl)) + return "resourceUrl: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.data != null && message.hasOwnProperty("data")) { + var error = $root.google.protobuf.Struct.verify(message.data); + if (error) + return "data." + error; } return null; }; /** - * Creates a FeedOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Resource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.FeedOutputConfig + * @memberof google.cloud.asset.v1.Resource * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.FeedOutputConfig} FeedOutputConfig + * @returns {google.cloud.asset.v1.Resource} Resource */ - FeedOutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.FeedOutputConfig) + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1.Resource) return object; - var message = new $root.google.cloud.asset.v1.FeedOutputConfig(); - if (object.pubsubDestination != null) { - if (typeof object.pubsubDestination !== "object") - throw TypeError(".google.cloud.asset.v1.FeedOutputConfig.pubsubDestination: object expected"); - message.pubsubDestination = $root.google.cloud.asset.v1.PubsubDestination.fromObject(object.pubsubDestination); + var message = new $root.google.cloud.asset.v1.Resource(); + if (object.version != null) + message.version = String(object.version); + if (object.discoveryDocumentUri != null) + message.discoveryDocumentUri = String(object.discoveryDocumentUri); + if (object.discoveryName != null) + message.discoveryName = String(object.discoveryName); + if (object.resourceUrl != null) + message.resourceUrl = String(object.resourceUrl); + if (object.parent != null) + message.parent = String(object.parent); + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.asset.v1.Resource.data: object expected"); + message.data = $root.google.protobuf.Struct.fromObject(object.data); } return message; }; /** - * Creates a plain object from a FeedOutputConfig message. Also converts values to other types if specified. + * Creates a plain object from a Resource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.FeedOutputConfig + * @memberof google.cloud.asset.v1.Resource * @static - * @param {google.cloud.asset.v1.FeedOutputConfig} message FeedOutputConfig + * @param {google.cloud.asset.v1.Resource} message Resource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeedOutputConfig.toObject = function toObject(message, options) { + Resource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) { - object.pubsubDestination = $root.google.cloud.asset.v1.PubsubDestination.toObject(message.pubsubDestination, options); - if (options.oneofs) - object.destination = "pubsubDestination"; + if (options.defaults) { + object.version = ""; + object.discoveryDocumentUri = ""; + object.discoveryName = ""; + object.resourceUrl = ""; + object.parent = ""; + object.data = null; } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) + object.discoveryDocumentUri = message.discoveryDocumentUri; + if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) + object.discoveryName = message.discoveryName; + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + object.resourceUrl = message.resourceUrl; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.data != null && message.hasOwnProperty("data")) + object.data = $root.google.protobuf.Struct.toObject(message.data, options); return object; }; /** - * Converts this FeedOutputConfig to JSON. - * @function toJSON - * @memberof google.cloud.asset.v1.FeedOutputConfig + * Converts this Resource to JSON. + * @function toJSON + * @memberof google.cloud.asset.v1.Resource + * @instance + * @returns {Object.} JSON object + */ + Resource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Resource; + })(); + + return v1; + })(); + + asset.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.asset + * @namespace + */ + var v1beta1 = {}; + + v1beta1.AssetService = (function() { + + /** + * Constructs a new AssetService service. + * @memberof google.cloud.asset.v1beta1 + * @classdesc Represents an AssetService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function AssetService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AssetService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AssetService; + + /** + * Creates new AssetService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.asset.v1beta1.AssetService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {AssetService} RPC service. Useful where requests and/or responses are streamed. + */ + AssetService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.asset.v1beta1.AssetService#exportAssets}. + * @memberof google.cloud.asset.v1beta1.AssetService + * @typedef ExportAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportAssets. + * @function exportAssets + * @memberof google.cloud.asset.v1beta1.AssetService + * @instance + * @param {google.cloud.asset.v1beta1.IExportAssetsRequest} request ExportAssetsRequest message or plain object + * @param {google.cloud.asset.v1beta1.AssetService.ExportAssetsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AssetService.prototype.exportAssets = function exportAssets(request, callback) { + return this.rpcCall(exportAssets, $root.google.cloud.asset.v1beta1.ExportAssetsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportAssets" }); + + /** + * Calls ExportAssets. + * @function exportAssets + * @memberof google.cloud.asset.v1beta1.AssetService + * @instance + * @param {google.cloud.asset.v1beta1.IExportAssetsRequest} request ExportAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.asset.v1beta1.AssetService#batchGetAssetsHistory}. + * @memberof google.cloud.asset.v1beta1.AssetService + * @typedef BatchGetAssetsHistoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} [response] BatchGetAssetsHistoryResponse + */ + + /** + * Calls BatchGetAssetsHistory. + * @function batchGetAssetsHistory + * @memberof google.cloud.asset.v1beta1.AssetService + * @instance + * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest} request BatchGetAssetsHistoryRequest message or plain object + * @param {google.cloud.asset.v1beta1.AssetService.BatchGetAssetsHistoryCallback} callback Node-style callback called with the error, if any, and BatchGetAssetsHistoryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AssetService.prototype.batchGetAssetsHistory = function batchGetAssetsHistory(request, callback) { + return this.rpcCall(batchGetAssetsHistory, $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest, $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse, request, callback); + }, "name", { value: "BatchGetAssetsHistory" }); + + /** + * Calls BatchGetAssetsHistory. + * @function batchGetAssetsHistory + * @memberof google.cloud.asset.v1beta1.AssetService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest} request BatchGetAssetsHistoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - FeedOutputConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return FeedOutputConfig; + return AssetService; })(); - v1.Feed = (function() { + v1beta1.ExportAssetsRequest = (function() { /** - * Properties of a Feed. - * @memberof google.cloud.asset.v1 - * @interface IFeed - * @property {string|null} [name] Feed name - * @property {Array.|null} [assetNames] Feed assetNames - * @property {Array.|null} [assetTypes] Feed assetTypes - * @property {google.cloud.asset.v1.ContentType|null} [contentType] Feed contentType - * @property {google.cloud.asset.v1.IFeedOutputConfig|null} [feedOutputConfig] Feed feedOutputConfig + * Properties of an ExportAssetsRequest. + * @memberof google.cloud.asset.v1beta1 + * @interface IExportAssetsRequest + * @property {string|null} [parent] ExportAssetsRequest parent + * @property {google.protobuf.ITimestamp|null} [readTime] ExportAssetsRequest readTime + * @property {Array.|null} [assetTypes] ExportAssetsRequest assetTypes + * @property {google.cloud.asset.v1beta1.ContentType|null} [contentType] ExportAssetsRequest contentType + * @property {google.cloud.asset.v1beta1.IOutputConfig|null} [outputConfig] ExportAssetsRequest outputConfig */ /** - * Constructs a new Feed. - * @memberof google.cloud.asset.v1 - * @classdesc Represents a Feed. - * @implements IFeed + * Constructs a new ExportAssetsRequest. + * @memberof google.cloud.asset.v1beta1 + * @classdesc Represents an ExportAssetsRequest. + * @implements IExportAssetsRequest * @constructor - * @param {google.cloud.asset.v1.IFeed=} [properties] Properties to set + * @param {google.cloud.asset.v1beta1.IExportAssetsRequest=} [properties] Properties to set */ - function Feed(properties) { - this.assetNames = []; + function ExportAssetsRequest(properties) { this.assetTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -4848,122 +5303,119 @@ } /** - * Feed name. - * @member {string} name - * @memberof google.cloud.asset.v1.Feed + * ExportAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @instance */ - Feed.prototype.name = ""; + ExportAssetsRequest.prototype.parent = ""; /** - * Feed assetNames. - * @member {Array.} assetNames - * @memberof google.cloud.asset.v1.Feed + * ExportAssetsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @instance */ - Feed.prototype.assetNames = $util.emptyArray; + ExportAssetsRequest.prototype.readTime = null; /** - * Feed assetTypes. + * ExportAssetsRequest assetTypes. * @member {Array.} assetTypes - * @memberof google.cloud.asset.v1.Feed + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @instance */ - Feed.prototype.assetTypes = $util.emptyArray; + ExportAssetsRequest.prototype.assetTypes = $util.emptyArray; /** - * Feed contentType. - * @member {google.cloud.asset.v1.ContentType} contentType - * @memberof google.cloud.asset.v1.Feed + * ExportAssetsRequest contentType. + * @member {google.cloud.asset.v1beta1.ContentType} contentType + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @instance */ - Feed.prototype.contentType = 0; + ExportAssetsRequest.prototype.contentType = 0; /** - * Feed feedOutputConfig. - * @member {google.cloud.asset.v1.IFeedOutputConfig|null|undefined} feedOutputConfig - * @memberof google.cloud.asset.v1.Feed + * ExportAssetsRequest outputConfig. + * @member {google.cloud.asset.v1beta1.IOutputConfig|null|undefined} outputConfig + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @instance */ - Feed.prototype.feedOutputConfig = null; + ExportAssetsRequest.prototype.outputConfig = null; /** - * Creates a new Feed instance using the specified properties. + * Creates a new ExportAssetsRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1.Feed + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @static - * @param {google.cloud.asset.v1.IFeed=} [properties] Properties to set - * @returns {google.cloud.asset.v1.Feed} Feed instance + * @param {google.cloud.asset.v1beta1.IExportAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1beta1.ExportAssetsRequest} ExportAssetsRequest instance */ - Feed.create = function create(properties) { - return new Feed(properties); + ExportAssetsRequest.create = function create(properties) { + return new ExportAssetsRequest(properties); }; /** - * Encodes the specified Feed message. Does not implicitly {@link google.cloud.asset.v1.Feed.verify|verify} messages. + * Encodes the specified ExportAssetsRequest message. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1.Feed + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @static - * @param {google.cloud.asset.v1.IFeed} message Feed message or plain object to encode + * @param {google.cloud.asset.v1beta1.IExportAssetsRequest} message ExportAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Feed.encode = function encode(message, writer) { + ExportAssetsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.assetNames != null && message.assetNames.length) - for (var i = 0; i < message.assetNames.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetNames[i]); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.assetTypes != null && message.assetTypes.length) for (var i = 0; i < message.assetTypes.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetTypes[i]); if (message.contentType != null && message.hasOwnProperty("contentType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.contentType); - if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) - $root.google.cloud.asset.v1.FeedOutputConfig.encode(message.feedOutputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + $root.google.cloud.asset.v1beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Feed message, length delimited. Does not implicitly {@link google.cloud.asset.v1.Feed.verify|verify} messages. + * Encodes the specified ExportAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1.Feed + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @static - * @param {google.cloud.asset.v1.IFeed} message Feed message or plain object to encode + * @param {google.cloud.asset.v1beta1.IExportAssetsRequest} message ExportAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Feed.encodeDelimited = function encodeDelimited(message, writer) { + ExportAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Feed message from the specified reader or buffer. + * Decodes an ExportAssetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1.Feed + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1.Feed} Feed + * @returns {google.cloud.asset.v1beta1.ExportAssetsRequest} ExportAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Feed.decode = function decode(reader, length) { + ExportAssetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1.Feed(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.ExportAssetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - if (!(message.assetNames && message.assetNames.length)) - message.assetNames = []; - message.assetNames.push(reader.string()); + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 3: if (!(message.assetTypes && message.assetTypes.length)) @@ -4974,7 +5426,7 @@ message.contentType = reader.int32(); break; case 5: - message.feedOutputConfig = $root.google.cloud.asset.v1.FeedOutputConfig.decode(reader, reader.uint32()); + message.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4985,41 +5437,39 @@ }; /** - * Decodes a Feed message from the specified reader or buffer, length delimited. + * Decodes an ExportAssetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1.Feed + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1.Feed} Feed + * @returns {google.cloud.asset.v1beta1.ExportAssetsRequest} ExportAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Feed.decodeDelimited = function decodeDelimited(reader) { + ExportAssetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Feed message. + * Verifies an ExportAssetsRequest message. * @function verify - * @memberof google.cloud.asset.v1.Feed + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Feed.verify = function verify(message) { + ExportAssetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.assetNames != null && message.hasOwnProperty("assetNames")) { - if (!Array.isArray(message.assetNames)) - return "assetNames: array expected"; - for (var i = 0; i < message.assetNames.length; ++i) - if (!$util.isString(message.assetNames[i])) - return "assetNames: string[] expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; } if (message.assetTypes != null && message.hasOwnProperty("assetTypes")) { if (!Array.isArray(message.assetTypes)) @@ -5035,42 +5485,38 @@ case 0: case 1: case 2: - case 4: - case 5: break; } - if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) { - var error = $root.google.cloud.asset.v1.FeedOutputConfig.verify(message.feedOutputConfig); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + var error = $root.google.cloud.asset.v1beta1.OutputConfig.verify(message.outputConfig); if (error) - return "feedOutputConfig." + error; + return "outputConfig." + error; } return null; }; /** - * Creates a Feed message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAssetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1.Feed + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1.Feed} Feed + * @returns {google.cloud.asset.v1beta1.ExportAssetsRequest} ExportAssetsRequest */ - Feed.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1.Feed) + ExportAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1beta1.ExportAssetsRequest) return object; - var message = new $root.google.cloud.asset.v1.Feed(); - if (object.name != null) - message.name = String(object.name); - if (object.assetNames) { - if (!Array.isArray(object.assetNames)) - throw TypeError(".google.cloud.asset.v1.Feed.assetNames: array expected"); - message.assetNames = []; - for (var i = 0; i < object.assetNames.length; ++i) - message.assetNames[i] = String(object.assetNames[i]); + var message = new $root.google.cloud.asset.v1beta1.ExportAssetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.asset.v1beta1.ExportAssetsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } if (object.assetTypes) { if (!Array.isArray(object.assetTypes)) - throw TypeError(".google.cloud.asset.v1.Feed.assetTypes: array expected"); + throw TypeError(".google.cloud.asset.v1beta1.ExportAssetsRequest.assetTypes: array expected"); message.assetTypes = []; for (var i = 0; i < object.assetTypes.length; ++i) message.assetTypes[i] = String(object.assetTypes[i]); @@ -5088,110 +5534,85 @@ case 2: message.contentType = 2; break; - case "ORG_POLICY": - case 4: - message.contentType = 4; - break; - case "ACCESS_POLICY": - case 5: - message.contentType = 5; - break; } - if (object.feedOutputConfig != null) { - if (typeof object.feedOutputConfig !== "object") - throw TypeError(".google.cloud.asset.v1.Feed.feedOutputConfig: object expected"); - message.feedOutputConfig = $root.google.cloud.asset.v1.FeedOutputConfig.fromObject(object.feedOutputConfig); + if (object.outputConfig != null) { + if (typeof object.outputConfig !== "object") + throw TypeError(".google.cloud.asset.v1beta1.ExportAssetsRequest.outputConfig: object expected"); + message.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.fromObject(object.outputConfig); } return message; }; /** - * Creates a plain object from a Feed message. Also converts values to other types if specified. + * Creates a plain object from an ExportAssetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1.Feed + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @static - * @param {google.cloud.asset.v1.Feed} message Feed + * @param {google.cloud.asset.v1beta1.ExportAssetsRequest} message ExportAssetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Feed.toObject = function toObject(message, options) { + ExportAssetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.assetNames = []; + if (options.arrays || options.defaults) object.assetTypes = []; - } if (options.defaults) { - object.name = ""; + object.parent = ""; + object.readTime = null; object.contentType = options.enums === String ? "CONTENT_TYPE_UNSPECIFIED" : 0; - object.feedOutputConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.assetNames && message.assetNames.length) { - object.assetNames = []; - for (var j = 0; j < message.assetNames.length; ++j) - object.assetNames[j] = message.assetNames[j]; + object.outputConfig = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); if (message.assetTypes && message.assetTypes.length) { object.assetTypes = []; for (var j = 0; j < message.assetTypes.length; ++j) object.assetTypes[j] = message.assetTypes[j]; } if (message.contentType != null && message.hasOwnProperty("contentType")) - object.contentType = options.enums === String ? $root.google.cloud.asset.v1.ContentType[message.contentType] : message.contentType; - if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) - object.feedOutputConfig = $root.google.cloud.asset.v1.FeedOutputConfig.toObject(message.feedOutputConfig, options); + object.contentType = options.enums === String ? $root.google.cloud.asset.v1beta1.ContentType[message.contentType] : message.contentType; + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.toObject(message.outputConfig, options); return object; }; /** - * Converts this Feed to JSON. + * Converts this ExportAssetsRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1.Feed + * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest * @instance * @returns {Object.} JSON object */ - Feed.prototype.toJSON = function toJSON() { + ExportAssetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Feed; + return ExportAssetsRequest; })(); - return v1; - })(); - - asset.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof google.cloud.asset - * @namespace - */ - var v1beta1 = {}; - - v1beta1.TemporalAsset = (function() { + v1beta1.ExportAssetsResponse = (function() { /** - * Properties of a TemporalAsset. + * Properties of an ExportAssetsResponse. * @memberof google.cloud.asset.v1beta1 - * @interface ITemporalAsset - * @property {google.cloud.asset.v1beta1.ITimeWindow|null} [window] TemporalAsset window - * @property {boolean|null} [deleted] TemporalAsset deleted - * @property {google.cloud.asset.v1beta1.IAsset|null} [asset] TemporalAsset asset + * @interface IExportAssetsResponse + * @property {google.protobuf.ITimestamp|null} [readTime] ExportAssetsResponse readTime + * @property {google.cloud.asset.v1beta1.IOutputConfig|null} [outputConfig] ExportAssetsResponse outputConfig */ /** - * Constructs a new TemporalAsset. + * Constructs a new ExportAssetsResponse. * @memberof google.cloud.asset.v1beta1 - * @classdesc Represents a TemporalAsset. - * @implements ITemporalAsset + * @classdesc Represents an ExportAssetsResponse. + * @implements IExportAssetsResponse * @constructor - * @param {google.cloud.asset.v1beta1.ITemporalAsset=} [properties] Properties to set + * @param {google.cloud.asset.v1beta1.IExportAssetsResponse=} [properties] Properties to set */ - function TemporalAsset(properties) { + function ExportAssetsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5199,101 +5620,88 @@ } /** - * TemporalAsset window. - * @member {google.cloud.asset.v1beta1.ITimeWindow|null|undefined} window - * @memberof google.cloud.asset.v1beta1.TemporalAsset - * @instance - */ - TemporalAsset.prototype.window = null; - - /** - * TemporalAsset deleted. - * @member {boolean} deleted - * @memberof google.cloud.asset.v1beta1.TemporalAsset + * ExportAssetsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse * @instance */ - TemporalAsset.prototype.deleted = false; + ExportAssetsResponse.prototype.readTime = null; /** - * TemporalAsset asset. - * @member {google.cloud.asset.v1beta1.IAsset|null|undefined} asset - * @memberof google.cloud.asset.v1beta1.TemporalAsset + * ExportAssetsResponse outputConfig. + * @member {google.cloud.asset.v1beta1.IOutputConfig|null|undefined} outputConfig + * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse * @instance */ - TemporalAsset.prototype.asset = null; + ExportAssetsResponse.prototype.outputConfig = null; /** - * Creates a new TemporalAsset instance using the specified properties. + * Creates a new ExportAssetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1beta1.TemporalAsset + * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse * @static - * @param {google.cloud.asset.v1beta1.ITemporalAsset=} [properties] Properties to set - * @returns {google.cloud.asset.v1beta1.TemporalAsset} TemporalAsset instance + * @param {google.cloud.asset.v1beta1.IExportAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.asset.v1beta1.ExportAssetsResponse} ExportAssetsResponse instance */ - TemporalAsset.create = function create(properties) { - return new TemporalAsset(properties); + ExportAssetsResponse.create = function create(properties) { + return new ExportAssetsResponse(properties); }; /** - * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1beta1.TemporalAsset.verify|verify} messages. + * Encodes the specified ExportAssetsResponse message. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1beta1.TemporalAsset + * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse * @static - * @param {google.cloud.asset.v1beta1.ITemporalAsset} message TemporalAsset message or plain object to encode + * @param {google.cloud.asset.v1beta1.IExportAssetsResponse} message ExportAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TemporalAsset.encode = function encode(message, writer) { + ExportAssetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.window != null && message.hasOwnProperty("window")) - $root.google.cloud.asset.v1beta1.TimeWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.deleted != null && message.hasOwnProperty("deleted")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.deleted); - if (message.asset != null && message.hasOwnProperty("asset")) - $root.google.cloud.asset.v1beta1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.readTime != null && message.hasOwnProperty("readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + $root.google.cloud.asset.v1beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.TemporalAsset.verify|verify} messages. + * Encodes the specified ExportAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1beta1.TemporalAsset + * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse * @static - * @param {google.cloud.asset.v1beta1.ITemporalAsset} message TemporalAsset message or plain object to encode + * @param {google.cloud.asset.v1beta1.IExportAssetsResponse} message ExportAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TemporalAsset.encodeDelimited = function encodeDelimited(message, writer) { + ExportAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TemporalAsset message from the specified reader or buffer. + * Decodes an ExportAssetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1beta1.TemporalAsset + * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1beta1.TemporalAsset} TemporalAsset + * @returns {google.cloud.asset.v1beta1.ExportAssetsResponse} ExportAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TemporalAsset.decode = function decode(reader, length) { + ExportAssetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.TemporalAsset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.ExportAssetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.window = $root.google.cloud.asset.v1beta1.TimeWindow.decode(reader, reader.uint32()); + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 2: - message.deleted = reader.bool(); - break; - case 3: - message.asset = $root.google.cloud.asset.v1beta1.Asset.decode(reader, reader.uint32()); + message.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -5304,135 +5712,130 @@ }; /** - * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. + * Decodes an ExportAssetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1beta1.TemporalAsset + * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1beta1.TemporalAsset} TemporalAsset + * @returns {google.cloud.asset.v1beta1.ExportAssetsResponse} ExportAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TemporalAsset.decodeDelimited = function decodeDelimited(reader) { + ExportAssetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TemporalAsset message. + * Verifies an ExportAssetsResponse message. * @function verify - * @memberof google.cloud.asset.v1beta1.TemporalAsset + * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TemporalAsset.verify = function verify(message) { + ExportAssetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.window != null && message.hasOwnProperty("window")) { - var error = $root.google.cloud.asset.v1beta1.TimeWindow.verify(message.window); + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "window." + error; + return "readTime." + error; } - if (message.deleted != null && message.hasOwnProperty("deleted")) - if (typeof message.deleted !== "boolean") - return "deleted: boolean expected"; - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.asset.v1beta1.Asset.verify(message.asset); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + var error = $root.google.cloud.asset.v1beta1.OutputConfig.verify(message.outputConfig); if (error) - return "asset." + error; + return "outputConfig." + error; } return null; }; /** - * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAssetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1beta1.TemporalAsset + * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1beta1.TemporalAsset} TemporalAsset + * @returns {google.cloud.asset.v1beta1.ExportAssetsResponse} ExportAssetsResponse */ - TemporalAsset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1beta1.TemporalAsset) + ExportAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1beta1.ExportAssetsResponse) return object; - var message = new $root.google.cloud.asset.v1beta1.TemporalAsset(); - if (object.window != null) { - if (typeof object.window !== "object") - throw TypeError(".google.cloud.asset.v1beta1.TemporalAsset.window: object expected"); - message.window = $root.google.cloud.asset.v1beta1.TimeWindow.fromObject(object.window); + var message = new $root.google.cloud.asset.v1beta1.ExportAssetsResponse(); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.asset.v1beta1.ExportAssetsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } - if (object.deleted != null) - message.deleted = Boolean(object.deleted); - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.asset.v1beta1.TemporalAsset.asset: object expected"); - message.asset = $root.google.cloud.asset.v1beta1.Asset.fromObject(object.asset); + if (object.outputConfig != null) { + if (typeof object.outputConfig !== "object") + throw TypeError(".google.cloud.asset.v1beta1.ExportAssetsResponse.outputConfig: object expected"); + message.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.fromObject(object.outputConfig); } return message; }; /** - * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. + * Creates a plain object from an ExportAssetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1beta1.TemporalAsset + * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse * @static - * @param {google.cloud.asset.v1beta1.TemporalAsset} message TemporalAsset + * @param {google.cloud.asset.v1beta1.ExportAssetsResponse} message ExportAssetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TemporalAsset.toObject = function toObject(message, options) { + ExportAssetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.window = null; - object.deleted = false; - object.asset = null; + object.readTime = null; + object.outputConfig = null; } - if (message.window != null && message.hasOwnProperty("window")) - object.window = $root.google.cloud.asset.v1beta1.TimeWindow.toObject(message.window, options); - if (message.deleted != null && message.hasOwnProperty("deleted")) - object.deleted = message.deleted; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.asset.v1beta1.Asset.toObject(message.asset, options); + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.toObject(message.outputConfig, options); return object; }; /** - * Converts this TemporalAsset to JSON. + * Converts this ExportAssetsResponse to JSON. * @function toJSON - * @memberof google.cloud.asset.v1beta1.TemporalAsset + * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse * @instance * @returns {Object.} JSON object */ - TemporalAsset.prototype.toJSON = function toJSON() { + ExportAssetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TemporalAsset; + return ExportAssetsResponse; })(); - v1beta1.TimeWindow = (function() { + v1beta1.BatchGetAssetsHistoryRequest = (function() { /** - * Properties of a TimeWindow. + * Properties of a BatchGetAssetsHistoryRequest. * @memberof google.cloud.asset.v1beta1 - * @interface ITimeWindow - * @property {google.protobuf.ITimestamp|null} [startTime] TimeWindow startTime - * @property {google.protobuf.ITimestamp|null} [endTime] TimeWindow endTime + * @interface IBatchGetAssetsHistoryRequest + * @property {string|null} [parent] BatchGetAssetsHistoryRequest parent + * @property {Array.|null} [assetNames] BatchGetAssetsHistoryRequest assetNames + * @property {google.cloud.asset.v1beta1.ContentType|null} [contentType] BatchGetAssetsHistoryRequest contentType + * @property {google.cloud.asset.v1beta1.ITimeWindow|null} [readTimeWindow] BatchGetAssetsHistoryRequest readTimeWindow */ /** - * Constructs a new TimeWindow. + * Constructs a new BatchGetAssetsHistoryRequest. * @memberof google.cloud.asset.v1beta1 - * @classdesc Represents a TimeWindow. - * @implements ITimeWindow + * @classdesc Represents a BatchGetAssetsHistoryRequest. + * @implements IBatchGetAssetsHistoryRequest * @constructor - * @param {google.cloud.asset.v1beta1.ITimeWindow=} [properties] Properties to set + * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest=} [properties] Properties to set */ - function TimeWindow(properties) { + function BatchGetAssetsHistoryRequest(properties) { + this.assetNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5440,88 +5843,117 @@ } /** - * TimeWindow startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.asset.v1beta1.TimeWindow + * BatchGetAssetsHistoryRequest parent. + * @member {string} parent + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * @instance + */ + BatchGetAssetsHistoryRequest.prototype.parent = ""; + + /** + * BatchGetAssetsHistoryRequest assetNames. + * @member {Array.} assetNames + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * @instance + */ + BatchGetAssetsHistoryRequest.prototype.assetNames = $util.emptyArray; + + /** + * BatchGetAssetsHistoryRequest contentType. + * @member {google.cloud.asset.v1beta1.ContentType} contentType + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest * @instance */ - TimeWindow.prototype.startTime = null; + BatchGetAssetsHistoryRequest.prototype.contentType = 0; /** - * TimeWindow endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.asset.v1beta1.TimeWindow + * BatchGetAssetsHistoryRequest readTimeWindow. + * @member {google.cloud.asset.v1beta1.ITimeWindow|null|undefined} readTimeWindow + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest * @instance */ - TimeWindow.prototype.endTime = null; + BatchGetAssetsHistoryRequest.prototype.readTimeWindow = null; /** - * Creates a new TimeWindow instance using the specified properties. + * Creates a new BatchGetAssetsHistoryRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1beta1.TimeWindow + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest * @static - * @param {google.cloud.asset.v1beta1.ITimeWindow=} [properties] Properties to set - * @returns {google.cloud.asset.v1beta1.TimeWindow} TimeWindow instance + * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest instance */ - TimeWindow.create = function create(properties) { - return new TimeWindow(properties); + BatchGetAssetsHistoryRequest.create = function create(properties) { + return new BatchGetAssetsHistoryRequest(properties); }; /** - * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1beta1.TimeWindow.verify|verify} messages. + * Encodes the specified BatchGetAssetsHistoryRequest message. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1beta1.TimeWindow + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest * @static - * @param {google.cloud.asset.v1beta1.ITimeWindow} message TimeWindow message or plain object to encode + * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeWindow.encode = function encode(message, writer) { + BatchGetAssetsHistoryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && message.hasOwnProperty("endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.assetNames != null && message.assetNames.length) + for (var i = 0; i < message.assetNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetNames[i]); + if (message.contentType != null && message.hasOwnProperty("contentType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contentType); + if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) + $root.google.cloud.asset.v1beta1.TimeWindow.encode(message.readTimeWindow, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.TimeWindow.verify|verify} messages. + * Encodes the specified BatchGetAssetsHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1beta1.TimeWindow + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest * @static - * @param {google.cloud.asset.v1beta1.ITimeWindow} message TimeWindow message or plain object to encode + * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeWindow.encodeDelimited = function encodeDelimited(message, writer) { + BatchGetAssetsHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeWindow message from the specified reader or buffer. + * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1beta1.TimeWindow + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1beta1.TimeWindow} TimeWindow + * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeWindow.decode = function decode(reader, length) { + BatchGetAssetsHistoryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.TimeWindow(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.assetNames && message.assetNames.length)) + message.assetNames = []; + message.assetNames.push(reader.string()); + break; + case 3: + message.contentType = reader.int32(); + break; + case 4: + message.readTimeWindow = $root.google.cloud.asset.v1beta1.TimeWindow.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -5532,244 +5964,248 @@ }; /** - * Decodes a TimeWindow message from the specified reader or buffer, length delimited. + * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1beta1.TimeWindow + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1beta1.TimeWindow} TimeWindow + * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeWindow.decodeDelimited = function decodeDelimited(reader) { + BatchGetAssetsHistoryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeWindow message. + * Verifies a BatchGetAssetsHistoryRequest message. * @function verify - * @memberof google.cloud.asset.v1beta1.TimeWindow + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeWindow.verify = function verify(message) { + BatchGetAssetsHistoryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.assetNames != null && message.hasOwnProperty("assetNames")) { + if (!Array.isArray(message.assetNames)) + return "assetNames: array expected"; + for (var i = 0; i < message.assetNames.length; ++i) + if (!$util.isString(message.assetNames[i])) + return "assetNames: string[] expected"; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.contentType != null && message.hasOwnProperty("contentType")) + switch (message.contentType) { + default: + return "contentType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) { + var error = $root.google.cloud.asset.v1beta1.TimeWindow.verify(message.readTimeWindow); if (error) - return "endTime." + error; + return "readTimeWindow." + error; } return null; }; /** - * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. + * Creates a BatchGetAssetsHistoryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1beta1.TimeWindow + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1beta1.TimeWindow} TimeWindow + * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest */ - TimeWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1beta1.TimeWindow) + BatchGetAssetsHistoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest) return object; - var message = new $root.google.cloud.asset.v1beta1.TimeWindow(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.asset.v1beta1.TimeWindow.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + var message = new $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.assetNames) { + if (!Array.isArray(object.assetNames)) + throw TypeError(".google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.assetNames: array expected"); + message.assetNames = []; + for (var i = 0; i < object.assetNames.length; ++i) + message.assetNames[i] = String(object.assetNames[i]); } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.asset.v1beta1.TimeWindow.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + switch (object.contentType) { + case "CONTENT_TYPE_UNSPECIFIED": + case 0: + message.contentType = 0; + break; + case "RESOURCE": + case 1: + message.contentType = 1; + break; + case "IAM_POLICY": + case 2: + message.contentType = 2; + break; + } + if (object.readTimeWindow != null) { + if (typeof object.readTimeWindow !== "object") + throw TypeError(".google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.readTimeWindow: object expected"); + message.readTimeWindow = $root.google.cloud.asset.v1beta1.TimeWindow.fromObject(object.readTimeWindow); } return message; }; /** - * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. + * Creates a plain object from a BatchGetAssetsHistoryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1beta1.TimeWindow + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest * @static - * @param {google.cloud.asset.v1beta1.TimeWindow} message TimeWindow + * @param {google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeWindow.toObject = function toObject(message, options) { + BatchGetAssetsHistoryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.assetNames = []; if (options.defaults) { - object.startTime = null; - object.endTime = null; + object.parent = ""; + object.contentType = options.enums === String ? "CONTENT_TYPE_UNSPECIFIED" : 0; + object.readTimeWindow = null; } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.assetNames && message.assetNames.length) { + object.assetNames = []; + for (var j = 0; j < message.assetNames.length; ++j) + object.assetNames[j] = message.assetNames[j]; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = options.enums === String ? $root.google.cloud.asset.v1beta1.ContentType[message.contentType] : message.contentType; + if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) + object.readTimeWindow = $root.google.cloud.asset.v1beta1.TimeWindow.toObject(message.readTimeWindow, options); return object; }; /** - * Converts this TimeWindow to JSON. + * Converts this BatchGetAssetsHistoryRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1beta1.TimeWindow + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest * @instance * @returns {Object.} JSON object */ - TimeWindow.prototype.toJSON = function toJSON() { + BatchGetAssetsHistoryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeWindow; + return BatchGetAssetsHistoryRequest; })(); - v1beta1.Asset = (function() { + v1beta1.BatchGetAssetsHistoryResponse = (function() { /** - * Properties of an Asset. + * Properties of a BatchGetAssetsHistoryResponse. * @memberof google.cloud.asset.v1beta1 - * @interface IAsset - * @property {string|null} [name] Asset name - * @property {string|null} [assetType] Asset assetType - * @property {google.cloud.asset.v1beta1.IResource|null} [resource] Asset resource - * @property {google.iam.v1.IPolicy|null} [iamPolicy] Asset iamPolicy + * @interface IBatchGetAssetsHistoryResponse + * @property {Array.|null} [assets] BatchGetAssetsHistoryResponse assets */ /** - * Constructs a new Asset. + * Constructs a new BatchGetAssetsHistoryResponse. * @memberof google.cloud.asset.v1beta1 - * @classdesc Represents an Asset. - * @implements IAsset + * @classdesc Represents a BatchGetAssetsHistoryResponse. + * @implements IBatchGetAssetsHistoryResponse * @constructor - * @param {google.cloud.asset.v1beta1.IAsset=} [properties] Properties to set - */ - function Asset(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Asset name. - * @member {string} name - * @memberof google.cloud.asset.v1beta1.Asset - * @instance - */ - Asset.prototype.name = ""; - - /** - * Asset assetType. - * @member {string} assetType - * @memberof google.cloud.asset.v1beta1.Asset - * @instance - */ - Asset.prototype.assetType = ""; - - /** - * Asset resource. - * @member {google.cloud.asset.v1beta1.IResource|null|undefined} resource - * @memberof google.cloud.asset.v1beta1.Asset - * @instance + * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse=} [properties] Properties to set */ - Asset.prototype.resource = null; + function BatchGetAssetsHistoryResponse(properties) { + this.assets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Asset iamPolicy. - * @member {google.iam.v1.IPolicy|null|undefined} iamPolicy - * @memberof google.cloud.asset.v1beta1.Asset + * BatchGetAssetsHistoryResponse assets. + * @member {Array.} assets + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse * @instance */ - Asset.prototype.iamPolicy = null; + BatchGetAssetsHistoryResponse.prototype.assets = $util.emptyArray; /** - * Creates a new Asset instance using the specified properties. + * Creates a new BatchGetAssetsHistoryResponse instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1beta1.Asset + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse * @static - * @param {google.cloud.asset.v1beta1.IAsset=} [properties] Properties to set - * @returns {google.cloud.asset.v1beta1.Asset} Asset instance + * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse=} [properties] Properties to set + * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse instance */ - Asset.create = function create(properties) { - return new Asset(properties); + BatchGetAssetsHistoryResponse.create = function create(properties) { + return new BatchGetAssetsHistoryResponse(properties); }; /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1beta1.Asset.verify|verify} messages. + * Encodes the specified BatchGetAssetsHistoryResponse message. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1beta1.Asset + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse * @static - * @param {google.cloud.asset.v1beta1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encode = function encode(message, writer) { + BatchGetAssetsHistoryResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.assetType != null && message.hasOwnProperty("assetType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetType); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.google.cloud.asset.v1beta1.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) - $root.google.iam.v1.Policy.encode(message.iamPolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.assets != null && message.assets.length) + for (var i = 0; i < message.assets.length; ++i) + $root.google.cloud.asset.v1beta1.TemporalAsset.encode(message.assets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.Asset.verify|verify} messages. + * Encodes the specified BatchGetAssetsHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1beta1.Asset + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse * @static - * @param {google.cloud.asset.v1beta1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encodeDelimited = function encodeDelimited(message, writer) { + BatchGetAssetsHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Asset message from the specified reader or buffer. + * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1beta1.Asset + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1beta1.Asset} Asset + * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Asset.decode = function decode(reader, length) { + BatchGetAssetsHistoryResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.Asset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.assetType = reader.string(); - break; - case 3: - message.resource = $root.google.cloud.asset.v1beta1.Resource.decode(reader, reader.uint32()); - break; - case 4: - message.iamPolicy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + if (!(message.assets && message.assets.length)) + message.assets = []; + message.assets.push($root.google.cloud.asset.v1beta1.TemporalAsset.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -5780,147 +6216,124 @@ }; /** - * Decodes an Asset message from the specified reader or buffer, length delimited. + * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1beta1.Asset + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1beta1.Asset} Asset + * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Asset.decodeDelimited = function decodeDelimited(reader) { + BatchGetAssetsHistoryResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Asset message. + * Verifies a BatchGetAssetsHistoryResponse message. * @function verify - * @memberof google.cloud.asset.v1beta1.Asset + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Asset.verify = function verify(message) { + BatchGetAssetsHistoryResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.assetType != null && message.hasOwnProperty("assetType")) - if (!$util.isString(message.assetType)) - return "assetType: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.asset.v1beta1.Resource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) { - var error = $root.google.iam.v1.Policy.verify(message.iamPolicy); - if (error) - return "iamPolicy." + error; + if (message.assets != null && message.hasOwnProperty("assets")) { + if (!Array.isArray(message.assets)) + return "assets: array expected"; + for (var i = 0; i < message.assets.length; ++i) { + var error = $root.google.cloud.asset.v1beta1.TemporalAsset.verify(message.assets[i]); + if (error) + return "assets." + error; + } } return null; }; /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * Creates a BatchGetAssetsHistoryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1beta1.Asset + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1beta1.Asset} Asset + * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse */ - Asset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1beta1.Asset) + BatchGetAssetsHistoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse) return object; - var message = new $root.google.cloud.asset.v1beta1.Asset(); - if (object.name != null) - message.name = String(object.name); - if (object.assetType != null) - message.assetType = String(object.assetType); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.asset.v1beta1.Asset.resource: object expected"); - message.resource = $root.google.cloud.asset.v1beta1.Resource.fromObject(object.resource); - } - if (object.iamPolicy != null) { - if (typeof object.iamPolicy !== "object") - throw TypeError(".google.cloud.asset.v1beta1.Asset.iamPolicy: object expected"); - message.iamPolicy = $root.google.iam.v1.Policy.fromObject(object.iamPolicy); + var message = new $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse(); + if (object.assets) { + if (!Array.isArray(object.assets)) + throw TypeError(".google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.assets: array expected"); + message.assets = []; + for (var i = 0; i < object.assets.length; ++i) { + if (typeof object.assets[i] !== "object") + throw TypeError(".google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.assets: object expected"); + message.assets[i] = $root.google.cloud.asset.v1beta1.TemporalAsset.fromObject(object.assets[i]); + } } return message; }; /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. + * Creates a plain object from a BatchGetAssetsHistoryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1beta1.Asset + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse * @static - * @param {google.cloud.asset.v1beta1.Asset} message Asset + * @param {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Asset.toObject = function toObject(message, options) { + BatchGetAssetsHistoryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.assetType = ""; - object.resource = null; - object.iamPolicy = null; + if (options.arrays || options.defaults) + object.assets = []; + if (message.assets && message.assets.length) { + object.assets = []; + for (var j = 0; j < message.assets.length; ++j) + object.assets[j] = $root.google.cloud.asset.v1beta1.TemporalAsset.toObject(message.assets[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.assetType != null && message.hasOwnProperty("assetType")) - object.assetType = message.assetType; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.asset.v1beta1.Resource.toObject(message.resource, options); - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) - object.iamPolicy = $root.google.iam.v1.Policy.toObject(message.iamPolicy, options); return object; }; /** - * Converts this Asset to JSON. + * Converts this BatchGetAssetsHistoryResponse to JSON. * @function toJSON - * @memberof google.cloud.asset.v1beta1.Asset + * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse * @instance * @returns {Object.} JSON object */ - Asset.prototype.toJSON = function toJSON() { + BatchGetAssetsHistoryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Asset; + return BatchGetAssetsHistoryResponse; })(); - v1beta1.Resource = (function() { + v1beta1.OutputConfig = (function() { /** - * Properties of a Resource. + * Properties of an OutputConfig. * @memberof google.cloud.asset.v1beta1 - * @interface IResource - * @property {string|null} [version] Resource version - * @property {string|null} [discoveryDocumentUri] Resource discoveryDocumentUri - * @property {string|null} [discoveryName] Resource discoveryName - * @property {string|null} [resourceUrl] Resource resourceUrl - * @property {string|null} [parent] Resource parent - * @property {google.protobuf.IStruct|null} [data] Resource data + * @interface IOutputConfig + * @property {google.cloud.asset.v1beta1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination */ /** - * Constructs a new Resource. + * Constructs a new OutputConfig. * @memberof google.cloud.asset.v1beta1 - * @classdesc Represents a Resource. - * @implements IResource + * @classdesc Represents an OutputConfig. + * @implements IOutputConfig * @constructor - * @param {google.cloud.asset.v1beta1.IResource=} [properties] Properties to set + * @param {google.cloud.asset.v1beta1.IOutputConfig=} [properties] Properties to set */ - function Resource(properties) { + function OutputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5928,140 +6341,89 @@ } /** - * Resource version. - * @member {string} version - * @memberof google.cloud.asset.v1beta1.Resource - * @instance - */ - Resource.prototype.version = ""; - - /** - * Resource discoveryDocumentUri. - * @member {string} discoveryDocumentUri - * @memberof google.cloud.asset.v1beta1.Resource - * @instance - */ - Resource.prototype.discoveryDocumentUri = ""; - - /** - * Resource discoveryName. - * @member {string} discoveryName - * @memberof google.cloud.asset.v1beta1.Resource - * @instance - */ - Resource.prototype.discoveryName = ""; - - /** - * Resource resourceUrl. - * @member {string} resourceUrl - * @memberof google.cloud.asset.v1beta1.Resource + * OutputConfig gcsDestination. + * @member {google.cloud.asset.v1beta1.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.asset.v1beta1.OutputConfig * @instance */ - Resource.prototype.resourceUrl = ""; + OutputConfig.prototype.gcsDestination = null; - /** - * Resource parent. - * @member {string} parent - * @memberof google.cloud.asset.v1beta1.Resource - * @instance - */ - Resource.prototype.parent = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Resource data. - * @member {google.protobuf.IStruct|null|undefined} data - * @memberof google.cloud.asset.v1beta1.Resource + * OutputConfig destination. + * @member {"gcsDestination"|undefined} destination + * @memberof google.cloud.asset.v1beta1.OutputConfig * @instance */ - Resource.prototype.data = null; + Object.defineProperty(OutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Resource instance using the specified properties. + * Creates a new OutputConfig instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1beta1.Resource + * @memberof google.cloud.asset.v1beta1.OutputConfig * @static - * @param {google.cloud.asset.v1beta1.IResource=} [properties] Properties to set - * @returns {google.cloud.asset.v1beta1.Resource} Resource instance + * @param {google.cloud.asset.v1beta1.IOutputConfig=} [properties] Properties to set + * @returns {google.cloud.asset.v1beta1.OutputConfig} OutputConfig instance */ - Resource.create = function create(properties) { - return new Resource(properties); + OutputConfig.create = function create(properties) { + return new OutputConfig(properties); }; /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1beta1.Resource.verify|verify} messages. + * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.asset.v1beta1.OutputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1beta1.Resource + * @memberof google.cloud.asset.v1beta1.OutputConfig * @static - * @param {google.cloud.asset.v1beta1.IResource} message Resource message or plain object to encode + * @param {google.cloud.asset.v1beta1.IOutputConfig} message OutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Resource.encode = function encode(message, writer) { + OutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && message.hasOwnProperty("version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.discoveryDocumentUri); - if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.discoveryName); - if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUrl); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); - if (message.data != null && message.hasOwnProperty("data")) - $root.google.protobuf.Struct.encode(message.data, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) + $root.google.cloud.asset.v1beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.Resource.verify|verify} messages. + * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.OutputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1beta1.Resource + * @memberof google.cloud.asset.v1beta1.OutputConfig * @static - * @param {google.cloud.asset.v1beta1.IResource} message Resource message or plain object to encode + * @param {google.cloud.asset.v1beta1.IOutputConfig} message OutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Resource.encodeDelimited = function encodeDelimited(message, writer) { + OutputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Resource message from the specified reader or buffer. + * Decodes an OutputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1beta1.Resource + * @memberof google.cloud.asset.v1beta1.OutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1beta1.Resource} Resource + * @returns {google.cloud.asset.v1beta1.OutputConfig} OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Resource.decode = function decode(reader, length) { + OutputConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.Resource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.OutputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.version = reader.string(); - break; - case 2: - message.discoveryDocumentUri = reader.string(); - break; - case 3: - message.discoveryName = reader.string(); - break; - case 4: - message.resourceUrl = reader.string(); - break; - case 5: - message.parent = reader.string(); - break; - case 6: - message.data = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.gcsDestination = $root.google.cloud.asset.v1beta1.GcsDestination.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -6072,259 +6434,118 @@ }; /** - * Decodes a Resource message from the specified reader or buffer, length delimited. + * Decodes an OutputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1beta1.Resource + * @memberof google.cloud.asset.v1beta1.OutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1beta1.Resource} Resource + * @returns {google.cloud.asset.v1beta1.OutputConfig} OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Resource.decodeDelimited = function decodeDelimited(reader) { + OutputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Resource message. + * Verifies an OutputConfig message. * @function verify - * @memberof google.cloud.asset.v1beta1.Resource + * @memberof google.cloud.asset.v1beta1.OutputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Resource.verify = function verify(message) { + OutputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) - if (!$util.isString(message.discoveryDocumentUri)) - return "discoveryDocumentUri: string expected"; - if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) - if (!$util.isString(message.discoveryName)) - return "discoveryName: string expected"; - if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) - if (!$util.isString(message.resourceUrl)) - return "resourceUrl: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.data != null && message.hasOwnProperty("data")) { - var error = $root.google.protobuf.Struct.verify(message.data); - if (error) - return "data." + error; - } - return null; - }; - - /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.asset.v1beta1.Resource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1beta1.Resource} Resource - */ - Resource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1beta1.Resource) - return object; - var message = new $root.google.cloud.asset.v1beta1.Resource(); - if (object.version != null) - message.version = String(object.version); - if (object.discoveryDocumentUri != null) - message.discoveryDocumentUri = String(object.discoveryDocumentUri); - if (object.discoveryName != null) - message.discoveryName = String(object.discoveryName); - if (object.resourceUrl != null) - message.resourceUrl = String(object.resourceUrl); - if (object.parent != null) - message.parent = String(object.parent); - if (object.data != null) { - if (typeof object.data !== "object") - throw TypeError(".google.cloud.asset.v1beta1.Resource.data: object expected"); - message.data = $root.google.protobuf.Struct.fromObject(object.data); - } - return message; - }; - - /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.asset.v1beta1.Resource - * @static - * @param {google.cloud.asset.v1beta1.Resource} message Resource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Resource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.discoveryDocumentUri = ""; - object.discoveryName = ""; - object.resourceUrl = ""; - object.parent = ""; - object.data = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) - object.discoveryDocumentUri = message.discoveryDocumentUri; - if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) - object.discoveryName = message.discoveryName; - if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) - object.resourceUrl = message.resourceUrl; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.data != null && message.hasOwnProperty("data")) - object.data = $root.google.protobuf.Struct.toObject(message.data, options); - return object; - }; - - /** - * Converts this Resource to JSON. - * @function toJSON - * @memberof google.cloud.asset.v1beta1.Resource - * @instance - * @returns {Object.} JSON object - */ - Resource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Resource; - })(); - - v1beta1.AssetService = (function() { - - /** - * Constructs a new AssetService service. - * @memberof google.cloud.asset.v1beta1 - * @classdesc Represents an AssetService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function AssetService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (AssetService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AssetService; - - /** - * Creates new AssetService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.asset.v1beta1.AssetService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {AssetService} RPC service. Useful where requests and/or responses are streamed. - */ - AssetService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.asset.v1beta1.AssetService#exportAssets}. - * @memberof google.cloud.asset.v1beta1.AssetService - * @typedef ExportAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ExportAssets. - * @function exportAssets - * @memberof google.cloud.asset.v1beta1.AssetService - * @instance - * @param {google.cloud.asset.v1beta1.IExportAssetsRequest} request ExportAssetsRequest message or plain object - * @param {google.cloud.asset.v1beta1.AssetService.ExportAssetsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AssetService.prototype.exportAssets = function exportAssets(request, callback) { - return this.rpcCall(exportAssets, $root.google.cloud.asset.v1beta1.ExportAssetsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportAssets" }); - - /** - * Calls ExportAssets. - * @function exportAssets - * @memberof google.cloud.asset.v1beta1.AssetService - * @instance - * @param {google.cloud.asset.v1beta1.IExportAssetsRequest} request ExportAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.asset.v1beta1.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } + } + return null; + }; /** - * Callback as used by {@link google.cloud.asset.v1beta1.AssetService#batchGetAssetsHistory}. - * @memberof google.cloud.asset.v1beta1.AssetService - * @typedef BatchGetAssetsHistoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} [response] BatchGetAssetsHistoryResponse + * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.asset.v1beta1.OutputConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.asset.v1beta1.OutputConfig} OutputConfig */ + OutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1beta1.OutputConfig) + return object; + var message = new $root.google.cloud.asset.v1beta1.OutputConfig(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.asset.v1beta1.OutputConfig.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.asset.v1beta1.GcsDestination.fromObject(object.gcsDestination); + } + return message; + }; /** - * Calls BatchGetAssetsHistory. - * @function batchGetAssetsHistory - * @memberof google.cloud.asset.v1beta1.AssetService - * @instance - * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest} request BatchGetAssetsHistoryRequest message or plain object - * @param {google.cloud.asset.v1beta1.AssetService.BatchGetAssetsHistoryCallback} callback Node-style callback called with the error, if any, and BatchGetAssetsHistoryResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.asset.v1beta1.OutputConfig + * @static + * @param {google.cloud.asset.v1beta1.OutputConfig} message OutputConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(AssetService.prototype.batchGetAssetsHistory = function batchGetAssetsHistory(request, callback) { - return this.rpcCall(batchGetAssetsHistory, $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest, $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse, request, callback); - }, "name", { value: "BatchGetAssetsHistory" }); + OutputConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.asset.v1beta1.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.destination = "gcsDestination"; + } + return object; + }; /** - * Calls BatchGetAssetsHistory. - * @function batchGetAssetsHistory - * @memberof google.cloud.asset.v1beta1.AssetService + * Converts this OutputConfig to JSON. + * @function toJSON + * @memberof google.cloud.asset.v1beta1.OutputConfig * @instance - * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest} request BatchGetAssetsHistoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + OutputConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return AssetService; + return OutputConfig; })(); - v1beta1.ExportAssetsRequest = (function() { + v1beta1.GcsDestination = (function() { /** - * Properties of an ExportAssetsRequest. + * Properties of a GcsDestination. * @memberof google.cloud.asset.v1beta1 - * @interface IExportAssetsRequest - * @property {string|null} [parent] ExportAssetsRequest parent - * @property {google.protobuf.ITimestamp|null} [readTime] ExportAssetsRequest readTime - * @property {Array.|null} [assetTypes] ExportAssetsRequest assetTypes - * @property {google.cloud.asset.v1beta1.ContentType|null} [contentType] ExportAssetsRequest contentType - * @property {google.cloud.asset.v1beta1.IOutputConfig|null} [outputConfig] ExportAssetsRequest outputConfig + * @interface IGcsDestination + * @property {string|null} [uri] GcsDestination uri + * @property {string|null} [uriPrefix] GcsDestination uriPrefix */ /** - * Constructs a new ExportAssetsRequest. + * Constructs a new GcsDestination. * @memberof google.cloud.asset.v1beta1 - * @classdesc Represents an ExportAssetsRequest. - * @implements IExportAssetsRequest + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination * @constructor - * @param {google.cloud.asset.v1beta1.IExportAssetsRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1beta1.IGcsDestination=} [properties] Properties to set */ - function ExportAssetsRequest(properties) { - this.assetTypes = []; + function GcsDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6332,130 +6553,102 @@ } /** - * ExportAssetsRequest parent. - * @member {string} parent - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest - * @instance - */ - ExportAssetsRequest.prototype.parent = ""; - - /** - * ExportAssetsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * GcsDestination uri. + * @member {string} uri + * @memberof google.cloud.asset.v1beta1.GcsDestination * @instance */ - ExportAssetsRequest.prototype.readTime = null; + GcsDestination.prototype.uri = ""; /** - * ExportAssetsRequest assetTypes. - * @member {Array.} assetTypes - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * GcsDestination uriPrefix. + * @member {string} uriPrefix + * @memberof google.cloud.asset.v1beta1.GcsDestination * @instance */ - ExportAssetsRequest.prototype.assetTypes = $util.emptyArray; + GcsDestination.prototype.uriPrefix = ""; - /** - * ExportAssetsRequest contentType. - * @member {google.cloud.asset.v1beta1.ContentType} contentType - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest - * @instance - */ - ExportAssetsRequest.prototype.contentType = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ExportAssetsRequest outputConfig. - * @member {google.cloud.asset.v1beta1.IOutputConfig|null|undefined} outputConfig - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * GcsDestination objectUri. + * @member {"uri"|"uriPrefix"|undefined} objectUri + * @memberof google.cloud.asset.v1beta1.GcsDestination * @instance */ - ExportAssetsRequest.prototype.outputConfig = null; + Object.defineProperty(GcsDestination.prototype, "objectUri", { + get: $util.oneOfGetter($oneOfFields = ["uri", "uriPrefix"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ExportAssetsRequest instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * @memberof google.cloud.asset.v1beta1.GcsDestination * @static - * @param {google.cloud.asset.v1beta1.IExportAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1beta1.ExportAssetsRequest} ExportAssetsRequest instance + * @param {google.cloud.asset.v1beta1.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.asset.v1beta1.GcsDestination} GcsDestination instance */ - ExportAssetsRequest.create = function create(properties) { - return new ExportAssetsRequest(properties); + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); }; /** - * Encodes the specified ExportAssetsRequest message. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsRequest.verify|verify} messages. + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.asset.v1beta1.GcsDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * @memberof google.cloud.asset.v1beta1.GcsDestination * @static - * @param {google.cloud.asset.v1beta1.IExportAssetsRequest} message ExportAssetsRequest message or plain object to encode + * @param {google.cloud.asset.v1beta1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAssetsRequest.encode = function encode(message, writer) { + GcsDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.assetTypes != null && message.assetTypes.length) - for (var i = 0; i < message.assetTypes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetTypes[i]); - if (message.contentType != null && message.hasOwnProperty("contentType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.contentType); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - $root.google.cloud.asset.v1beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.uri != null && message.hasOwnProperty("uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uriPrefix); return writer; }; /** - * Encodes the specified ExportAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsRequest.verify|verify} messages. + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.GcsDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * @memberof google.cloud.asset.v1beta1.GcsDestination * @static - * @param {google.cloud.asset.v1beta1.IExportAssetsRequest} message ExportAssetsRequest message or plain object to encode + * @param {google.cloud.asset.v1beta1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportAssetsRequest message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * @memberof google.cloud.asset.v1beta1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1beta1.ExportAssetsRequest} ExportAssetsRequest + * @returns {google.cloud.asset.v1beta1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAssetsRequest.decode = function decode(reader, length) { + GcsDestination.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.ExportAssetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.GcsDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.uri = reader.string(); break; case 2: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.assetTypes && message.assetTypes.length)) - message.assetTypes = []; - message.assetTypes.push(reader.string()); - break; - case 4: - message.contentType = reader.int32(); - break; - case 5: - message.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.decode(reader, reader.uint32()); + message.uriPrefix = reader.string(); break; default: reader.skipType(tag & 7); @@ -6466,182 +6659,143 @@ }; /** - * Decodes an ExportAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * @memberof google.cloud.asset.v1beta1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1beta1.ExportAssetsRequest} ExportAssetsRequest + * @returns {google.cloud.asset.v1beta1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + GcsDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportAssetsRequest message. + * Verifies a GcsDestination message. * @function verify - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * @memberof google.cloud.asset.v1beta1.GcsDestination * @static * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportAssetsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.assetTypes != null && message.hasOwnProperty("assetTypes")) { - if (!Array.isArray(message.assetTypes)) - return "assetTypes: array expected"; - for (var i = 0; i < message.assetTypes.length; ++i) - if (!$util.isString(message.assetTypes[i])) - return "assetTypes: string[] expected"; - } - if (message.contentType != null && message.hasOwnProperty("contentType")) - switch (message.contentType) { - default: - return "contentType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { - var error = $root.google.cloud.asset.v1beta1.OutputConfig.verify(message.outputConfig); - if (error) - return "outputConfig." + error; + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + properties.objectUri = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) { + if (properties.objectUri === 1) + return "objectUri: multiple values"; + properties.objectUri = 1; + if (!$util.isString(message.uriPrefix)) + return "uriPrefix: string expected"; } return null; }; /** - * Creates an ExportAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * @memberof google.cloud.asset.v1beta1.GcsDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1beta1.ExportAssetsRequest} ExportAssetsRequest + * @returns {google.cloud.asset.v1beta1.GcsDestination} GcsDestination */ - ExportAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1beta1.ExportAssetsRequest) + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1beta1.GcsDestination) return object; - var message = new $root.google.cloud.asset.v1beta1.ExportAssetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.asset.v1beta1.ExportAssetsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.assetTypes) { - if (!Array.isArray(object.assetTypes)) - throw TypeError(".google.cloud.asset.v1beta1.ExportAssetsRequest.assetTypes: array expected"); - message.assetTypes = []; - for (var i = 0; i < object.assetTypes.length; ++i) - message.assetTypes[i] = String(object.assetTypes[i]); - } - switch (object.contentType) { - case "CONTENT_TYPE_UNSPECIFIED": - case 0: - message.contentType = 0; - break; - case "RESOURCE": - case 1: - message.contentType = 1; - break; - case "IAM_POLICY": - case 2: - message.contentType = 2; - break; - } - if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") - throw TypeError(".google.cloud.asset.v1beta1.ExportAssetsRequest.outputConfig: object expected"); - message.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.fromObject(object.outputConfig); - } + var message = new $root.google.cloud.asset.v1beta1.GcsDestination(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.uriPrefix != null) + message.uriPrefix = String(object.uriPrefix); return message; }; /** - * Creates a plain object from an ExportAssetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * @memberof google.cloud.asset.v1beta1.GcsDestination * @static - * @param {google.cloud.asset.v1beta1.ExportAssetsRequest} message ExportAssetsRequest + * @param {google.cloud.asset.v1beta1.GcsDestination} message GcsDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportAssetsRequest.toObject = function toObject(message, options) { + GcsDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.assetTypes = []; - if (options.defaults) { - object.parent = ""; - object.readTime = null; - object.contentType = options.enums === String ? "CONTENT_TYPE_UNSPECIFIED" : 0; - object.outputConfig = null; + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.objectUri = "uri"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.assetTypes && message.assetTypes.length) { - object.assetTypes = []; - for (var j = 0; j < message.assetTypes.length; ++j) - object.assetTypes[j] = message.assetTypes[j]; + if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) { + object.uriPrefix = message.uriPrefix; + if (options.oneofs) + object.objectUri = "uriPrefix"; } - if (message.contentType != null && message.hasOwnProperty("contentType")) - object.contentType = options.enums === String ? $root.google.cloud.asset.v1beta1.ContentType[message.contentType] : message.contentType; - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.toObject(message.outputConfig, options); return object; }; /** - * Converts this ExportAssetsRequest to JSON. + * Converts this GcsDestination to JSON. * @function toJSON - * @memberof google.cloud.asset.v1beta1.ExportAssetsRequest + * @memberof google.cloud.asset.v1beta1.GcsDestination * @instance * @returns {Object.} JSON object */ - ExportAssetsRequest.prototype.toJSON = function toJSON() { + GcsDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExportAssetsRequest; + return GcsDestination; })(); - v1beta1.ExportAssetsResponse = (function() { + /** + * ContentType enum. + * @name google.cloud.asset.v1beta1.ContentType + * @enum {string} + * @property {number} CONTENT_TYPE_UNSPECIFIED=0 CONTENT_TYPE_UNSPECIFIED value + * @property {number} RESOURCE=1 RESOURCE value + * @property {number} IAM_POLICY=2 IAM_POLICY value + */ + v1beta1.ContentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RESOURCE"] = 1; + values[valuesById[2] = "IAM_POLICY"] = 2; + return values; + })(); + + v1beta1.TemporalAsset = (function() { /** - * Properties of an ExportAssetsResponse. + * Properties of a TemporalAsset. * @memberof google.cloud.asset.v1beta1 - * @interface IExportAssetsResponse - * @property {google.protobuf.ITimestamp|null} [readTime] ExportAssetsResponse readTime - * @property {google.cloud.asset.v1beta1.IOutputConfig|null} [outputConfig] ExportAssetsResponse outputConfig + * @interface ITemporalAsset + * @property {google.cloud.asset.v1beta1.ITimeWindow|null} [window] TemporalAsset window + * @property {boolean|null} [deleted] TemporalAsset deleted + * @property {google.cloud.asset.v1beta1.IAsset|null} [asset] TemporalAsset asset */ /** - * Constructs a new ExportAssetsResponse. + * Constructs a new TemporalAsset. * @memberof google.cloud.asset.v1beta1 - * @classdesc Represents an ExportAssetsResponse. - * @implements IExportAssetsResponse + * @classdesc Represents a TemporalAsset. + * @implements ITemporalAsset * @constructor - * @param {google.cloud.asset.v1beta1.IExportAssetsResponse=} [properties] Properties to set + * @param {google.cloud.asset.v1beta1.ITemporalAsset=} [properties] Properties to set */ - function ExportAssetsResponse(properties) { + function TemporalAsset(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6649,88 +6803,101 @@ } /** - * ExportAssetsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse + * TemporalAsset window. + * @member {google.cloud.asset.v1beta1.ITimeWindow|null|undefined} window + * @memberof google.cloud.asset.v1beta1.TemporalAsset * @instance */ - ExportAssetsResponse.prototype.readTime = null; + TemporalAsset.prototype.window = null; /** - * ExportAssetsResponse outputConfig. - * @member {google.cloud.asset.v1beta1.IOutputConfig|null|undefined} outputConfig - * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse + * TemporalAsset deleted. + * @member {boolean} deleted + * @memberof google.cloud.asset.v1beta1.TemporalAsset * @instance */ - ExportAssetsResponse.prototype.outputConfig = null; + TemporalAsset.prototype.deleted = false; /** - * Creates a new ExportAssetsResponse instance using the specified properties. + * TemporalAsset asset. + * @member {google.cloud.asset.v1beta1.IAsset|null|undefined} asset + * @memberof google.cloud.asset.v1beta1.TemporalAsset + * @instance + */ + TemporalAsset.prototype.asset = null; + + /** + * Creates a new TemporalAsset instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse + * @memberof google.cloud.asset.v1beta1.TemporalAsset * @static - * @param {google.cloud.asset.v1beta1.IExportAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.asset.v1beta1.ExportAssetsResponse} ExportAssetsResponse instance + * @param {google.cloud.asset.v1beta1.ITemporalAsset=} [properties] Properties to set + * @returns {google.cloud.asset.v1beta1.TemporalAsset} TemporalAsset instance */ - ExportAssetsResponse.create = function create(properties) { - return new ExportAssetsResponse(properties); + TemporalAsset.create = function create(properties) { + return new TemporalAsset(properties); }; /** - * Encodes the specified ExportAssetsResponse message. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsResponse.verify|verify} messages. + * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1beta1.TemporalAsset.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse + * @memberof google.cloud.asset.v1beta1.TemporalAsset * @static - * @param {google.cloud.asset.v1beta1.IExportAssetsResponse} message ExportAssetsResponse message or plain object to encode + * @param {google.cloud.asset.v1beta1.ITemporalAsset} message TemporalAsset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAssetsResponse.encode = function encode(message, writer) { + TemporalAsset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.readTime != null && message.hasOwnProperty("readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - $root.google.cloud.asset.v1beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.window != null && message.hasOwnProperty("window")) + $root.google.cloud.asset.v1beta1.TimeWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deleted != null && message.hasOwnProperty("deleted")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.deleted); + if (message.asset != null && message.hasOwnProperty("asset")) + $root.google.cloud.asset.v1beta1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExportAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.ExportAssetsResponse.verify|verify} messages. + * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.TemporalAsset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse + * @memberof google.cloud.asset.v1beta1.TemporalAsset * @static - * @param {google.cloud.asset.v1beta1.IExportAssetsResponse} message ExportAssetsResponse message or plain object to encode + * @param {google.cloud.asset.v1beta1.ITemporalAsset} message TemporalAsset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + TemporalAsset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportAssetsResponse message from the specified reader or buffer. + * Decodes a TemporalAsset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse + * @memberof google.cloud.asset.v1beta1.TemporalAsset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1beta1.ExportAssetsResponse} ExportAssetsResponse + * @returns {google.cloud.asset.v1beta1.TemporalAsset} TemporalAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAssetsResponse.decode = function decode(reader, length) { + TemporalAsset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.ExportAssetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.TemporalAsset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.window = $root.google.cloud.asset.v1beta1.TimeWindow.decode(reader, reader.uint32()); break; case 2: - message.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.decode(reader, reader.uint32()); + message.deleted = reader.bool(); + break; + case 3: + message.asset = $root.google.cloud.asset.v1beta1.Asset.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -6741,130 +6908,135 @@ }; /** - * Decodes an ExportAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse + * @memberof google.cloud.asset.v1beta1.TemporalAsset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1beta1.ExportAssetsResponse} ExportAssetsResponse + * @returns {google.cloud.asset.v1beta1.TemporalAsset} TemporalAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + TemporalAsset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportAssetsResponse message. + * Verifies a TemporalAsset message. * @function verify - * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse + * @memberof google.cloud.asset.v1beta1.TemporalAsset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportAssetsResponse.verify = function verify(message) { + TemporalAsset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (message.window != null && message.hasOwnProperty("window")) { + var error = $root.google.cloud.asset.v1beta1.TimeWindow.verify(message.window); if (error) - return "readTime." + error; + return "window." + error; } - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { - var error = $root.google.cloud.asset.v1beta1.OutputConfig.verify(message.outputConfig); + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.asset.v1beta1.Asset.verify(message.asset); if (error) - return "outputConfig." + error; + return "asset." + error; } return null; }; /** - * Creates an ExportAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse + * @memberof google.cloud.asset.v1beta1.TemporalAsset * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1beta1.ExportAssetsResponse} ExportAssetsResponse + * @returns {google.cloud.asset.v1beta1.TemporalAsset} TemporalAsset */ - ExportAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1beta1.ExportAssetsResponse) + TemporalAsset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1beta1.TemporalAsset) return object; - var message = new $root.google.cloud.asset.v1beta1.ExportAssetsResponse(); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.asset.v1beta1.ExportAssetsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + var message = new $root.google.cloud.asset.v1beta1.TemporalAsset(); + if (object.window != null) { + if (typeof object.window !== "object") + throw TypeError(".google.cloud.asset.v1beta1.TemporalAsset.window: object expected"); + message.window = $root.google.cloud.asset.v1beta1.TimeWindow.fromObject(object.window); } - if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") - throw TypeError(".google.cloud.asset.v1beta1.ExportAssetsResponse.outputConfig: object expected"); - message.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.fromObject(object.outputConfig); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.asset.v1beta1.TemporalAsset.asset: object expected"); + message.asset = $root.google.cloud.asset.v1beta1.Asset.fromObject(object.asset); } return message; }; /** - * Creates a plain object from an ExportAssetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse + * @memberof google.cloud.asset.v1beta1.TemporalAsset * @static - * @param {google.cloud.asset.v1beta1.ExportAssetsResponse} message ExportAssetsResponse + * @param {google.cloud.asset.v1beta1.TemporalAsset} message TemporalAsset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportAssetsResponse.toObject = function toObject(message, options) { + TemporalAsset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.readTime = null; - object.outputConfig = null; + object.window = null; + object.deleted = false; + object.asset = null; } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.asset.v1beta1.OutputConfig.toObject(message.outputConfig, options); + if (message.window != null && message.hasOwnProperty("window")) + object.window = $root.google.cloud.asset.v1beta1.TimeWindow.toObject(message.window, options); + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.asset.v1beta1.Asset.toObject(message.asset, options); return object; }; /** - * Converts this ExportAssetsResponse to JSON. + * Converts this TemporalAsset to JSON. * @function toJSON - * @memberof google.cloud.asset.v1beta1.ExportAssetsResponse + * @memberof google.cloud.asset.v1beta1.TemporalAsset * @instance * @returns {Object.} JSON object */ - ExportAssetsResponse.prototype.toJSON = function toJSON() { + TemporalAsset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExportAssetsResponse; + return TemporalAsset; })(); - v1beta1.BatchGetAssetsHistoryRequest = (function() { + v1beta1.TimeWindow = (function() { /** - * Properties of a BatchGetAssetsHistoryRequest. + * Properties of a TimeWindow. * @memberof google.cloud.asset.v1beta1 - * @interface IBatchGetAssetsHistoryRequest - * @property {string|null} [parent] BatchGetAssetsHistoryRequest parent - * @property {Array.|null} [assetNames] BatchGetAssetsHistoryRequest assetNames - * @property {google.cloud.asset.v1beta1.ContentType|null} [contentType] BatchGetAssetsHistoryRequest contentType - * @property {google.cloud.asset.v1beta1.ITimeWindow|null} [readTimeWindow] BatchGetAssetsHistoryRequest readTimeWindow + * @interface ITimeWindow + * @property {google.protobuf.ITimestamp|null} [startTime] TimeWindow startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TimeWindow endTime */ /** - * Constructs a new BatchGetAssetsHistoryRequest. + * Constructs a new TimeWindow. * @memberof google.cloud.asset.v1beta1 - * @classdesc Represents a BatchGetAssetsHistoryRequest. - * @implements IBatchGetAssetsHistoryRequest + * @classdesc Represents a TimeWindow. + * @implements ITimeWindow * @constructor - * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1beta1.ITimeWindow=} [properties] Properties to set */ - function BatchGetAssetsHistoryRequest(properties) { - this.assetNames = []; + function TimeWindow(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6872,117 +7044,88 @@ } /** - * BatchGetAssetsHistoryRequest parent. - * @member {string} parent - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest - * @instance - */ - BatchGetAssetsHistoryRequest.prototype.parent = ""; - - /** - * BatchGetAssetsHistoryRequest assetNames. - * @member {Array.} assetNames - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest - * @instance - */ - BatchGetAssetsHistoryRequest.prototype.assetNames = $util.emptyArray; - - /** - * BatchGetAssetsHistoryRequest contentType. - * @member {google.cloud.asset.v1beta1.ContentType} contentType - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * TimeWindow startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.asset.v1beta1.TimeWindow * @instance */ - BatchGetAssetsHistoryRequest.prototype.contentType = 0; + TimeWindow.prototype.startTime = null; /** - * BatchGetAssetsHistoryRequest readTimeWindow. - * @member {google.cloud.asset.v1beta1.ITimeWindow|null|undefined} readTimeWindow - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * TimeWindow endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.asset.v1beta1.TimeWindow * @instance */ - BatchGetAssetsHistoryRequest.prototype.readTimeWindow = null; + TimeWindow.prototype.endTime = null; /** - * Creates a new BatchGetAssetsHistoryRequest instance using the specified properties. + * Creates a new TimeWindow instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1beta1.TimeWindow * @static - * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest instance + * @param {google.cloud.asset.v1beta1.ITimeWindow=} [properties] Properties to set + * @returns {google.cloud.asset.v1beta1.TimeWindow} TimeWindow instance */ - BatchGetAssetsHistoryRequest.create = function create(properties) { - return new BatchGetAssetsHistoryRequest(properties); + TimeWindow.create = function create(properties) { + return new TimeWindow(properties); }; /** - * Encodes the specified BatchGetAssetsHistoryRequest message. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.verify|verify} messages. + * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1beta1.TimeWindow.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1beta1.TimeWindow * @static - * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest message or plain object to encode + * @param {google.cloud.asset.v1beta1.ITimeWindow} message TimeWindow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchGetAssetsHistoryRequest.encode = function encode(message, writer) { + TimeWindow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.assetNames != null && message.assetNames.length) - for (var i = 0; i < message.assetNames.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetNames[i]); - if (message.contentType != null && message.hasOwnProperty("contentType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contentType); - if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) - $root.google.cloud.asset.v1beta1.TimeWindow.encode(message.readTimeWindow, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchGetAssetsHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.verify|verify} messages. + * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.TimeWindow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1beta1.TimeWindow * @static - * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest message or plain object to encode + * @param {google.cloud.asset.v1beta1.ITimeWindow} message TimeWindow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchGetAssetsHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + TimeWindow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer. + * Decodes a TimeWindow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1beta1.TimeWindow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest + * @returns {google.cloud.asset.v1beta1.TimeWindow} TimeWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchGetAssetsHistoryRequest.decode = function decode(reader, length) { + TimeWindow.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.TimeWindow(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 2: - if (!(message.assetNames && message.assetNames.length)) - message.assetNames = []; - message.assetNames.push(reader.string()); - break; - case 3: - message.contentType = reader.int32(); - break; - case 4: - message.readTimeWindow = $root.google.cloud.asset.v1beta1.TimeWindow.decode(reader, reader.uint32()); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -6993,169 +7136,129 @@ }; /** - * Decodes a BatchGetAssetsHistoryRequest message from the specified reader or buffer, length delimited. + * Decodes a TimeWindow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1beta1.TimeWindow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest + * @returns {google.cloud.asset.v1beta1.TimeWindow} TimeWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchGetAssetsHistoryRequest.decodeDelimited = function decodeDelimited(reader) { + TimeWindow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchGetAssetsHistoryRequest message. + * Verifies a TimeWindow message. * @function verify - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1beta1.TimeWindow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchGetAssetsHistoryRequest.verify = function verify(message) { + TimeWindow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.assetNames != null && message.hasOwnProperty("assetNames")) { - if (!Array.isArray(message.assetNames)) - return "assetNames: array expected"; - for (var i = 0; i < message.assetNames.length; ++i) - if (!$util.isString(message.assetNames[i])) - return "assetNames: string[] expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; } - if (message.contentType != null && message.hasOwnProperty("contentType")) - switch (message.contentType) { - default: - return "contentType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) { - var error = $root.google.cloud.asset.v1beta1.TimeWindow.verify(message.readTimeWindow); + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); if (error) - return "readTimeWindow." + error; + return "endTime." + error; } return null; }; /** - * Creates a BatchGetAssetsHistoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1beta1.TimeWindow * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest} BatchGetAssetsHistoryRequest + * @returns {google.cloud.asset.v1beta1.TimeWindow} TimeWindow */ - BatchGetAssetsHistoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest) + TimeWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1beta1.TimeWindow) return object; - var message = new $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.assetNames) { - if (!Array.isArray(object.assetNames)) - throw TypeError(".google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.assetNames: array expected"); - message.assetNames = []; - for (var i = 0; i < object.assetNames.length; ++i) - message.assetNames[i] = String(object.assetNames[i]); - } - switch (object.contentType) { - case "CONTENT_TYPE_UNSPECIFIED": - case 0: - message.contentType = 0; - break; - case "RESOURCE": - case 1: - message.contentType = 1; - break; - case "IAM_POLICY": - case 2: - message.contentType = 2; - break; + var message = new $root.google.cloud.asset.v1beta1.TimeWindow(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.asset.v1beta1.TimeWindow.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); } - if (object.readTimeWindow != null) { - if (typeof object.readTimeWindow !== "object") - throw TypeError(".google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest.readTimeWindow: object expected"); - message.readTimeWindow = $root.google.cloud.asset.v1beta1.TimeWindow.fromObject(object.readTimeWindow); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.asset.v1beta1.TimeWindow.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } return message; }; /** - * Creates a plain object from a BatchGetAssetsHistoryRequest message. Also converts values to other types if specified. + * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1beta1.TimeWindow * @static - * @param {google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest} message BatchGetAssetsHistoryRequest + * @param {google.cloud.asset.v1beta1.TimeWindow} message TimeWindow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchGetAssetsHistoryRequest.toObject = function toObject(message, options) { + TimeWindow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.assetNames = []; if (options.defaults) { - object.parent = ""; - object.contentType = options.enums === String ? "CONTENT_TYPE_UNSPECIFIED" : 0; - object.readTimeWindow = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.assetNames && message.assetNames.length) { - object.assetNames = []; - for (var j = 0; j < message.assetNames.length; ++j) - object.assetNames[j] = message.assetNames[j]; + object.startTime = null; + object.endTime = null; } - if (message.contentType != null && message.hasOwnProperty("contentType")) - object.contentType = options.enums === String ? $root.google.cloud.asset.v1beta1.ContentType[message.contentType] : message.contentType; - if (message.readTimeWindow != null && message.hasOwnProperty("readTimeWindow")) - object.readTimeWindow = $root.google.cloud.asset.v1beta1.TimeWindow.toObject(message.readTimeWindow, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); return object; }; /** - * Converts this BatchGetAssetsHistoryRequest to JSON. + * Converts this TimeWindow to JSON. * @function toJSON - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest + * @memberof google.cloud.asset.v1beta1.TimeWindow * @instance * @returns {Object.} JSON object */ - BatchGetAssetsHistoryRequest.prototype.toJSON = function toJSON() { + TimeWindow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchGetAssetsHistoryRequest; + return TimeWindow; })(); - v1beta1.BatchGetAssetsHistoryResponse = (function() { + v1beta1.Asset = (function() { /** - * Properties of a BatchGetAssetsHistoryResponse. + * Properties of an Asset. * @memberof google.cloud.asset.v1beta1 - * @interface IBatchGetAssetsHistoryResponse - * @property {Array.|null} [assets] BatchGetAssetsHistoryResponse assets + * @interface IAsset + * @property {string|null} [name] Asset name + * @property {string|null} [assetType] Asset assetType + * @property {google.cloud.asset.v1beta1.IResource|null} [resource] Asset resource + * @property {google.iam.v1.IPolicy|null} [iamPolicy] Asset iamPolicy */ /** - * Constructs a new BatchGetAssetsHistoryResponse. + * Constructs a new Asset. * @memberof google.cloud.asset.v1beta1 - * @classdesc Represents a BatchGetAssetsHistoryResponse. - * @implements IBatchGetAssetsHistoryResponse + * @classdesc Represents an Asset. + * @implements IAsset * @constructor - * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse=} [properties] Properties to set + * @param {google.cloud.asset.v1beta1.IAsset=} [properties] Properties to set */ - function BatchGetAssetsHistoryResponse(properties) { - this.assets = []; + function Asset(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7163,78 +7266,114 @@ } /** - * BatchGetAssetsHistoryResponse assets. - * @member {Array.} assets - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse + * Asset name. + * @member {string} name + * @memberof google.cloud.asset.v1beta1.Asset * @instance */ - BatchGetAssetsHistoryResponse.prototype.assets = $util.emptyArray; + Asset.prototype.name = ""; /** - * Creates a new BatchGetAssetsHistoryResponse instance using the specified properties. + * Asset assetType. + * @member {string} assetType + * @memberof google.cloud.asset.v1beta1.Asset + * @instance + */ + Asset.prototype.assetType = ""; + + /** + * Asset resource. + * @member {google.cloud.asset.v1beta1.IResource|null|undefined} resource + * @memberof google.cloud.asset.v1beta1.Asset + * @instance + */ + Asset.prototype.resource = null; + + /** + * Asset iamPolicy. + * @member {google.iam.v1.IPolicy|null|undefined} iamPolicy + * @memberof google.cloud.asset.v1beta1.Asset + * @instance + */ + Asset.prototype.iamPolicy = null; + + /** + * Creates a new Asset instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1beta1.Asset * @static - * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse=} [properties] Properties to set - * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse instance + * @param {google.cloud.asset.v1beta1.IAsset=} [properties] Properties to set + * @returns {google.cloud.asset.v1beta1.Asset} Asset instance */ - BatchGetAssetsHistoryResponse.create = function create(properties) { - return new BatchGetAssetsHistoryResponse(properties); + Asset.create = function create(properties) { + return new Asset(properties); }; /** - * Encodes the specified BatchGetAssetsHistoryResponse message. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.verify|verify} messages. + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1beta1.Asset.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1beta1.Asset * @static - * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse message or plain object to encode + * @param {google.cloud.asset.v1beta1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchGetAssetsHistoryResponse.encode = function encode(message, writer) { + Asset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.assets != null && message.assets.length) - for (var i = 0; i < message.assets.length; ++i) - $root.google.cloud.asset.v1beta1.TemporalAsset.encode(message.assets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.assetType != null && message.hasOwnProperty("assetType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetType); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.cloud.asset.v1beta1.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) + $root.google.iam.v1.Policy.encode(message.iamPolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchGetAssetsHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.verify|verify} messages. + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.Asset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1beta1.Asset * @static - * @param {google.cloud.asset.v1beta1.IBatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse message or plain object to encode + * @param {google.cloud.asset.v1beta1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchGetAssetsHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + Asset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer. + * Decodes an Asset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1beta1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse + * @returns {google.cloud.asset.v1beta1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchGetAssetsHistoryResponse.decode = function decode(reader, length) { + Asset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.Asset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.assets && message.assets.length)) - message.assets = []; - message.assets.push($root.google.cloud.asset.v1beta1.TemporalAsset.decode(reader, reader.uint32())); + message.name = reader.string(); + break; + case 2: + message.assetType = reader.string(); + break; + case 3: + message.resource = $root.google.cloud.asset.v1beta1.Resource.decode(reader, reader.uint32()); + break; + case 4: + message.iamPolicy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7245,124 +7384,147 @@ }; /** - * Decodes a BatchGetAssetsHistoryResponse message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1beta1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse + * @returns {google.cloud.asset.v1beta1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchGetAssetsHistoryResponse.decodeDelimited = function decodeDelimited(reader) { + Asset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchGetAssetsHistoryResponse message. + * Verifies an Asset message. * @function verify - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1beta1.Asset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchGetAssetsHistoryResponse.verify = function verify(message) { + Asset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.assets != null && message.hasOwnProperty("assets")) { - if (!Array.isArray(message.assets)) - return "assets: array expected"; - for (var i = 0; i < message.assets.length; ++i) { - var error = $root.google.cloud.asset.v1beta1.TemporalAsset.verify(message.assets[i]); - if (error) - return "assets." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.assetType != null && message.hasOwnProperty("assetType")) + if (!$util.isString(message.assetType)) + return "assetType: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.asset.v1beta1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) { + var error = $root.google.iam.v1.Policy.verify(message.iamPolicy); + if (error) + return "iamPolicy." + error; } return null; }; /** - * Creates a BatchGetAssetsHistoryResponse message from a plain object. Also converts values to their respective internal types. + * Creates an Asset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1beta1.Asset * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} BatchGetAssetsHistoryResponse + * @returns {google.cloud.asset.v1beta1.Asset} Asset */ - BatchGetAssetsHistoryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse) + Asset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1beta1.Asset) return object; - var message = new $root.google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse(); - if (object.assets) { - if (!Array.isArray(object.assets)) - throw TypeError(".google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.assets: array expected"); - message.assets = []; - for (var i = 0; i < object.assets.length; ++i) { - if (typeof object.assets[i] !== "object") - throw TypeError(".google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse.assets: object expected"); - message.assets[i] = $root.google.cloud.asset.v1beta1.TemporalAsset.fromObject(object.assets[i]); - } + var message = new $root.google.cloud.asset.v1beta1.Asset(); + if (object.name != null) + message.name = String(object.name); + if (object.assetType != null) + message.assetType = String(object.assetType); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.asset.v1beta1.Asset.resource: object expected"); + message.resource = $root.google.cloud.asset.v1beta1.Resource.fromObject(object.resource); + } + if (object.iamPolicy != null) { + if (typeof object.iamPolicy !== "object") + throw TypeError(".google.cloud.asset.v1beta1.Asset.iamPolicy: object expected"); + message.iamPolicy = $root.google.iam.v1.Policy.fromObject(object.iamPolicy); } return message; }; /** - * Creates a plain object from a BatchGetAssetsHistoryResponse message. Also converts values to other types if specified. + * Creates a plain object from an Asset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1beta1.Asset * @static - * @param {google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse} message BatchGetAssetsHistoryResponse + * @param {google.cloud.asset.v1beta1.Asset} message Asset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchGetAssetsHistoryResponse.toObject = function toObject(message, options) { + Asset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.assets = []; - if (message.assets && message.assets.length) { - object.assets = []; - for (var j = 0; j < message.assets.length; ++j) - object.assets[j] = $root.google.cloud.asset.v1beta1.TemporalAsset.toObject(message.assets[j], options); + if (options.defaults) { + object.name = ""; + object.assetType = ""; + object.resource = null; + object.iamPolicy = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.assetType != null && message.hasOwnProperty("assetType")) + object.assetType = message.assetType; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.asset.v1beta1.Resource.toObject(message.resource, options); + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) + object.iamPolicy = $root.google.iam.v1.Policy.toObject(message.iamPolicy, options); return object; }; /** - * Converts this BatchGetAssetsHistoryResponse to JSON. + * Converts this Asset to JSON. * @function toJSON - * @memberof google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse + * @memberof google.cloud.asset.v1beta1.Asset * @instance * @returns {Object.} JSON object */ - BatchGetAssetsHistoryResponse.prototype.toJSON = function toJSON() { + Asset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchGetAssetsHistoryResponse; + return Asset; })(); - v1beta1.OutputConfig = (function() { + v1beta1.Resource = (function() { /** - * Properties of an OutputConfig. + * Properties of a Resource. * @memberof google.cloud.asset.v1beta1 - * @interface IOutputConfig - * @property {google.cloud.asset.v1beta1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination + * @interface IResource + * @property {string|null} [version] Resource version + * @property {string|null} [discoveryDocumentUri] Resource discoveryDocumentUri + * @property {string|null} [discoveryName] Resource discoveryName + * @property {string|null} [resourceUrl] Resource resourceUrl + * @property {string|null} [parent] Resource parent + * @property {google.protobuf.IStruct|null} [data] Resource data */ /** - * Constructs a new OutputConfig. + * Constructs a new Resource. * @memberof google.cloud.asset.v1beta1 - * @classdesc Represents an OutputConfig. - * @implements IOutputConfig + * @classdesc Represents a Resource. + * @implements IResource * @constructor - * @param {google.cloud.asset.v1beta1.IOutputConfig=} [properties] Properties to set + * @param {google.cloud.asset.v1beta1.IResource=} [properties] Properties to set */ - function OutputConfig(properties) { + function Resource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7370,89 +7532,140 @@ } /** - * OutputConfig gcsDestination. - * @member {google.cloud.asset.v1beta1.IGcsDestination|null|undefined} gcsDestination - * @memberof google.cloud.asset.v1beta1.OutputConfig + * Resource version. + * @member {string} version + * @memberof google.cloud.asset.v1beta1.Resource * @instance */ - OutputConfig.prototype.gcsDestination = null; + Resource.prototype.version = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Resource discoveryDocumentUri. + * @member {string} discoveryDocumentUri + * @memberof google.cloud.asset.v1beta1.Resource + * @instance + */ + Resource.prototype.discoveryDocumentUri = ""; /** - * OutputConfig destination. - * @member {"gcsDestination"|undefined} destination - * @memberof google.cloud.asset.v1beta1.OutputConfig + * Resource discoveryName. + * @member {string} discoveryName + * @memberof google.cloud.asset.v1beta1.Resource * @instance */ - Object.defineProperty(OutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), - set: $util.oneOfSetter($oneOfFields) - }); + Resource.prototype.discoveryName = ""; /** - * Creates a new OutputConfig instance using the specified properties. + * Resource resourceUrl. + * @member {string} resourceUrl + * @memberof google.cloud.asset.v1beta1.Resource + * @instance + */ + Resource.prototype.resourceUrl = ""; + + /** + * Resource parent. + * @member {string} parent + * @memberof google.cloud.asset.v1beta1.Resource + * @instance + */ + Resource.prototype.parent = ""; + + /** + * Resource data. + * @member {google.protobuf.IStruct|null|undefined} data + * @memberof google.cloud.asset.v1beta1.Resource + * @instance + */ + Resource.prototype.data = null; + + /** + * Creates a new Resource instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1beta1.OutputConfig + * @memberof google.cloud.asset.v1beta1.Resource * @static - * @param {google.cloud.asset.v1beta1.IOutputConfig=} [properties] Properties to set - * @returns {google.cloud.asset.v1beta1.OutputConfig} OutputConfig instance + * @param {google.cloud.asset.v1beta1.IResource=} [properties] Properties to set + * @returns {google.cloud.asset.v1beta1.Resource} Resource instance */ - OutputConfig.create = function create(properties) { - return new OutputConfig(properties); + Resource.create = function create(properties) { + return new Resource(properties); }; /** - * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.asset.v1beta1.OutputConfig.verify|verify} messages. + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1beta1.Resource.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1beta1.OutputConfig + * @memberof google.cloud.asset.v1beta1.Resource * @static - * @param {google.cloud.asset.v1beta1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {google.cloud.asset.v1beta1.IResource} message Resource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputConfig.encode = function encode(message, writer) { + Resource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) - $root.google.cloud.asset.v1beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.discoveryDocumentUri); + if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.discoveryName); + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUrl); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); + if (message.data != null && message.hasOwnProperty("data")) + $root.google.protobuf.Struct.encode(message.data, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.OutputConfig.verify|verify} messages. + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.Resource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1beta1.OutputConfig + * @memberof google.cloud.asset.v1beta1.Resource * @static - * @param {google.cloud.asset.v1beta1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {google.cloud.asset.v1beta1.IResource} message Resource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + Resource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OutputConfig message from the specified reader or buffer. + * Decodes a Resource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1beta1.OutputConfig + * @memberof google.cloud.asset.v1beta1.Resource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1beta1.OutputConfig} OutputConfig + * @returns {google.cloud.asset.v1beta1.Resource} Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputConfig.decode = function decode(reader, length) { + Resource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.OutputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.Resource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.gcsDestination = $root.google.cloud.asset.v1beta1.GcsDestination.decode(reader, reader.uint32()); + message.version = reader.string(); + break; + case 2: + message.discoveryDocumentUri = reader.string(); + break; + case 3: + message.discoveryName = reader.string(); + break; + case 4: + message.resourceUrl = reader.string(); + break; + case 5: + message.parent = reader.string(); + break; + case 6: + message.data = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7463,384 +7676,337 @@ }; /** - * Decodes an OutputConfig message from the specified reader or buffer, length delimited. + * Decodes a Resource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1beta1.OutputConfig + * @memberof google.cloud.asset.v1beta1.Resource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1beta1.OutputConfig} OutputConfig + * @returns {google.cloud.asset.v1beta1.Resource} Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputConfig.decodeDelimited = function decodeDelimited(reader) { + Resource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputConfig message. + * Verifies a Resource message. * @function verify - * @memberof google.cloud.asset.v1beta1.OutputConfig + * @memberof google.cloud.asset.v1beta1.Resource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OutputConfig.verify = function verify(message) { + Resource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - properties.destination = 1; - { - var error = $root.google.cloud.asset.v1beta1.GcsDestination.verify(message.gcsDestination); - if (error) - return "gcsDestination." + error; - } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) + if (!$util.isString(message.discoveryDocumentUri)) + return "discoveryDocumentUri: string expected"; + if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) + if (!$util.isString(message.discoveryName)) + return "discoveryName: string expected"; + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + if (!$util.isString(message.resourceUrl)) + return "resourceUrl: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.data != null && message.hasOwnProperty("data")) { + var error = $root.google.protobuf.Struct.verify(message.data); + if (error) + return "data." + error; } return null; }; /** - * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Resource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1beta1.OutputConfig + * @memberof google.cloud.asset.v1beta1.Resource * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1beta1.OutputConfig} OutputConfig + * @returns {google.cloud.asset.v1beta1.Resource} Resource */ - OutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1beta1.OutputConfig) + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1beta1.Resource) return object; - var message = new $root.google.cloud.asset.v1beta1.OutputConfig(); - if (object.gcsDestination != null) { - if (typeof object.gcsDestination !== "object") - throw TypeError(".google.cloud.asset.v1beta1.OutputConfig.gcsDestination: object expected"); - message.gcsDestination = $root.google.cloud.asset.v1beta1.GcsDestination.fromObject(object.gcsDestination); + var message = new $root.google.cloud.asset.v1beta1.Resource(); + if (object.version != null) + message.version = String(object.version); + if (object.discoveryDocumentUri != null) + message.discoveryDocumentUri = String(object.discoveryDocumentUri); + if (object.discoveryName != null) + message.discoveryName = String(object.discoveryName); + if (object.resourceUrl != null) + message.resourceUrl = String(object.resourceUrl); + if (object.parent != null) + message.parent = String(object.parent); + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.asset.v1beta1.Resource.data: object expected"); + message.data = $root.google.protobuf.Struct.fromObject(object.data); } return message; }; /** - * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. + * Creates a plain object from a Resource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1beta1.OutputConfig + * @memberof google.cloud.asset.v1beta1.Resource * @static - * @param {google.cloud.asset.v1beta1.OutputConfig} message OutputConfig + * @param {google.cloud.asset.v1beta1.Resource} message Resource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputConfig.toObject = function toObject(message, options) { + Resource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - object.gcsDestination = $root.google.cloud.asset.v1beta1.GcsDestination.toObject(message.gcsDestination, options); - if (options.oneofs) - object.destination = "gcsDestination"; + if (options.defaults) { + object.version = ""; + object.discoveryDocumentUri = ""; + object.discoveryName = ""; + object.resourceUrl = ""; + object.parent = ""; + object.data = null; } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) + object.discoveryDocumentUri = message.discoveryDocumentUri; + if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) + object.discoveryName = message.discoveryName; + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + object.resourceUrl = message.resourceUrl; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.data != null && message.hasOwnProperty("data")) + object.data = $root.google.protobuf.Struct.toObject(message.data, options); return object; }; /** - * Converts this OutputConfig to JSON. + * Converts this Resource to JSON. * @function toJSON - * @memberof google.cloud.asset.v1beta1.OutputConfig + * @memberof google.cloud.asset.v1beta1.Resource * @instance * @returns {Object.} JSON object */ - OutputConfig.prototype.toJSON = function toJSON() { + Resource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OutputConfig; + return Resource; })(); - v1beta1.GcsDestination = (function() { + return v1beta1; + })(); - /** - * Properties of a GcsDestination. - * @memberof google.cloud.asset.v1beta1 - * @interface IGcsDestination - * @property {string|null} [uri] GcsDestination uri - * @property {string|null} [uriPrefix] GcsDestination uriPrefix - */ + asset.v1p1beta1 = (function() { + + /** + * Namespace v1p1beta1. + * @memberof google.cloud.asset + * @namespace + */ + var v1p1beta1 = {}; + + v1p1beta1.AssetService = (function() { /** - * Constructs a new GcsDestination. - * @memberof google.cloud.asset.v1beta1 - * @classdesc Represents a GcsDestination. - * @implements IGcsDestination + * Constructs a new AssetService service. + * @memberof google.cloud.asset.v1p1beta1 + * @classdesc Represents an AssetService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.asset.v1beta1.IGcsDestination=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function GcsDestination(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function AssetService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (AssetService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AssetService; + /** - * GcsDestination uri. - * @member {string} uri - * @memberof google.cloud.asset.v1beta1.GcsDestination - * @instance + * Creates new AssetService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.asset.v1p1beta1.AssetService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {AssetService} RPC service. Useful where requests and/or responses are streamed. */ - GcsDestination.prototype.uri = ""; + AssetService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * GcsDestination uriPrefix. - * @member {string} uriPrefix - * @memberof google.cloud.asset.v1beta1.GcsDestination - * @instance + * Callback as used by {@link google.cloud.asset.v1p1beta1.AssetService#searchResources}. + * @memberof google.cloud.asset.v1p1beta1.AssetService + * @typedef SearchResourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1p1beta1.SearchResourcesResponse} [response] SearchResourcesResponse */ - GcsDestination.prototype.uriPrefix = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Calls SearchResources. + * @function searchResources + * @memberof google.cloud.asset.v1p1beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest} request SearchResourcesRequest message or plain object + * @param {google.cloud.asset.v1p1beta1.AssetService.SearchResourcesCallback} callback Node-style callback called with the error, if any, and SearchResourcesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AssetService.prototype.searchResources = function searchResources(request, callback) { + return this.rpcCall(searchResources, $root.google.cloud.asset.v1p1beta1.SearchResourcesRequest, $root.google.cloud.asset.v1p1beta1.SearchResourcesResponse, request, callback); + }, "name", { value: "SearchResources" }); /** - * GcsDestination objectUri. - * @member {"uri"|"uriPrefix"|undefined} objectUri - * @memberof google.cloud.asset.v1beta1.GcsDestination + * Calls SearchResources. + * @function searchResources + * @memberof google.cloud.asset.v1p1beta1.AssetService * @instance + * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest} request SearchResourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Object.defineProperty(GcsDestination.prototype, "objectUri", { - get: $util.oneOfGetter($oneOfFields = ["uri", "uriPrefix"]), - set: $util.oneOfSetter($oneOfFields) - }); /** - * Creates a new GcsDestination instance using the specified properties. - * @function create - * @memberof google.cloud.asset.v1beta1.GcsDestination - * @static - * @param {google.cloud.asset.v1beta1.IGcsDestination=} [properties] Properties to set - * @returns {google.cloud.asset.v1beta1.GcsDestination} GcsDestination instance + * Callback as used by {@link google.cloud.asset.v1p1beta1.AssetService#searchIamPolicies}. + * @memberof google.cloud.asset.v1p1beta1.AssetService + * @typedef SearchIamPoliciesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} [response] SearchIamPoliciesResponse */ - GcsDestination.create = function create(properties) { - return new GcsDestination(properties); - }; /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.asset.v1beta1.GcsDestination.verify|verify} messages. - * @function encode - * @memberof google.cloud.asset.v1beta1.GcsDestination - * @static - * @param {google.cloud.asset.v1beta1.IGcsDestination} message GcsDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls SearchIamPolicies. + * @function searchIamPolicies + * @memberof google.cloud.asset.v1p1beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest} request SearchIamPoliciesRequest message or plain object + * @param {google.cloud.asset.v1p1beta1.AssetService.SearchIamPoliciesCallback} callback Node-style callback called with the error, if any, and SearchIamPoliciesResponse + * @returns {undefined} + * @variation 1 */ - GcsDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && message.hasOwnProperty("uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uriPrefix); - return writer; - }; + Object.defineProperty(AssetService.prototype.searchIamPolicies = function searchIamPolicies(request, callback) { + return this.rpcCall(searchIamPolicies, $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest, $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse, request, callback); + }, "name", { value: "SearchIamPolicies" }); /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1beta1.GcsDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.asset.v1beta1.GcsDestination - * @static - * @param {google.cloud.asset.v1beta1.IGcsDestination} message GcsDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls SearchIamPolicies. + * @function searchIamPolicies + * @memberof google.cloud.asset.v1p1beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest} request SearchIamPoliciesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a GcsDestination message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.asset.v1beta1.GcsDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1beta1.GcsDestination} GcsDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.asset.v1p1beta1.AssetService#searchAllResources}. + * @memberof google.cloud.asset.v1p1beta1.AssetService + * @typedef SearchAllResourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} [response] SearchAllResourcesResponse */ - GcsDestination.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1beta1.GcsDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.uri = reader.string(); - break; - case 2: - message.uriPrefix = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.asset.v1beta1.GcsDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1beta1.GcsDestination} GcsDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SearchAllResources. + * @function searchAllResources + * @memberof google.cloud.asset.v1p1beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest} request SearchAllResourcesRequest message or plain object + * @param {google.cloud.asset.v1p1beta1.AssetService.SearchAllResourcesCallback} callback Node-style callback called with the error, if any, and SearchAllResourcesResponse + * @returns {undefined} + * @variation 1 */ - GcsDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(AssetService.prototype.searchAllResources = function searchAllResources(request, callback) { + return this.rpcCall(searchAllResources, $root.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest, $root.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse, request, callback); + }, "name", { value: "SearchAllResources" }); /** - * Verifies a GcsDestination message. - * @function verify - * @memberof google.cloud.asset.v1beta1.GcsDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls SearchAllResources. + * @function searchAllResources + * @memberof google.cloud.asset.v1p1beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest} request SearchAllResourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GcsDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.uri != null && message.hasOwnProperty("uri")) { - properties.objectUri = 1; - if (!$util.isString(message.uri)) - return "uri: string expected"; - } - if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) { - if (properties.objectUri === 1) - return "objectUri: multiple values"; - properties.objectUri = 1; - if (!$util.isString(message.uriPrefix)) - return "uriPrefix: string expected"; - } - return null; - }; /** - * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.asset.v1beta1.GcsDestination - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1beta1.GcsDestination} GcsDestination + * Callback as used by {@link google.cloud.asset.v1p1beta1.AssetService#searchAllIamPolicies}. + * @memberof google.cloud.asset.v1p1beta1.AssetService + * @typedef SearchAllIamPoliciesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} [response] SearchAllIamPoliciesResponse */ - GcsDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1beta1.GcsDestination) - return object; - var message = new $root.google.cloud.asset.v1beta1.GcsDestination(); - if (object.uri != null) - message.uri = String(object.uri); - if (object.uriPrefix != null) - message.uriPrefix = String(object.uriPrefix); - return message; - }; /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.asset.v1beta1.GcsDestination - * @static - * @param {google.cloud.asset.v1beta1.GcsDestination} message GcsDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls SearchAllIamPolicies. + * @function searchAllIamPolicies + * @memberof google.cloud.asset.v1p1beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest} request SearchAllIamPoliciesRequest message or plain object + * @param {google.cloud.asset.v1p1beta1.AssetService.SearchAllIamPoliciesCallback} callback Node-style callback called with the error, if any, and SearchAllIamPoliciesResponse + * @returns {undefined} + * @variation 1 */ - GcsDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.uri != null && message.hasOwnProperty("uri")) { - object.uri = message.uri; - if (options.oneofs) - object.objectUri = "uri"; - } - if (message.uriPrefix != null && message.hasOwnProperty("uriPrefix")) { - object.uriPrefix = message.uriPrefix; - if (options.oneofs) - object.objectUri = "uriPrefix"; - } - return object; - }; + Object.defineProperty(AssetService.prototype.searchAllIamPolicies = function searchAllIamPolicies(request, callback) { + return this.rpcCall(searchAllIamPolicies, $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest, $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse, request, callback); + }, "name", { value: "SearchAllIamPolicies" }); /** - * Converts this GcsDestination to JSON. - * @function toJSON - * @memberof google.cloud.asset.v1beta1.GcsDestination + * Calls SearchAllIamPolicies. + * @function searchAllIamPolicies + * @memberof google.cloud.asset.v1p1beta1.AssetService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest} request SearchAllIamPoliciesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GcsDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GcsDestination; - })(); - /** - * ContentType enum. - * @name google.cloud.asset.v1beta1.ContentType - * @enum {string} - * @property {number} CONTENT_TYPE_UNSPECIFIED=0 CONTENT_TYPE_UNSPECIFIED value - * @property {number} RESOURCE=1 RESOURCE value - * @property {number} IAM_POLICY=2 IAM_POLICY value - */ - v1beta1.ContentType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONTENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RESOURCE"] = 1; - values[valuesById[2] = "IAM_POLICY"] = 2; - return values; + return AssetService; })(); - return v1beta1; - })(); - - asset.v1p1beta1 = (function() { - - /** - * Namespace v1p1beta1. - * @memberof google.cloud.asset - * @namespace - */ - var v1p1beta1 = {}; - - v1p1beta1.StandardResourceMetadata = (function() { + v1p1beta1.SearchResourcesRequest = (function() { /** - * Properties of a StandardResourceMetadata. + * Properties of a SearchResourcesRequest. * @memberof google.cloud.asset.v1p1beta1 - * @interface IStandardResourceMetadata - * @property {string|null} [name] StandardResourceMetadata name - * @property {string|null} [assetType] StandardResourceMetadata assetType - * @property {string|null} [project] StandardResourceMetadata project - * @property {string|null} [displayName] StandardResourceMetadata displayName - * @property {string|null} [description] StandardResourceMetadata description - * @property {Array.|null} [additionalAttributes] StandardResourceMetadata additionalAttributes + * @interface ISearchResourcesRequest + * @property {string|null} [scope] SearchResourcesRequest scope + * @property {string|null} [query] SearchResourcesRequest query + * @property {Array.|null} [assetTypes] SearchResourcesRequest assetTypes + * @property {number|null} [pageSize] SearchResourcesRequest pageSize + * @property {string|null} [pageToken] SearchResourcesRequest pageToken */ /** - * Constructs a new StandardResourceMetadata. + * Constructs a new SearchResourcesRequest. * @memberof google.cloud.asset.v1p1beta1 - * @classdesc Represents a StandardResourceMetadata. - * @implements IStandardResourceMetadata + * @classdesc Represents a SearchResourcesRequest. + * @implements ISearchResourcesRequest * @constructor - * @param {google.cloud.asset.v1p1beta1.IStandardResourceMetadata=} [properties] Properties to set + * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest=} [properties] Properties to set */ - function StandardResourceMetadata(properties) { - this.additionalAttributes = []; + function SearchResourcesRequest(properties) { + this.assetTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7848,143 +8014,130 @@ } /** - * StandardResourceMetadata name. - * @member {string} name - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata - * @instance - */ - StandardResourceMetadata.prototype.name = ""; - - /** - * StandardResourceMetadata assetType. - * @member {string} assetType - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * SearchResourcesRequest scope. + * @member {string} scope + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @instance */ - StandardResourceMetadata.prototype.assetType = ""; + SearchResourcesRequest.prototype.scope = ""; /** - * StandardResourceMetadata project. - * @member {string} project - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * SearchResourcesRequest query. + * @member {string} query + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @instance */ - StandardResourceMetadata.prototype.project = ""; + SearchResourcesRequest.prototype.query = ""; /** - * StandardResourceMetadata displayName. - * @member {string} displayName - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * SearchResourcesRequest assetTypes. + * @member {Array.} assetTypes + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @instance */ - StandardResourceMetadata.prototype.displayName = ""; + SearchResourcesRequest.prototype.assetTypes = $util.emptyArray; /** - * StandardResourceMetadata description. - * @member {string} description - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * SearchResourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @instance */ - StandardResourceMetadata.prototype.description = ""; + SearchResourcesRequest.prototype.pageSize = 0; /** - * StandardResourceMetadata additionalAttributes. - * @member {Array.} additionalAttributes - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * SearchResourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @instance */ - StandardResourceMetadata.prototype.additionalAttributes = $util.emptyArray; + SearchResourcesRequest.prototype.pageToken = ""; /** - * Creates a new StandardResourceMetadata instance using the specified properties. + * Creates a new SearchResourcesRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @static - * @param {google.cloud.asset.v1p1beta1.IStandardResourceMetadata=} [properties] Properties to set - * @returns {google.cloud.asset.v1p1beta1.StandardResourceMetadata} StandardResourceMetadata instance + * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1p1beta1.SearchResourcesRequest} SearchResourcesRequest instance */ - StandardResourceMetadata.create = function create(properties) { - return new StandardResourceMetadata(properties); + SearchResourcesRequest.create = function create(properties) { + return new SearchResourcesRequest(properties); }; /** - * Encodes the specified StandardResourceMetadata message. Does not implicitly {@link google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify|verify} messages. + * Encodes the specified SearchResourcesRequest message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchResourcesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @static - * @param {google.cloud.asset.v1p1beta1.IStandardResourceMetadata} message StandardResourceMetadata message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest} message SearchResourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StandardResourceMetadata.encode = function encode(message, writer) { + SearchResourcesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.assetType != null && message.hasOwnProperty("assetType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetType); - if (message.project != null && message.hasOwnProperty("project")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.project); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.additionalAttributes != null && message.additionalAttributes.length) - for (var i = 0; i < message.additionalAttributes.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.additionalAttributes[i]); + if (message.scope != null && message.hasOwnProperty("scope")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.scope); + if (message.query != null && message.hasOwnProperty("query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.assetTypes != null && message.assetTypes.length) + for (var i = 0; i < message.assetTypes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetTypes[i]); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); return writer; }; /** - * Encodes the specified StandardResourceMetadata message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify|verify} messages. + * Encodes the specified SearchResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchResourcesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @static - * @param {google.cloud.asset.v1p1beta1.IStandardResourceMetadata} message StandardResourceMetadata message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest} message SearchResourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StandardResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + SearchResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StandardResourceMetadata message from the specified reader or buffer. + * Decodes a SearchResourcesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p1beta1.StandardResourceMetadata} StandardResourceMetadata + * @returns {google.cloud.asset.v1p1beta1.SearchResourcesRequest} SearchResourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StandardResourceMetadata.decode = function decode(reader, length) { + SearchResourcesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchResourcesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.scope = reader.string(); break; case 2: - message.assetType = reader.string(); + message.query = reader.string(); break; case 3: - message.project = reader.string(); + if (!(message.assetTypes && message.assetTypes.length)) + message.assetTypes = []; + message.assetTypes.push(reader.string()); break; case 4: - message.displayName = reader.string(); - break; - case 5: - message.description = reader.string(); - break; - case 10: - if (!(message.additionalAttributes && message.additionalAttributes.length)) - message.additionalAttributes = []; - message.additionalAttributes.push(reader.string()); + message.pageSize = reader.int32(); + break; + case 5: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -7995,163 +8148,155 @@ }; /** - * Decodes a StandardResourceMetadata message from the specified reader or buffer, length delimited. + * Decodes a SearchResourcesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p1beta1.StandardResourceMetadata} StandardResourceMetadata + * @returns {google.cloud.asset.v1p1beta1.SearchResourcesRequest} SearchResourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StandardResourceMetadata.decodeDelimited = function decodeDelimited(reader) { + SearchResourcesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StandardResourceMetadata message. + * Verifies a SearchResourcesRequest message. * @function verify - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StandardResourceMetadata.verify = function verify(message) { + SearchResourcesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.assetType != null && message.hasOwnProperty("assetType")) - if (!$util.isString(message.assetType)) - return "assetType: string expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.additionalAttributes != null && message.hasOwnProperty("additionalAttributes")) { - if (!Array.isArray(message.additionalAttributes)) - return "additionalAttributes: array expected"; - for (var i = 0; i < message.additionalAttributes.length; ++i) - if (!$util.isString(message.additionalAttributes[i])) - return "additionalAttributes: string[] expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + if (!$util.isString(message.scope)) + return "scope: string expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.assetTypes != null && message.hasOwnProperty("assetTypes")) { + if (!Array.isArray(message.assetTypes)) + return "assetTypes: array expected"; + for (var i = 0; i < message.assetTypes.length; ++i) + if (!$util.isString(message.assetTypes[i])) + return "assetTypes: string[] expected"; } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a StandardResourceMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a SearchResourcesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p1beta1.StandardResourceMetadata} StandardResourceMetadata + * @returns {google.cloud.asset.v1p1beta1.SearchResourcesRequest} SearchResourcesRequest */ - StandardResourceMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata) + SearchResourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchResourcesRequest) return object; - var message = new $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata(); - if (object.name != null) - message.name = String(object.name); - if (object.assetType != null) - message.assetType = String(object.assetType); - if (object.project != null) - message.project = String(object.project); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.additionalAttributes) { - if (!Array.isArray(object.additionalAttributes)) - throw TypeError(".google.cloud.asset.v1p1beta1.StandardResourceMetadata.additionalAttributes: array expected"); - message.additionalAttributes = []; - for (var i = 0; i < object.additionalAttributes.length; ++i) - message.additionalAttributes[i] = String(object.additionalAttributes[i]); + var message = new $root.google.cloud.asset.v1p1beta1.SearchResourcesRequest(); + if (object.scope != null) + message.scope = String(object.scope); + if (object.query != null) + message.query = String(object.query); + if (object.assetTypes) { + if (!Array.isArray(object.assetTypes)) + throw TypeError(".google.cloud.asset.v1p1beta1.SearchResourcesRequest.assetTypes: array expected"); + message.assetTypes = []; + for (var i = 0; i < object.assetTypes.length; ++i) + message.assetTypes[i] = String(object.assetTypes[i]); } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a StandardResourceMetadata message. Also converts values to other types if specified. + * Creates a plain object from a SearchResourcesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @static - * @param {google.cloud.asset.v1p1beta1.StandardResourceMetadata} message StandardResourceMetadata + * @param {google.cloud.asset.v1p1beta1.SearchResourcesRequest} message SearchResourcesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StandardResourceMetadata.toObject = function toObject(message, options) { + SearchResourcesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalAttributes = []; + object.assetTypes = []; if (options.defaults) { - object.name = ""; - object.assetType = ""; - object.project = ""; - object.displayName = ""; - object.description = ""; + object.scope = ""; + object.query = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.assetType != null && message.hasOwnProperty("assetType")) - object.assetType = message.assetType; - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.additionalAttributes && message.additionalAttributes.length) { - object.additionalAttributes = []; - for (var j = 0; j < message.additionalAttributes.length; ++j) - object.additionalAttributes[j] = message.additionalAttributes[j]; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = message.scope; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.assetTypes && message.assetTypes.length) { + object.assetTypes = []; + for (var j = 0; j < message.assetTypes.length; ++j) + object.assetTypes[j] = message.assetTypes[j]; } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this StandardResourceMetadata to JSON. + * Converts this SearchResourcesRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest * @instance * @returns {Object.} JSON object */ - StandardResourceMetadata.prototype.toJSON = function toJSON() { + SearchResourcesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StandardResourceMetadata; + return SearchResourcesRequest; })(); - v1p1beta1.IamPolicySearchResult = (function() { + v1p1beta1.SearchResourcesResponse = (function() { /** - * Properties of an IamPolicySearchResult. + * Properties of a SearchResourcesResponse. * @memberof google.cloud.asset.v1p1beta1 - * @interface IIamPolicySearchResult - * @property {string|null} [resource] IamPolicySearchResult resource - * @property {string|null} [project] IamPolicySearchResult project - * @property {google.iam.v1.IPolicy|null} [policy] IamPolicySearchResult policy + * @interface ISearchResourcesResponse + * @property {Array.|null} [results] SearchResourcesResponse results + * @property {string|null} [nextPageToken] SearchResourcesResponse nextPageToken */ /** - * Constructs a new IamPolicySearchResult. + * Constructs a new SearchResourcesResponse. * @memberof google.cloud.asset.v1p1beta1 - * @classdesc Represents an IamPolicySearchResult. - * @implements IIamPolicySearchResult + * @classdesc Represents a SearchResourcesResponse. + * @implements ISearchResourcesResponse * @constructor - * @param {google.cloud.asset.v1p1beta1.IIamPolicySearchResult=} [properties] Properties to set + * @param {google.cloud.asset.v1p1beta1.ISearchResourcesResponse=} [properties] Properties to set */ - function IamPolicySearchResult(properties) { + function SearchResourcesResponse(properties) { + this.results = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8159,101 +8304,91 @@ } /** - * IamPolicySearchResult resource. - * @member {string} resource - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult - * @instance - */ - IamPolicySearchResult.prototype.resource = ""; - - /** - * IamPolicySearchResult project. - * @member {string} project - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult + * SearchResourcesResponse results. + * @member {Array.} results + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse * @instance */ - IamPolicySearchResult.prototype.project = ""; + SearchResourcesResponse.prototype.results = $util.emptyArray; /** - * IamPolicySearchResult policy. - * @member {google.iam.v1.IPolicy|null|undefined} policy - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult + * SearchResourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse * @instance */ - IamPolicySearchResult.prototype.policy = null; + SearchResourcesResponse.prototype.nextPageToken = ""; /** - * Creates a new IamPolicySearchResult instance using the specified properties. + * Creates a new SearchResourcesResponse instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse * @static - * @param {google.cloud.asset.v1p1beta1.IIamPolicySearchResult=} [properties] Properties to set - * @returns {google.cloud.asset.v1p1beta1.IamPolicySearchResult} IamPolicySearchResult instance + * @param {google.cloud.asset.v1p1beta1.ISearchResourcesResponse=} [properties] Properties to set + * @returns {google.cloud.asset.v1p1beta1.SearchResourcesResponse} SearchResourcesResponse instance */ - IamPolicySearchResult.create = function create(properties) { - return new IamPolicySearchResult(properties); + SearchResourcesResponse.create = function create(properties) { + return new SearchResourcesResponse(properties); }; /** - * Encodes the specified IamPolicySearchResult message. Does not implicitly {@link google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify|verify} messages. + * Encodes the specified SearchResourcesResponse message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchResourcesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse * @static - * @param {google.cloud.asset.v1p1beta1.IIamPolicySearchResult} message IamPolicySearchResult message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchResourcesResponse} message SearchResourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IamPolicySearchResult.encode = function encode(message, writer) { + SearchResourcesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resource != null && message.hasOwnProperty("resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.project != null && message.hasOwnProperty("project")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.project); - if (message.policy != null && message.hasOwnProperty("policy")) - $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified IamPolicySearchResult message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify|verify} messages. + * Encodes the specified SearchResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchResourcesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse * @static - * @param {google.cloud.asset.v1p1beta1.IIamPolicySearchResult} message IamPolicySearchResult message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchResourcesResponse} message SearchResourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IamPolicySearchResult.encodeDelimited = function encodeDelimited(message, writer) { + SearchResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IamPolicySearchResult message from the specified reader or buffer. + * Decodes a SearchResourcesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p1beta1.IamPolicySearchResult} IamPolicySearchResult + * @returns {google.cloud.asset.v1p1beta1.SearchResourcesResponse} SearchResourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IamPolicySearchResult.decode = function decode(reader, length) { + SearchResourcesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchResourcesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.resource = reader.string(); - break; - case 3: - message.project = reader.string(); + if (!(message.results && message.results.length)) + message.results = []; + message.results.push($root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.decode(reader, reader.uint32())); break; - case 4: - message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -8264,301 +8399,136 @@ }; /** - * Decodes an IamPolicySearchResult message from the specified reader or buffer, length delimited. + * Decodes a SearchResourcesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p1beta1.IamPolicySearchResult} IamPolicySearchResult + * @returns {google.cloud.asset.v1p1beta1.SearchResourcesResponse} SearchResourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IamPolicySearchResult.decodeDelimited = function decodeDelimited(reader) { + SearchResourcesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IamPolicySearchResult message. + * Verifies a SearchResourcesResponse message. * @function verify - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IamPolicySearchResult.verify = function verify(message) { + SearchResourcesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.policy != null && message.hasOwnProperty("policy")) { - var error = $root.google.iam.v1.Policy.verify(message.policy); - if (error) - return "policy." + error; + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) { + var error = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify(message.results[i]); + if (error) + return "results." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an IamPolicySearchResult message from a plain object. Also converts values to their respective internal types. + * Creates a SearchResourcesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p1beta1.IamPolicySearchResult} IamPolicySearchResult + * @returns {google.cloud.asset.v1p1beta1.SearchResourcesResponse} SearchResourcesResponse */ - IamPolicySearchResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult) + SearchResourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchResourcesResponse) return object; - var message = new $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.project != null) - message.project = String(object.project); - if (object.policy != null) { - if (typeof object.policy !== "object") - throw TypeError(".google.cloud.asset.v1p1beta1.IamPolicySearchResult.policy: object expected"); - message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); + var message = new $root.google.cloud.asset.v1p1beta1.SearchResourcesResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".google.cloud.asset.v1p1beta1.SearchResourcesResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) { + if (typeof object.results[i] !== "object") + throw TypeError(".google.cloud.asset.v1p1beta1.SearchResourcesResponse.results: object expected"); + message.results[i] = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.fromObject(object.results[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an IamPolicySearchResult message. Also converts values to other types if specified. + * Creates a plain object from a SearchResourcesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult - * @static - * @param {google.cloud.asset.v1p1beta1.IamPolicySearchResult} message IamPolicySearchResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IamPolicySearchResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.project = ""; - object.policy = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); - return object; - }; - - /** - * Converts this IamPolicySearchResult to JSON. - * @function toJSON - * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult - * @instance - * @returns {Object.} JSON object - */ - IamPolicySearchResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IamPolicySearchResult; - })(); - - v1p1beta1.AssetService = (function() { - - /** - * Constructs a new AssetService service. - * @memberof google.cloud.asset.v1p1beta1 - * @classdesc Represents an AssetService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function AssetService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (AssetService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AssetService; - - /** - * Creates new AssetService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {AssetService} RPC service. Useful where requests and/or responses are streamed. - */ - AssetService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.asset.v1p1beta1.AssetService#searchResources}. - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @typedef SearchResourcesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1p1beta1.SearchResourcesResponse} [response] SearchResourcesResponse - */ - - /** - * Calls SearchResources. - * @function searchResources - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest} request SearchResourcesRequest message or plain object - * @param {google.cloud.asset.v1p1beta1.AssetService.SearchResourcesCallback} callback Node-style callback called with the error, if any, and SearchResourcesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AssetService.prototype.searchResources = function searchResources(request, callback) { - return this.rpcCall(searchResources, $root.google.cloud.asset.v1p1beta1.SearchResourcesRequest, $root.google.cloud.asset.v1p1beta1.SearchResourcesResponse, request, callback); - }, "name", { value: "SearchResources" }); - - /** - * Calls SearchResources. - * @function searchResources - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest} request SearchResourcesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.asset.v1p1beta1.AssetService#searchIamPolicies}. - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @typedef SearchIamPoliciesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} [response] SearchIamPoliciesResponse - */ - - /** - * Calls SearchIamPolicies. - * @function searchIamPolicies - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest} request SearchIamPoliciesRequest message or plain object - * @param {google.cloud.asset.v1p1beta1.AssetService.SearchIamPoliciesCallback} callback Node-style callback called with the error, if any, and SearchIamPoliciesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AssetService.prototype.searchIamPolicies = function searchIamPolicies(request, callback) { - return this.rpcCall(searchIamPolicies, $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest, $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse, request, callback); - }, "name", { value: "SearchIamPolicies" }); - - /** - * Calls SearchIamPolicies. - * @function searchIamPolicies - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest} request SearchIamPoliciesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.asset.v1p1beta1.AssetService#searchAllResources}. - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @typedef SearchAllResourcesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} [response] SearchAllResourcesResponse - */ - - /** - * Calls SearchAllResources. - * @function searchAllResources - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest} request SearchAllResourcesRequest message or plain object - * @param {google.cloud.asset.v1p1beta1.AssetService.SearchAllResourcesCallback} callback Node-style callback called with the error, if any, and SearchAllResourcesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AssetService.prototype.searchAllResources = function searchAllResources(request, callback) { - return this.rpcCall(searchAllResources, $root.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest, $root.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse, request, callback); - }, "name", { value: "SearchAllResources" }); - - /** - * Calls SearchAllResources. - * @function searchAllResources - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest} request SearchAllResourcesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.asset.v1p1beta1.AssetService#searchAllIamPolicies}. - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @typedef SearchAllIamPoliciesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} [response] SearchAllIamPoliciesResponse - */ - - /** - * Calls SearchAllIamPolicies. - * @function searchAllIamPolicies - * @memberof google.cloud.asset.v1p1beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest} request SearchAllIamPoliciesRequest message or plain object - * @param {google.cloud.asset.v1p1beta1.AssetService.SearchAllIamPoliciesCallback} callback Node-style callback called with the error, if any, and SearchAllIamPoliciesResponse - * @returns {undefined} - * @variation 1 + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + * @static + * @param {google.cloud.asset.v1p1beta1.SearchResourcesResponse} message SearchResourcesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(AssetService.prototype.searchAllIamPolicies = function searchAllIamPolicies(request, callback) { - return this.rpcCall(searchAllIamPolicies, $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest, $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse, request, callback); - }, "name", { value: "SearchAllIamPolicies" }); + SearchResourcesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.results = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.toObject(message.results[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; /** - * Calls SearchAllIamPolicies. - * @function searchAllIamPolicies - * @memberof google.cloud.asset.v1p1beta1.AssetService + * Converts this SearchResourcesResponse to JSON. + * @function toJSON + * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse * @instance - * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest} request SearchAllIamPoliciesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + SearchResourcesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return AssetService; + return SearchResourcesResponse; })(); - v1p1beta1.SearchResourcesRequest = (function() { + v1p1beta1.SearchIamPoliciesRequest = (function() { /** - * Properties of a SearchResourcesRequest. + * Properties of a SearchIamPoliciesRequest. * @memberof google.cloud.asset.v1p1beta1 - * @interface ISearchResourcesRequest - * @property {string|null} [scope] SearchResourcesRequest scope - * @property {string|null} [query] SearchResourcesRequest query - * @property {Array.|null} [assetTypes] SearchResourcesRequest assetTypes - * @property {number|null} [pageSize] SearchResourcesRequest pageSize - * @property {string|null} [pageToken] SearchResourcesRequest pageToken + * @interface ISearchIamPoliciesRequest + * @property {string|null} [scope] SearchIamPoliciesRequest scope + * @property {string|null} [query] SearchIamPoliciesRequest query + * @property {number|null} [pageSize] SearchIamPoliciesRequest pageSize + * @property {string|null} [pageToken] SearchIamPoliciesRequest pageToken */ /** - * Constructs a new SearchResourcesRequest. + * Constructs a new SearchIamPoliciesRequest. * @memberof google.cloud.asset.v1p1beta1 - * @classdesc Represents a SearchResourcesRequest. - * @implements ISearchResourcesRequest + * @classdesc Represents a SearchIamPoliciesRequest. + * @implements ISearchIamPoliciesRequest * @constructor - * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest=} [properties] Properties to set */ - function SearchResourcesRequest(properties) { - this.assetTypes = []; + function SearchIamPoliciesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8566,129 +8536,113 @@ } /** - * SearchResourcesRequest scope. + * SearchIamPoliciesRequest scope. * @member {string} scope - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @instance */ - SearchResourcesRequest.prototype.scope = ""; + SearchIamPoliciesRequest.prototype.scope = ""; /** - * SearchResourcesRequest query. + * SearchIamPoliciesRequest query. * @member {string} query - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest - * @instance - */ - SearchResourcesRequest.prototype.query = ""; - - /** - * SearchResourcesRequest assetTypes. - * @member {Array.} assetTypes - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @instance */ - SearchResourcesRequest.prototype.assetTypes = $util.emptyArray; + SearchIamPoliciesRequest.prototype.query = ""; /** - * SearchResourcesRequest pageSize. + * SearchIamPoliciesRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @instance */ - SearchResourcesRequest.prototype.pageSize = 0; + SearchIamPoliciesRequest.prototype.pageSize = 0; /** - * SearchResourcesRequest pageToken. + * SearchIamPoliciesRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @instance */ - SearchResourcesRequest.prototype.pageToken = ""; + SearchIamPoliciesRequest.prototype.pageToken = ""; /** - * Creates a new SearchResourcesRequest instance using the specified properties. + * Creates a new SearchIamPoliciesRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @static - * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1p1beta1.SearchResourcesRequest} SearchResourcesRequest instance + * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} SearchIamPoliciesRequest instance */ - SearchResourcesRequest.create = function create(properties) { - return new SearchResourcesRequest(properties); + SearchIamPoliciesRequest.create = function create(properties) { + return new SearchIamPoliciesRequest(properties); }; /** - * Encodes the specified SearchResourcesRequest message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchResourcesRequest.verify|verify} messages. + * Encodes the specified SearchIamPoliciesRequest message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @static - * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest} message SearchResourcesRequest message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest} message SearchIamPoliciesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchResourcesRequest.encode = function encode(message, writer) { + SearchIamPoliciesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.scope != null && message.hasOwnProperty("scope")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.scope); if (message.query != null && message.hasOwnProperty("query")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); - if (message.assetTypes != null && message.assetTypes.length) - for (var i = 0; i < message.assetTypes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetTypes[i]); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.scope != null && message.hasOwnProperty("scope")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.scope); return writer; }; /** - * Encodes the specified SearchResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchResourcesRequest.verify|verify} messages. + * Encodes the specified SearchIamPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @static - * @param {google.cloud.asset.v1p1beta1.ISearchResourcesRequest} message SearchResourcesRequest message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest} message SearchIamPoliciesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + SearchIamPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchResourcesRequest message from the specified reader or buffer. + * Decodes a SearchIamPoliciesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p1beta1.SearchResourcesRequest} SearchResourcesRequest + * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} SearchIamPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchResourcesRequest.decode = function decode(reader, length) { + SearchIamPoliciesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchResourcesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 4: message.scope = reader.string(); break; - case 2: + case 1: message.query = reader.string(); break; - case 3: - if (!(message.assetTypes && message.assetTypes.length)) - message.assetTypes = []; - message.assetTypes.push(reader.string()); - break; - case 4: + case 2: message.pageSize = reader.int32(); break; - case 5: + case 3: message.pageToken = reader.string(); break; default: @@ -8700,30 +8654,30 @@ }; /** - * Decodes a SearchResourcesRequest message from the specified reader or buffer, length delimited. + * Decodes a SearchIamPoliciesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p1beta1.SearchResourcesRequest} SearchResourcesRequest + * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} SearchIamPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchResourcesRequest.decodeDelimited = function decodeDelimited(reader) { + SearchIamPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchResourcesRequest message. + * Verifies a SearchIamPoliciesRequest message. * @function verify - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchResourcesRequest.verify = function verify(message) { + SearchIamPoliciesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.scope != null && message.hasOwnProperty("scope")) @@ -8732,13 +8686,6 @@ if (message.query != null && message.hasOwnProperty("query")) if (!$util.isString(message.query)) return "query: string expected"; - if (message.assetTypes != null && message.hasOwnProperty("assetTypes")) { - if (!Array.isArray(message.assetTypes)) - return "assetTypes: array expected"; - for (var i = 0; i < message.assetTypes.length; ++i) - if (!$util.isString(message.assetTypes[i])) - return "assetTypes: string[] expected"; - } if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -8749,28 +8696,21 @@ }; /** - * Creates a SearchResourcesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SearchIamPoliciesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p1beta1.SearchResourcesRequest} SearchResourcesRequest + * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} SearchIamPoliciesRequest */ - SearchResourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchResourcesRequest) + SearchIamPoliciesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest) return object; - var message = new $root.google.cloud.asset.v1p1beta1.SearchResourcesRequest(); + var message = new $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest(); if (object.scope != null) message.scope = String(object.scope); if (object.query != null) message.query = String(object.query); - if (object.assetTypes) { - if (!Array.isArray(object.assetTypes)) - throw TypeError(".google.cloud.asset.v1p1beta1.SearchResourcesRequest.assetTypes: array expected"); - message.assetTypes = []; - for (var i = 0; i < object.assetTypes.length; ++i) - message.assetTypes[i] = String(object.assetTypes[i]); - } if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -8779,165 +8719,158 @@ }; /** - * Creates a plain object from a SearchResourcesRequest message. Also converts values to other types if specified. + * Creates a plain object from a SearchIamPoliciesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @static - * @param {google.cloud.asset.v1p1beta1.SearchResourcesRequest} message SearchResourcesRequest + * @param {google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} message SearchIamPoliciesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchResourcesRequest.toObject = function toObject(message, options) { + SearchIamPoliciesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.assetTypes = []; if (options.defaults) { - object.scope = ""; object.query = ""; object.pageSize = 0; object.pageToken = ""; + object.scope = ""; } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = message.scope; if (message.query != null && message.hasOwnProperty("query")) object.query = message.query; - if (message.assetTypes && message.assetTypes.length) { - object.assetTypes = []; - for (var j = 0; j < message.assetTypes.length; ++j) - object.assetTypes[j] = message.assetTypes[j]; - } if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = message.scope; return object; }; /** - * Converts this SearchResourcesRequest to JSON. + * Converts this SearchIamPoliciesRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest * @instance * @returns {Object.} JSON object */ - SearchResourcesRequest.prototype.toJSON = function toJSON() { + SearchIamPoliciesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SearchResourcesRequest; + return SearchIamPoliciesRequest; })(); - v1p1beta1.SearchResourcesResponse = (function() { + v1p1beta1.SearchIamPoliciesResponse = (function() { /** - * Properties of a SearchResourcesResponse. + * Properties of a SearchIamPoliciesResponse. * @memberof google.cloud.asset.v1p1beta1 - * @interface ISearchResourcesResponse - * @property {Array.|null} [results] SearchResourcesResponse results - * @property {string|null} [nextPageToken] SearchResourcesResponse nextPageToken + * @interface ISearchIamPoliciesResponse + * @property {Array.|null} [results] SearchIamPoliciesResponse results + * @property {string|null} [nextPageToken] SearchIamPoliciesResponse nextPageToken */ /** - * Constructs a new SearchResourcesResponse. + * Constructs a new SearchIamPoliciesResponse. * @memberof google.cloud.asset.v1p1beta1 - * @classdesc Represents a SearchResourcesResponse. - * @implements ISearchResourcesResponse + * @classdesc Represents a SearchIamPoliciesResponse. + * @implements ISearchIamPoliciesResponse * @constructor - * @param {google.cloud.asset.v1p1beta1.ISearchResourcesResponse=} [properties] Properties to set + * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesResponse=} [properties] Properties to set */ - function SearchResourcesResponse(properties) { + function SearchIamPoliciesResponse(properties) { this.results = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - - /** - * SearchResourcesResponse results. - * @member {Array.} results - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + + /** + * SearchIamPoliciesResponse results. + * @member {Array.} results + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse * @instance */ - SearchResourcesResponse.prototype.results = $util.emptyArray; + SearchIamPoliciesResponse.prototype.results = $util.emptyArray; /** - * SearchResourcesResponse nextPageToken. + * SearchIamPoliciesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse * @instance */ - SearchResourcesResponse.prototype.nextPageToken = ""; + SearchIamPoliciesResponse.prototype.nextPageToken = ""; /** - * Creates a new SearchResourcesResponse instance using the specified properties. + * Creates a new SearchIamPoliciesResponse instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse * @static - * @param {google.cloud.asset.v1p1beta1.ISearchResourcesResponse=} [properties] Properties to set - * @returns {google.cloud.asset.v1p1beta1.SearchResourcesResponse} SearchResourcesResponse instance + * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesResponse=} [properties] Properties to set + * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} SearchIamPoliciesResponse instance */ - SearchResourcesResponse.create = function create(properties) { - return new SearchResourcesResponse(properties); + SearchIamPoliciesResponse.create = function create(properties) { + return new SearchIamPoliciesResponse(properties); }; /** - * Encodes the specified SearchResourcesResponse message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchResourcesResponse.verify|verify} messages. + * Encodes the specified SearchIamPoliciesResponse message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse * @static - * @param {google.cloud.asset.v1p1beta1.ISearchResourcesResponse} message SearchResourcesResponse message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesResponse} message SearchIamPoliciesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchResourcesResponse.encode = function encode(message, writer) { + SearchIamPoliciesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified SearchResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchResourcesResponse.verify|verify} messages. + * Encodes the specified SearchIamPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse * @static - * @param {google.cloud.asset.v1p1beta1.ISearchResourcesResponse} message SearchResourcesResponse message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesResponse} message SearchIamPoliciesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + SearchIamPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchResourcesResponse message from the specified reader or buffer. + * Decodes a SearchIamPoliciesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p1beta1.SearchResourcesResponse} SearchResourcesResponse + * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} SearchIamPoliciesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchResourcesResponse.decode = function decode(reader, length) { + SearchIamPoliciesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchResourcesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.results && message.results.length)) message.results = []; - message.results.push($root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.decode(reader, reader.uint32())); + message.results.push($root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); @@ -8951,37 +8884,37 @@ }; /** - * Decodes a SearchResourcesResponse message from the specified reader or buffer, length delimited. + * Decodes a SearchIamPoliciesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p1beta1.SearchResourcesResponse} SearchResourcesResponse + * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} SearchIamPoliciesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchResourcesResponse.decodeDelimited = function decodeDelimited(reader) { + SearchIamPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchResourcesResponse message. + * Verifies a SearchIamPoliciesResponse message. * @function verify - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchResourcesResponse.verify = function verify(message) { + SearchIamPoliciesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { - var error = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify(message.results[i]); + var error = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify(message.results[i]); if (error) return "results." + error; } @@ -8993,25 +8926,25 @@ }; /** - * Creates a SearchResourcesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SearchIamPoliciesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p1beta1.SearchResourcesResponse} SearchResourcesResponse + * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} SearchIamPoliciesResponse */ - SearchResourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchResourcesResponse) + SearchIamPoliciesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse) return object; - var message = new $root.google.cloud.asset.v1p1beta1.SearchResourcesResponse(); + var message = new $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse(); if (object.results) { if (!Array.isArray(object.results)) - throw TypeError(".google.cloud.asset.v1p1beta1.SearchResourcesResponse.results: array expected"); + throw TypeError(".google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { if (typeof object.results[i] !== "object") - throw TypeError(".google.cloud.asset.v1p1beta1.SearchResourcesResponse.results: object expected"); - message.results[i] = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.fromObject(object.results[i]); + throw TypeError(".google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.results: object expected"); + message.results[i] = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.fromObject(object.results[i]); } } if (object.nextPageToken != null) @@ -9020,15 +8953,15 @@ }; /** - * Creates a plain object from a SearchResourcesResponse message. Also converts values to other types if specified. + * Creates a plain object from a SearchIamPoliciesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse * @static - * @param {google.cloud.asset.v1p1beta1.SearchResourcesResponse} message SearchResourcesResponse + * @param {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} message SearchIamPoliciesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchResourcesResponse.toObject = function toObject(message, options) { + SearchIamPoliciesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -9039,7 +8972,7 @@ if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.toObject(message.results[j], options); + object.results[j] = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.toObject(message.results[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -9047,40 +8980,42 @@ }; /** - * Converts this SearchResourcesResponse to JSON. + * Converts this SearchIamPoliciesResponse to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p1beta1.SearchResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse * @instance * @returns {Object.} JSON object */ - SearchResourcesResponse.prototype.toJSON = function toJSON() { + SearchIamPoliciesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SearchResourcesResponse; + return SearchIamPoliciesResponse; })(); - v1p1beta1.SearchIamPoliciesRequest = (function() { + v1p1beta1.SearchAllResourcesRequest = (function() { /** - * Properties of a SearchIamPoliciesRequest. + * Properties of a SearchAllResourcesRequest. * @memberof google.cloud.asset.v1p1beta1 - * @interface ISearchIamPoliciesRequest - * @property {string|null} [scope] SearchIamPoliciesRequest scope - * @property {string|null} [query] SearchIamPoliciesRequest query - * @property {number|null} [pageSize] SearchIamPoliciesRequest pageSize - * @property {string|null} [pageToken] SearchIamPoliciesRequest pageToken + * @interface ISearchAllResourcesRequest + * @property {string|null} [scope] SearchAllResourcesRequest scope + * @property {string|null} [query] SearchAllResourcesRequest query + * @property {Array.|null} [assetTypes] SearchAllResourcesRequest assetTypes + * @property {number|null} [pageSize] SearchAllResourcesRequest pageSize + * @property {string|null} [pageToken] SearchAllResourcesRequest pageToken */ /** - * Constructs a new SearchIamPoliciesRequest. + * Constructs a new SearchAllResourcesRequest. * @memberof google.cloud.asset.v1p1beta1 - * @classdesc Represents a SearchIamPoliciesRequest. - * @implements ISearchIamPoliciesRequest + * @classdesc Represents a SearchAllResourcesRequest. + * @implements ISearchAllResourcesRequest * @constructor - * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest=} [properties] Properties to set */ - function SearchIamPoliciesRequest(properties) { + function SearchAllResourcesRequest(properties) { + this.assetTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9088,113 +9023,129 @@ } /** - * SearchIamPoliciesRequest scope. + * SearchAllResourcesRequest scope. * @member {string} scope - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @instance */ - SearchIamPoliciesRequest.prototype.scope = ""; + SearchAllResourcesRequest.prototype.scope = ""; /** - * SearchIamPoliciesRequest query. + * SearchAllResourcesRequest query. * @member {string} query - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @instance */ - SearchIamPoliciesRequest.prototype.query = ""; + SearchAllResourcesRequest.prototype.query = ""; /** - * SearchIamPoliciesRequest pageSize. + * SearchAllResourcesRequest assetTypes. + * @member {Array.} assetTypes + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @instance + */ + SearchAllResourcesRequest.prototype.assetTypes = $util.emptyArray; + + /** + * SearchAllResourcesRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @instance */ - SearchIamPoliciesRequest.prototype.pageSize = 0; + SearchAllResourcesRequest.prototype.pageSize = 0; /** - * SearchIamPoliciesRequest pageToken. + * SearchAllResourcesRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @instance */ - SearchIamPoliciesRequest.prototype.pageToken = ""; + SearchAllResourcesRequest.prototype.pageToken = ""; /** - * Creates a new SearchIamPoliciesRequest instance using the specified properties. + * Creates a new SearchAllResourcesRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @static - * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} SearchIamPoliciesRequest instance + * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} SearchAllResourcesRequest instance */ - SearchIamPoliciesRequest.create = function create(properties) { - return new SearchIamPoliciesRequest(properties); + SearchAllResourcesRequest.create = function create(properties) { + return new SearchAllResourcesRequest(properties); }; /** - * Encodes the specified SearchIamPoliciesRequest message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest.verify|verify} messages. + * Encodes the specified SearchAllResourcesRequest message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @static - * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest} message SearchIamPoliciesRequest message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest} message SearchAllResourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchIamPoliciesRequest.encode = function encode(message, writer) { + SearchAllResourcesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.scope != null && message.hasOwnProperty("scope")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.scope); if (message.query != null && message.hasOwnProperty("query")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.assetTypes != null && message.assetTypes.length) + for (var i = 0; i < message.assetTypes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetTypes[i]); if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.scope != null && message.hasOwnProperty("scope")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.scope); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); return writer; }; /** - * Encodes the specified SearchIamPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest.verify|verify} messages. + * Encodes the specified SearchAllResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @static - * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest} message SearchIamPoliciesRequest message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest} message SearchAllResourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchIamPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { + SearchAllResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchIamPoliciesRequest message from the specified reader or buffer. + * Decodes a SearchAllResourcesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} SearchIamPoliciesRequest + * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} SearchAllResourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchIamPoliciesRequest.decode = function decode(reader, length) { + SearchAllResourcesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: + case 1: message.scope = reader.string(); break; - case 1: + case 2: message.query = reader.string(); break; - case 2: + case 3: + if (!(message.assetTypes && message.assetTypes.length)) + message.assetTypes = []; + message.assetTypes.push(reader.string()); + break; + case 4: message.pageSize = reader.int32(); break; - case 3: + case 5: message.pageToken = reader.string(); break; default: @@ -9206,30 +9157,30 @@ }; /** - * Decodes a SearchIamPoliciesRequest message from the specified reader or buffer, length delimited. + * Decodes a SearchAllResourcesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} SearchIamPoliciesRequest + * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} SearchAllResourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchIamPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { + SearchAllResourcesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchIamPoliciesRequest message. + * Verifies a SearchAllResourcesRequest message. * @function verify - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchIamPoliciesRequest.verify = function verify(message) { + SearchAllResourcesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.scope != null && message.hasOwnProperty("scope")) @@ -9238,6 +9189,13 @@ if (message.query != null && message.hasOwnProperty("query")) if (!$util.isString(message.query)) return "query: string expected"; + if (message.assetTypes != null && message.hasOwnProperty("assetTypes")) { + if (!Array.isArray(message.assetTypes)) + return "assetTypes: array expected"; + for (var i = 0; i < message.assetTypes.length; ++i) + if (!$util.isString(message.assetTypes[i])) + return "assetTypes: string[] expected"; + } if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -9248,21 +9206,28 @@ }; /** - * Creates a SearchIamPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SearchAllResourcesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} SearchIamPoliciesRequest + * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} SearchAllResourcesRequest */ - SearchIamPoliciesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest) + SearchAllResourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) return object; - var message = new $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest(); + var message = new $root.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest(); if (object.scope != null) message.scope = String(object.scope); if (object.query != null) message.query = String(object.query); + if (object.assetTypes) { + if (!Array.isArray(object.assetTypes)) + throw TypeError(".google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.assetTypes: array expected"); + message.assetTypes = []; + for (var i = 0; i < object.assetTypes.length; ++i) + message.assetTypes[i] = String(object.assetTypes[i]); + } if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -9271,68 +9236,75 @@ }; /** - * Creates a plain object from a SearchIamPoliciesRequest message. Also converts values to other types if specified. + * Creates a plain object from a SearchAllResourcesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @static - * @param {google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} message SearchIamPoliciesRequest + * @param {google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} message SearchAllResourcesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchIamPoliciesRequest.toObject = function toObject(message, options) { + SearchAllResourcesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.assetTypes = []; if (options.defaults) { + object.scope = ""; object.query = ""; object.pageSize = 0; object.pageToken = ""; - object.scope = ""; } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = message.scope; if (message.query != null && message.hasOwnProperty("query")) object.query = message.query; + if (message.assetTypes && message.assetTypes.length) { + object.assetTypes = []; + for (var j = 0; j < message.assetTypes.length; ++j) + object.assetTypes[j] = message.assetTypes[j]; + } if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = message.scope; return object; }; /** - * Converts this SearchIamPoliciesRequest to JSON. + * Converts this SearchAllResourcesRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest * @instance * @returns {Object.} JSON object */ - SearchIamPoliciesRequest.prototype.toJSON = function toJSON() { + SearchAllResourcesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SearchIamPoliciesRequest; + return SearchAllResourcesRequest; })(); - v1p1beta1.SearchIamPoliciesResponse = (function() { + v1p1beta1.SearchAllResourcesResponse = (function() { /** - * Properties of a SearchIamPoliciesResponse. + * Properties of a SearchAllResourcesResponse. * @memberof google.cloud.asset.v1p1beta1 - * @interface ISearchIamPoliciesResponse - * @property {Array.|null} [results] SearchIamPoliciesResponse results - * @property {string|null} [nextPageToken] SearchIamPoliciesResponse nextPageToken + * @interface ISearchAllResourcesResponse + * @property {Array.|null} [results] SearchAllResourcesResponse results + * @property {string|null} [nextPageToken] SearchAllResourcesResponse nextPageToken */ /** - * Constructs a new SearchIamPoliciesResponse. + * Constructs a new SearchAllResourcesResponse. * @memberof google.cloud.asset.v1p1beta1 - * @classdesc Represents a SearchIamPoliciesResponse. - * @implements ISearchIamPoliciesResponse + * @classdesc Represents a SearchAllResourcesResponse. + * @implements ISearchAllResourcesResponse * @constructor - * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesResponse=} [properties] Properties to set + * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse=} [properties] Properties to set */ - function SearchIamPoliciesResponse(properties) { + function SearchAllResourcesResponse(properties) { this.results = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -9341,88 +9313,88 @@ } /** - * SearchIamPoliciesResponse results. - * @member {Array.} results - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse + * SearchAllResourcesResponse results. + * @member {Array.} results + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse * @instance */ - SearchIamPoliciesResponse.prototype.results = $util.emptyArray; + SearchAllResourcesResponse.prototype.results = $util.emptyArray; /** - * SearchIamPoliciesResponse nextPageToken. + * SearchAllResourcesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse * @instance */ - SearchIamPoliciesResponse.prototype.nextPageToken = ""; + SearchAllResourcesResponse.prototype.nextPageToken = ""; /** - * Creates a new SearchIamPoliciesResponse instance using the specified properties. + * Creates a new SearchAllResourcesResponse instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse * @static - * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesResponse=} [properties] Properties to set - * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} SearchIamPoliciesResponse instance + * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse=} [properties] Properties to set + * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} SearchAllResourcesResponse instance */ - SearchIamPoliciesResponse.create = function create(properties) { - return new SearchIamPoliciesResponse(properties); + SearchAllResourcesResponse.create = function create(properties) { + return new SearchAllResourcesResponse(properties); }; /** - * Encodes the specified SearchIamPoliciesResponse message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.verify|verify} messages. + * Encodes the specified SearchAllResourcesResponse message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse * @static - * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesResponse} message SearchIamPoliciesResponse message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse} message SearchAllResourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchIamPoliciesResponse.encode = function encode(message, writer) { + SearchAllResourcesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified SearchIamPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.verify|verify} messages. + * Encodes the specified SearchAllResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse * @static - * @param {google.cloud.asset.v1p1beta1.ISearchIamPoliciesResponse} message SearchIamPoliciesResponse message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse} message SearchAllResourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchIamPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { + SearchAllResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchIamPoliciesResponse message from the specified reader or buffer. + * Decodes a SearchAllResourcesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} SearchIamPoliciesResponse + * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} SearchAllResourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchIamPoliciesResponse.decode = function decode(reader, length) { + SearchAllResourcesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.results && message.results.length)) message.results = []; - message.results.push($root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.decode(reader, reader.uint32())); + message.results.push($root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); @@ -9436,37 +9408,37 @@ }; /** - * Decodes a SearchIamPoliciesResponse message from the specified reader or buffer, length delimited. + * Decodes a SearchAllResourcesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} SearchIamPoliciesResponse + * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} SearchAllResourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchIamPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { + SearchAllResourcesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchIamPoliciesResponse message. + * Verifies a SearchAllResourcesResponse message. * @function verify - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchIamPoliciesResponse.verify = function verify(message) { + SearchAllResourcesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { - var error = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify(message.results[i]); + var error = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify(message.results[i]); if (error) return "results." + error; } @@ -9478,25 +9450,25 @@ }; /** - * Creates a SearchIamPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SearchAllResourcesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} SearchIamPoliciesResponse + * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} SearchAllResourcesResponse */ - SearchIamPoliciesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse) + SearchAllResourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) return object; - var message = new $root.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse(); + var message = new $root.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse(); if (object.results) { if (!Array.isArray(object.results)) - throw TypeError(".google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.results: array expected"); + throw TypeError(".google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { if (typeof object.results[i] !== "object") - throw TypeError(".google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.results: object expected"); - message.results[i] = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.fromObject(object.results[i]); + throw TypeError(".google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.results: object expected"); + message.results[i] = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.fromObject(object.results[i]); } } if (object.nextPageToken != null) @@ -9505,15 +9477,15 @@ }; /** - * Creates a plain object from a SearchIamPoliciesResponse message. Also converts values to other types if specified. + * Creates a plain object from a SearchAllResourcesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse * @static - * @param {google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} message SearchIamPoliciesResponse + * @param {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} message SearchAllResourcesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchIamPoliciesResponse.toObject = function toObject(message, options) { + SearchAllResourcesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -9524,7 +9496,7 @@ if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.toObject(message.results[j], options); + object.results[j] = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.toObject(message.results[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -9532,42 +9504,40 @@ }; /** - * Converts this SearchIamPoliciesResponse to JSON. + * Converts this SearchAllResourcesResponse to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse * @instance * @returns {Object.} JSON object */ - SearchIamPoliciesResponse.prototype.toJSON = function toJSON() { + SearchAllResourcesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SearchIamPoliciesResponse; + return SearchAllResourcesResponse; })(); - v1p1beta1.SearchAllResourcesRequest = (function() { + v1p1beta1.SearchAllIamPoliciesRequest = (function() { /** - * Properties of a SearchAllResourcesRequest. + * Properties of a SearchAllIamPoliciesRequest. * @memberof google.cloud.asset.v1p1beta1 - * @interface ISearchAllResourcesRequest - * @property {string|null} [scope] SearchAllResourcesRequest scope - * @property {string|null} [query] SearchAllResourcesRequest query - * @property {Array.|null} [assetTypes] SearchAllResourcesRequest assetTypes - * @property {number|null} [pageSize] SearchAllResourcesRequest pageSize - * @property {string|null} [pageToken] SearchAllResourcesRequest pageToken + * @interface ISearchAllIamPoliciesRequest + * @property {string|null} [scope] SearchAllIamPoliciesRequest scope + * @property {string|null} [query] SearchAllIamPoliciesRequest query + * @property {number|null} [pageSize] SearchAllIamPoliciesRequest pageSize + * @property {string|null} [pageToken] SearchAllIamPoliciesRequest pageToken */ /** - * Constructs a new SearchAllResourcesRequest. + * Constructs a new SearchAllIamPoliciesRequest. * @memberof google.cloud.asset.v1p1beta1 - * @classdesc Represents a SearchAllResourcesRequest. - * @implements ISearchAllResourcesRequest + * @classdesc Represents a SearchAllIamPoliciesRequest. + * @implements ISearchAllIamPoliciesRequest * @constructor - * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest=} [properties] Properties to set */ - function SearchAllResourcesRequest(properties) { - this.assetTypes = []; + function SearchAllIamPoliciesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9575,111 +9545,100 @@ } /** - * SearchAllResourcesRequest scope. + * SearchAllIamPoliciesRequest scope. * @member {string} scope - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @instance */ - SearchAllResourcesRequest.prototype.scope = ""; + SearchAllIamPoliciesRequest.prototype.scope = ""; /** - * SearchAllResourcesRequest query. + * SearchAllIamPoliciesRequest query. * @member {string} query - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest - * @instance - */ - SearchAllResourcesRequest.prototype.query = ""; - - /** - * SearchAllResourcesRequest assetTypes. - * @member {Array.} assetTypes - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @instance */ - SearchAllResourcesRequest.prototype.assetTypes = $util.emptyArray; + SearchAllIamPoliciesRequest.prototype.query = ""; /** - * SearchAllResourcesRequest pageSize. + * SearchAllIamPoliciesRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @instance */ - SearchAllResourcesRequest.prototype.pageSize = 0; + SearchAllIamPoliciesRequest.prototype.pageSize = 0; /** - * SearchAllResourcesRequest pageToken. + * SearchAllIamPoliciesRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @instance */ - SearchAllResourcesRequest.prototype.pageToken = ""; + SearchAllIamPoliciesRequest.prototype.pageToken = ""; /** - * Creates a new SearchAllResourcesRequest instance using the specified properties. + * Creates a new SearchAllIamPoliciesRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} SearchAllResourcesRequest instance + * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} SearchAllIamPoliciesRequest instance */ - SearchAllResourcesRequest.create = function create(properties) { - return new SearchAllResourcesRequest(properties); + SearchAllIamPoliciesRequest.create = function create(properties) { + return new SearchAllIamPoliciesRequest(properties); }; /** - * Encodes the specified SearchAllResourcesRequest message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.verify|verify} messages. + * Encodes the specified SearchAllIamPoliciesRequest message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest} message SearchAllResourcesRequest message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest} message SearchAllIamPoliciesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchAllResourcesRequest.encode = function encode(message, writer) { + SearchAllIamPoliciesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.scope != null && message.hasOwnProperty("scope")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.scope); if (message.query != null && message.hasOwnProperty("query")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); - if (message.assetTypes != null && message.assetTypes.length) - for (var i = 0; i < message.assetTypes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetTypes[i]); if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; /** - * Encodes the specified SearchAllResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.verify|verify} messages. + * Encodes the specified SearchAllIamPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest} message SearchAllResourcesRequest message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest} message SearchAllIamPoliciesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchAllResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + SearchAllIamPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchAllResourcesRequest message from the specified reader or buffer. + * Decodes a SearchAllIamPoliciesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} SearchAllResourcesRequest + * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} SearchAllIamPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchAllResourcesRequest.decode = function decode(reader, length) { + SearchAllIamPoliciesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -9690,14 +9649,9 @@ message.query = reader.string(); break; case 3: - if (!(message.assetTypes && message.assetTypes.length)) - message.assetTypes = []; - message.assetTypes.push(reader.string()); - break; - case 4: message.pageSize = reader.int32(); break; - case 5: + case 4: message.pageToken = reader.string(); break; default: @@ -9709,30 +9663,30 @@ }; /** - * Decodes a SearchAllResourcesRequest message from the specified reader or buffer, length delimited. + * Decodes a SearchAllIamPoliciesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} SearchAllResourcesRequest + * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} SearchAllIamPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchAllResourcesRequest.decodeDelimited = function decodeDelimited(reader) { + SearchAllIamPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchAllResourcesRequest message. + * Verifies a SearchAllIamPoliciesRequest message. * @function verify - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchAllResourcesRequest.verify = function verify(message) { + SearchAllIamPoliciesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.scope != null && message.hasOwnProperty("scope")) @@ -9741,13 +9695,6 @@ if (message.query != null && message.hasOwnProperty("query")) if (!$util.isString(message.query)) return "query: string expected"; - if (message.assetTypes != null && message.hasOwnProperty("assetTypes")) { - if (!Array.isArray(message.assetTypes)) - return "assetTypes: array expected"; - for (var i = 0; i < message.assetTypes.length; ++i) - if (!$util.isString(message.assetTypes[i])) - return "assetTypes: string[] expected"; - } if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -9758,28 +9705,21 @@ }; /** - * Creates a SearchAllResourcesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SearchAllIamPoliciesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} SearchAllResourcesRequest + * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} SearchAllIamPoliciesRequest */ - SearchAllResourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) + SearchAllIamPoliciesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) return object; - var message = new $root.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest(); + var message = new $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest(); if (object.scope != null) message.scope = String(object.scope); if (object.query != null) message.query = String(object.query); - if (object.assetTypes) { - if (!Array.isArray(object.assetTypes)) - throw TypeError(".google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.assetTypes: array expected"); - message.assetTypes = []; - for (var i = 0; i < object.assetTypes.length; ++i) - message.assetTypes[i] = String(object.assetTypes[i]); - } if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -9788,20 +9728,18 @@ }; /** - * Creates a plain object from a SearchAllResourcesRequest message. Also converts values to other types if specified. + * Creates a plain object from a SearchAllIamPoliciesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @static - * @param {google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} message SearchAllResourcesRequest + * @param {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} message SearchAllIamPoliciesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchAllResourcesRequest.toObject = function toObject(message, options) { + SearchAllIamPoliciesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.assetTypes = []; if (options.defaults) { object.scope = ""; object.query = ""; @@ -9812,11 +9750,6 @@ object.scope = message.scope; if (message.query != null && message.hasOwnProperty("query")) object.query = message.query; - if (message.assetTypes && message.assetTypes.length) { - object.assetTypes = []; - for (var j = 0; j < message.assetTypes.length; ++j) - object.assetTypes[j] = message.assetTypes[j]; - } if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -9825,38 +9758,38 @@ }; /** - * Converts this SearchAllResourcesRequest to JSON. + * Converts this SearchAllIamPoliciesRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesRequest + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest * @instance * @returns {Object.} JSON object */ - SearchAllResourcesRequest.prototype.toJSON = function toJSON() { + SearchAllIamPoliciesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SearchAllResourcesRequest; + return SearchAllIamPoliciesRequest; })(); - v1p1beta1.SearchAllResourcesResponse = (function() { + v1p1beta1.SearchAllIamPoliciesResponse = (function() { /** - * Properties of a SearchAllResourcesResponse. + * Properties of a SearchAllIamPoliciesResponse. * @memberof google.cloud.asset.v1p1beta1 - * @interface ISearchAllResourcesResponse - * @property {Array.|null} [results] SearchAllResourcesResponse results - * @property {string|null} [nextPageToken] SearchAllResourcesResponse nextPageToken + * @interface ISearchAllIamPoliciesResponse + * @property {Array.|null} [results] SearchAllIamPoliciesResponse results + * @property {string|null} [nextPageToken] SearchAllIamPoliciesResponse nextPageToken */ /** - * Constructs a new SearchAllResourcesResponse. + * Constructs a new SearchAllIamPoliciesResponse. * @memberof google.cloud.asset.v1p1beta1 - * @classdesc Represents a SearchAllResourcesResponse. - * @implements ISearchAllResourcesResponse + * @classdesc Represents a SearchAllIamPoliciesResponse. + * @implements ISearchAllIamPoliciesResponse * @constructor - * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse=} [properties] Properties to set + * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse=} [properties] Properties to set */ - function SearchAllResourcesResponse(properties) { + function SearchAllIamPoliciesResponse(properties) { this.results = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -9865,88 +9798,88 @@ } /** - * SearchAllResourcesResponse results. - * @member {Array.} results - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse + * SearchAllIamPoliciesResponse results. + * @member {Array.} results + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse * @instance */ - SearchAllResourcesResponse.prototype.results = $util.emptyArray; + SearchAllIamPoliciesResponse.prototype.results = $util.emptyArray; /** - * SearchAllResourcesResponse nextPageToken. + * SearchAllIamPoliciesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse * @instance */ - SearchAllResourcesResponse.prototype.nextPageToken = ""; + SearchAllIamPoliciesResponse.prototype.nextPageToken = ""; /** - * Creates a new SearchAllResourcesResponse instance using the specified properties. + * Creates a new SearchAllIamPoliciesResponse instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse=} [properties] Properties to set - * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} SearchAllResourcesResponse instance + * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse=} [properties] Properties to set + * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} SearchAllIamPoliciesResponse instance */ - SearchAllResourcesResponse.create = function create(properties) { - return new SearchAllResourcesResponse(properties); + SearchAllIamPoliciesResponse.create = function create(properties) { + return new SearchAllIamPoliciesResponse(properties); }; /** - * Encodes the specified SearchAllResourcesResponse message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.verify|verify} messages. + * Encodes the specified SearchAllIamPoliciesResponse message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse} message SearchAllResourcesResponse message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse} message SearchAllIamPoliciesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchAllResourcesResponse.encode = function encode(message, writer) { + SearchAllIamPoliciesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified SearchAllResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.verify|verify} messages. + * Encodes the specified SearchAllIamPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllResourcesResponse} message SearchAllResourcesResponse message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse} message SearchAllIamPoliciesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchAllResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + SearchAllIamPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchAllResourcesResponse message from the specified reader or buffer. + * Decodes a SearchAllIamPoliciesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} SearchAllResourcesResponse + * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} SearchAllIamPoliciesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchAllResourcesResponse.decode = function decode(reader, length) { + SearchAllIamPoliciesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: if (!(message.results && message.results.length)) message.results = []; - message.results.push($root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.decode(reader, reader.uint32())); + message.results.push($root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); @@ -9960,37 +9893,37 @@ }; /** - * Decodes a SearchAllResourcesResponse message from the specified reader or buffer, length delimited. + * Decodes a SearchAllIamPoliciesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} SearchAllResourcesResponse + * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} SearchAllIamPoliciesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchAllResourcesResponse.decodeDelimited = function decodeDelimited(reader) { + SearchAllIamPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchAllResourcesResponse message. + * Verifies a SearchAllIamPoliciesResponse message. * @function verify - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchAllResourcesResponse.verify = function verify(message) { + SearchAllIamPoliciesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { - var error = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify(message.results[i]); + var error = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify(message.results[i]); if (error) return "results." + error; } @@ -10002,25 +9935,25 @@ }; /** - * Creates a SearchAllResourcesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SearchAllIamPoliciesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} SearchAllResourcesResponse + * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} SearchAllIamPoliciesResponse */ - SearchAllResourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) + SearchAllIamPoliciesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) return object; - var message = new $root.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse(); + var message = new $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse(); if (object.results) { if (!Array.isArray(object.results)) - throw TypeError(".google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.results: array expected"); + throw TypeError(".google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { if (typeof object.results[i] !== "object") - throw TypeError(".google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.results: object expected"); - message.results[i] = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.fromObject(object.results[i]); + throw TypeError(".google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.results: object expected"); + message.results[i] = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.fromObject(object.results[i]); } } if (object.nextPageToken != null) @@ -10029,15 +9962,15 @@ }; /** - * Creates a plain object from a SearchAllResourcesResponse message. Also converts values to other types if specified. + * Creates a plain object from a SearchAllIamPoliciesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse * @static - * @param {google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} message SearchAllResourcesResponse + * @param {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} message SearchAllIamPoliciesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchAllResourcesResponse.toObject = function toObject(message, options) { + SearchAllIamPoliciesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -10048,7 +9981,7 @@ if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata.toObject(message.results[j], options); + object.results[j] = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.toObject(message.results[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -10056,40 +9989,43 @@ }; /** - * Converts this SearchAllResourcesResponse to JSON. + * Converts this SearchAllIamPoliciesResponse to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p1beta1.SearchAllResourcesResponse + * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse * @instance * @returns {Object.} JSON object */ - SearchAllResourcesResponse.prototype.toJSON = function toJSON() { + SearchAllIamPoliciesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SearchAllResourcesResponse; + return SearchAllIamPoliciesResponse; })(); - v1p1beta1.SearchAllIamPoliciesRequest = (function() { + v1p1beta1.StandardResourceMetadata = (function() { /** - * Properties of a SearchAllIamPoliciesRequest. + * Properties of a StandardResourceMetadata. * @memberof google.cloud.asset.v1p1beta1 - * @interface ISearchAllIamPoliciesRequest - * @property {string|null} [scope] SearchAllIamPoliciesRequest scope - * @property {string|null} [query] SearchAllIamPoliciesRequest query - * @property {number|null} [pageSize] SearchAllIamPoliciesRequest pageSize - * @property {string|null} [pageToken] SearchAllIamPoliciesRequest pageToken + * @interface IStandardResourceMetadata + * @property {string|null} [name] StandardResourceMetadata name + * @property {string|null} [assetType] StandardResourceMetadata assetType + * @property {string|null} [project] StandardResourceMetadata project + * @property {string|null} [displayName] StandardResourceMetadata displayName + * @property {string|null} [description] StandardResourceMetadata description + * @property {Array.|null} [additionalAttributes] StandardResourceMetadata additionalAttributes */ /** - * Constructs a new SearchAllIamPoliciesRequest. + * Constructs a new StandardResourceMetadata. * @memberof google.cloud.asset.v1p1beta1 - * @classdesc Represents a SearchAllIamPoliciesRequest. - * @implements ISearchAllIamPoliciesRequest + * @classdesc Represents a StandardResourceMetadata. + * @implements IStandardResourceMetadata * @constructor - * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1p1beta1.IStandardResourceMetadata=} [properties] Properties to set */ - function SearchAllIamPoliciesRequest(properties) { + function StandardResourceMetadata(properties) { + this.additionalAttributes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10097,114 +10033,143 @@ } /** - * SearchAllIamPoliciesRequest scope. - * @member {string} scope - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * StandardResourceMetadata name. + * @member {string} name + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * @instance + */ + StandardResourceMetadata.prototype.name = ""; + + /** + * StandardResourceMetadata assetType. + * @member {string} assetType + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata + * @instance + */ + StandardResourceMetadata.prototype.assetType = ""; + + /** + * StandardResourceMetadata project. + * @member {string} project + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @instance */ - SearchAllIamPoliciesRequest.prototype.scope = ""; + StandardResourceMetadata.prototype.project = ""; /** - * SearchAllIamPoliciesRequest query. - * @member {string} query - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * StandardResourceMetadata displayName. + * @member {string} displayName + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @instance */ - SearchAllIamPoliciesRequest.prototype.query = ""; + StandardResourceMetadata.prototype.displayName = ""; /** - * SearchAllIamPoliciesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * StandardResourceMetadata description. + * @member {string} description + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @instance */ - SearchAllIamPoliciesRequest.prototype.pageSize = 0; + StandardResourceMetadata.prototype.description = ""; /** - * SearchAllIamPoliciesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * StandardResourceMetadata additionalAttributes. + * @member {Array.} additionalAttributes + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @instance */ - SearchAllIamPoliciesRequest.prototype.pageToken = ""; + StandardResourceMetadata.prototype.additionalAttributes = $util.emptyArray; /** - * Creates a new SearchAllIamPoliciesRequest instance using the specified properties. + * Creates a new StandardResourceMetadata instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} SearchAllIamPoliciesRequest instance + * @param {google.cloud.asset.v1p1beta1.IStandardResourceMetadata=} [properties] Properties to set + * @returns {google.cloud.asset.v1p1beta1.StandardResourceMetadata} StandardResourceMetadata instance */ - SearchAllIamPoliciesRequest.create = function create(properties) { - return new SearchAllIamPoliciesRequest(properties); + StandardResourceMetadata.create = function create(properties) { + return new StandardResourceMetadata(properties); }; /** - * Encodes the specified SearchAllIamPoliciesRequest message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.verify|verify} messages. + * Encodes the specified StandardResourceMetadata message. Does not implicitly {@link google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest} message SearchAllIamPoliciesRequest message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.IStandardResourceMetadata} message StandardResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchAllIamPoliciesRequest.encode = function encode(message, writer) { + StandardResourceMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.scope != null && message.hasOwnProperty("scope")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.scope); - if (message.query != null && message.hasOwnProperty("query")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.assetType != null && message.hasOwnProperty("assetType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetType); + if (message.project != null && message.hasOwnProperty("project")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.project); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.additionalAttributes != null && message.additionalAttributes.length) + for (var i = 0; i < message.additionalAttributes.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.additionalAttributes[i]); return writer; }; /** - * Encodes the specified SearchAllIamPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.verify|verify} messages. + * Encodes the specified StandardResourceMetadata message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.StandardResourceMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest} message SearchAllIamPoliciesRequest message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.IStandardResourceMetadata} message StandardResourceMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchAllIamPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { + StandardResourceMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchAllIamPoliciesRequest message from the specified reader or buffer. + * Decodes a StandardResourceMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} SearchAllIamPoliciesRequest + * @returns {google.cloud.asset.v1p1beta1.StandardResourceMetadata} StandardResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchAllIamPoliciesRequest.decode = function decode(reader, length) { + StandardResourceMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.scope = reader.string(); + message.name = reader.string(); break; case 2: - message.query = reader.string(); + message.assetType = reader.string(); break; case 3: - message.pageSize = reader.int32(); + message.project = reader.string(); break; case 4: - message.pageToken = reader.string(); + message.displayName = reader.string(); + break; + case 5: + message.description = reader.string(); + break; + case 10: + if (!(message.additionalAttributes && message.additionalAttributes.length)) + message.additionalAttributes = []; + message.additionalAttributes.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -10215,134 +10180,163 @@ }; /** - * Decodes a SearchAllIamPoliciesRequest message from the specified reader or buffer, length delimited. + * Decodes a StandardResourceMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} SearchAllIamPoliciesRequest + * @returns {google.cloud.asset.v1p1beta1.StandardResourceMetadata} StandardResourceMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchAllIamPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { + StandardResourceMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchAllIamPoliciesRequest message. + * Verifies a StandardResourceMetadata message. * @function verify - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchAllIamPoliciesRequest.verify = function verify(message) { + StandardResourceMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - if (!$util.isString(message.scope)) - return "scope: string expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.assetType != null && message.hasOwnProperty("assetType")) + if (!$util.isString(message.assetType)) + return "assetType: string expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.additionalAttributes != null && message.hasOwnProperty("additionalAttributes")) { + if (!Array.isArray(message.additionalAttributes)) + return "additionalAttributes: array expected"; + for (var i = 0; i < message.additionalAttributes.length; ++i) + if (!$util.isString(message.additionalAttributes[i])) + return "additionalAttributes: string[] expected"; + } return null; }; /** - * Creates a SearchAllIamPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StandardResourceMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} SearchAllIamPoliciesRequest + * @returns {google.cloud.asset.v1p1beta1.StandardResourceMetadata} StandardResourceMetadata */ - SearchAllIamPoliciesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) + StandardResourceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata) return object; - var message = new $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest(); - if (object.scope != null) - message.scope = String(object.scope); - if (object.query != null) - message.query = String(object.query); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.asset.v1p1beta1.StandardResourceMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.assetType != null) + message.assetType = String(object.assetType); + if (object.project != null) + message.project = String(object.project); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.additionalAttributes) { + if (!Array.isArray(object.additionalAttributes)) + throw TypeError(".google.cloud.asset.v1p1beta1.StandardResourceMetadata.additionalAttributes: array expected"); + message.additionalAttributes = []; + for (var i = 0; i < object.additionalAttributes.length; ++i) + message.additionalAttributes[i] = String(object.additionalAttributes[i]); + } return message; }; /** - * Creates a plain object from a SearchAllIamPoliciesRequest message. Also converts values to other types if specified. + * Creates a plain object from a StandardResourceMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @static - * @param {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} message SearchAllIamPoliciesRequest + * @param {google.cloud.asset.v1p1beta1.StandardResourceMetadata} message StandardResourceMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchAllIamPoliciesRequest.toObject = function toObject(message, options) { + StandardResourceMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.additionalAttributes = []; if (options.defaults) { - object.scope = ""; - object.query = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.assetType = ""; + object.project = ""; + object.displayName = ""; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.assetType != null && message.hasOwnProperty("assetType")) + object.assetType = message.assetType; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.additionalAttributes && message.additionalAttributes.length) { + object.additionalAttributes = []; + for (var j = 0; j < message.additionalAttributes.length; ++j) + object.additionalAttributes[j] = message.additionalAttributes[j]; } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = message.scope; - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; return object; }; /** - * Converts this SearchAllIamPoliciesRequest to JSON. + * Converts this StandardResourceMetadata to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest + * @memberof google.cloud.asset.v1p1beta1.StandardResourceMetadata * @instance * @returns {Object.} JSON object */ - SearchAllIamPoliciesRequest.prototype.toJSON = function toJSON() { + StandardResourceMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SearchAllIamPoliciesRequest; + return StandardResourceMetadata; })(); - v1p1beta1.SearchAllIamPoliciesResponse = (function() { + v1p1beta1.IamPolicySearchResult = (function() { /** - * Properties of a SearchAllIamPoliciesResponse. + * Properties of an IamPolicySearchResult. * @memberof google.cloud.asset.v1p1beta1 - * @interface ISearchAllIamPoliciesResponse - * @property {Array.|null} [results] SearchAllIamPoliciesResponse results - * @property {string|null} [nextPageToken] SearchAllIamPoliciesResponse nextPageToken + * @interface IIamPolicySearchResult + * @property {string|null} [resource] IamPolicySearchResult resource + * @property {string|null} [project] IamPolicySearchResult project + * @property {google.iam.v1.IPolicy|null} [policy] IamPolicySearchResult policy */ /** - * Constructs a new SearchAllIamPoliciesResponse. + * Constructs a new IamPolicySearchResult. * @memberof google.cloud.asset.v1p1beta1 - * @classdesc Represents a SearchAllIamPoliciesResponse. - * @implements ISearchAllIamPoliciesResponse + * @classdesc Represents an IamPolicySearchResult. + * @implements IIamPolicySearchResult * @constructor - * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse=} [properties] Properties to set + * @param {google.cloud.asset.v1p1beta1.IIamPolicySearchResult=} [properties] Properties to set */ - function SearchAllIamPoliciesResponse(properties) { - this.results = []; + function IamPolicySearchResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10350,91 +10344,101 @@ } /** - * SearchAllIamPoliciesResponse results. - * @member {Array.} results - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse + * IamPolicySearchResult resource. + * @member {string} resource + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult * @instance */ - SearchAllIamPoliciesResponse.prototype.results = $util.emptyArray; + IamPolicySearchResult.prototype.resource = ""; /** - * SearchAllIamPoliciesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse + * IamPolicySearchResult project. + * @member {string} project + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult * @instance */ - SearchAllIamPoliciesResponse.prototype.nextPageToken = ""; + IamPolicySearchResult.prototype.project = ""; /** - * Creates a new SearchAllIamPoliciesResponse instance using the specified properties. + * IamPolicySearchResult policy. + * @member {google.iam.v1.IPolicy|null|undefined} policy + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult + * @instance + */ + IamPolicySearchResult.prototype.policy = null; + + /** + * Creates a new IamPolicySearchResult instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse=} [properties] Properties to set - * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} SearchAllIamPoliciesResponse instance + * @param {google.cloud.asset.v1p1beta1.IIamPolicySearchResult=} [properties] Properties to set + * @returns {google.cloud.asset.v1p1beta1.IamPolicySearchResult} IamPolicySearchResult instance */ - SearchAllIamPoliciesResponse.create = function create(properties) { - return new SearchAllIamPoliciesResponse(properties); + IamPolicySearchResult.create = function create(properties) { + return new IamPolicySearchResult(properties); }; /** - * Encodes the specified SearchAllIamPoliciesResponse message. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.verify|verify} messages. + * Encodes the specified IamPolicySearchResult message. Does not implicitly {@link google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse} message SearchAllIamPoliciesResponse message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.IIamPolicySearchResult} message IamPolicySearchResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchAllIamPoliciesResponse.encode = function encode(message, writer) { + IamPolicySearchResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.resource != null && message.hasOwnProperty("resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.project != null && message.hasOwnProperty("project")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.project); + if (message.policy != null && message.hasOwnProperty("policy")) + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified SearchAllIamPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.verify|verify} messages. + * Encodes the specified IamPolicySearchResult message, length delimited. Does not implicitly {@link google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult * @static - * @param {google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesResponse} message SearchAllIamPoliciesResponse message or plain object to encode + * @param {google.cloud.asset.v1p1beta1.IIamPolicySearchResult} message IamPolicySearchResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchAllIamPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { + IamPolicySearchResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchAllIamPoliciesResponse message from the specified reader or buffer. + * Decodes an IamPolicySearchResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} SearchAllIamPoliciesResponse + * @returns {google.cloud.asset.v1p1beta1.IamPolicySearchResult} IamPolicySearchResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchAllIamPoliciesResponse.decode = function decode(reader, length) { + IamPolicySearchResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push($root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.decode(reader, reader.uint32())); + message.resource = reader.string(); break; - case 2: - message.nextPageToken = reader.string(); + case 3: + message.project = reader.string(); + break; + case 4: + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -10445,113 +10449,109 @@ }; /** - * Decodes a SearchAllIamPoliciesResponse message from the specified reader or buffer, length delimited. + * Decodes an IamPolicySearchResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} SearchAllIamPoliciesResponse + * @returns {google.cloud.asset.v1p1beta1.IamPolicySearchResult} IamPolicySearchResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchAllIamPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { + IamPolicySearchResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchAllIamPoliciesResponse message. + * Verifies an IamPolicySearchResult message. * @function verify - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchAllIamPoliciesResponse.verify = function verify(message) { + IamPolicySearchResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) { - var error = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.verify(message.results[i]); - if (error) - return "results." + error; - } + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy); + if (error) + return "policy." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a SearchAllIamPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an IamPolicySearchResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} SearchAllIamPoliciesResponse + * @returns {google.cloud.asset.v1p1beta1.IamPolicySearchResult} IamPolicySearchResult */ - SearchAllIamPoliciesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) + IamPolicySearchResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult) return object; - var message = new $root.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") - throw TypeError(".google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.results: object expected"); - message.results[i] = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.fromObject(object.results[i]); - } + var message = new $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.project != null) + message.project = String(object.project); + if (object.policy != null) { + if (typeof object.policy !== "object") + throw TypeError(".google.cloud.asset.v1p1beta1.IamPolicySearchResult.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a SearchAllIamPoliciesResponse message. Also converts values to other types if specified. + * Creates a plain object from an IamPolicySearchResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult * @static - * @param {google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} message SearchAllIamPoliciesResponse + * @param {google.cloud.asset.v1p1beta1.IamPolicySearchResult} message IamPolicySearchResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchAllIamPoliciesResponse.toObject = function toObject(message, options) { + IamPolicySearchResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.asset.v1p1beta1.IamPolicySearchResult.toObject(message.results[j], options); + if (options.defaults) { + object.resource = ""; + object.project = ""; + object.policy = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); return object; }; /** - * Converts this SearchAllIamPoliciesResponse to JSON. + * Converts this IamPolicySearchResult to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse + * @memberof google.cloud.asset.v1p1beta1.IamPolicySearchResult * @instance * @returns {Object.} JSON object */ - SearchAllIamPoliciesResponse.prototype.toJSON = function toJSON() { + IamPolicySearchResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SearchAllIamPoliciesResponse; + return IamPolicySearchResult; })(); return v1p1beta1; @@ -10566,267 +10566,226 @@ */ var v1p2beta1 = {}; - v1p2beta1.TemporalAsset = (function() { + v1p2beta1.AssetService = (function() { /** - * Properties of a TemporalAsset. + * Constructs a new AssetService service. * @memberof google.cloud.asset.v1p2beta1 - * @interface ITemporalAsset - * @property {google.cloud.asset.v1p2beta1.ITimeWindow|null} [window] TemporalAsset window - * @property {boolean|null} [deleted] TemporalAsset deleted - * @property {google.cloud.asset.v1p2beta1.IAsset|null} [asset] TemporalAsset asset + * @classdesc Represents an AssetService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function AssetService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AssetService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AssetService; /** - * Constructs a new TemporalAsset. - * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a TemporalAsset. - * @implements ITemporalAsset - * @constructor - * @param {google.cloud.asset.v1p2beta1.ITemporalAsset=} [properties] Properties to set + * Creates new AssetService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {AssetService} RPC service. Useful where requests and/or responses are streamed. */ - function TemporalAsset(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + AssetService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.asset.v1p2beta1.AssetService#createFeed}. + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @typedef CreateFeedCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1p2beta1.Feed} [response] Feed + */ + + /** + * Calls CreateFeed. + * @function createFeed + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest} request CreateFeedRequest message or plain object + * @param {google.cloud.asset.v1p2beta1.AssetService.CreateFeedCallback} callback Node-style callback called with the error, if any, and Feed + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AssetService.prototype.createFeed = function createFeed(request, callback) { + return this.rpcCall(createFeed, $root.google.cloud.asset.v1p2beta1.CreateFeedRequest, $root.google.cloud.asset.v1p2beta1.Feed, request, callback); + }, "name", { value: "CreateFeed" }); /** - * TemporalAsset window. - * @member {google.cloud.asset.v1p2beta1.ITimeWindow|null|undefined} window - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset + * Calls CreateFeed. + * @function createFeed + * @memberof google.cloud.asset.v1p2beta1.AssetService * @instance + * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest} request CreateFeedRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TemporalAsset.prototype.window = null; /** - * TemporalAsset deleted. - * @member {boolean} deleted - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset - * @instance + * Callback as used by {@link google.cloud.asset.v1p2beta1.AssetService#getFeed}. + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @typedef GetFeedCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1p2beta1.Feed} [response] Feed */ - TemporalAsset.prototype.deleted = false; /** - * TemporalAsset asset. - * @member {google.cloud.asset.v1p2beta1.IAsset|null|undefined} asset - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset + * Calls GetFeed. + * @function getFeed + * @memberof google.cloud.asset.v1p2beta1.AssetService * @instance + * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest} request GetFeedRequest message or plain object + * @param {google.cloud.asset.v1p2beta1.AssetService.GetFeedCallback} callback Node-style callback called with the error, if any, and Feed + * @returns {undefined} + * @variation 1 */ - TemporalAsset.prototype.asset = null; + Object.defineProperty(AssetService.prototype.getFeed = function getFeed(request, callback) { + return this.rpcCall(getFeed, $root.google.cloud.asset.v1p2beta1.GetFeedRequest, $root.google.cloud.asset.v1p2beta1.Feed, request, callback); + }, "name", { value: "GetFeed" }); /** - * Creates a new TemporalAsset instance using the specified properties. - * @function create - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset - * @static - * @param {google.cloud.asset.v1p2beta1.ITemporalAsset=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.TemporalAsset} TemporalAsset instance + * Calls GetFeed. + * @function getFeed + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest} request GetFeedRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TemporalAsset.create = function create(properties) { - return new TemporalAsset(properties); - }; /** - * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1p2beta1.TemporalAsset.verify|verify} messages. - * @function encode - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset - * @static - * @param {google.cloud.asset.v1p2beta1.ITemporalAsset} message TemporalAsset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.asset.v1p2beta1.AssetService#listFeeds}. + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @typedef ListFeedsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1p2beta1.ListFeedsResponse} [response] ListFeedsResponse */ - TemporalAsset.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.window != null && message.hasOwnProperty("window")) - $root.google.cloud.asset.v1p2beta1.TimeWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.deleted != null && message.hasOwnProperty("deleted")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.deleted); - if (message.asset != null && message.hasOwnProperty("asset")) - $root.google.cloud.asset.v1p2beta1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; /** - * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.TemporalAsset.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset - * @static - * @param {google.cloud.asset.v1p2beta1.ITemporalAsset} message TemporalAsset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListFeeds. + * @function listFeeds + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest} request ListFeedsRequest message or plain object + * @param {google.cloud.asset.v1p2beta1.AssetService.ListFeedsCallback} callback Node-style callback called with the error, if any, and ListFeedsResponse + * @returns {undefined} + * @variation 1 */ - TemporalAsset.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(AssetService.prototype.listFeeds = function listFeeds(request, callback) { + return this.rpcCall(listFeeds, $root.google.cloud.asset.v1p2beta1.ListFeedsRequest, $root.google.cloud.asset.v1p2beta1.ListFeedsResponse, request, callback); + }, "name", { value: "ListFeeds" }); /** - * Decodes a TemporalAsset message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.TemporalAsset} TemporalAsset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListFeeds. + * @function listFeeds + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest} request ListFeedsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TemporalAsset.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.TemporalAsset(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.window = $root.google.cloud.asset.v1p2beta1.TimeWindow.decode(reader, reader.uint32()); - break; - case 2: - message.deleted = reader.bool(); - break; - case 3: - message.asset = $root.google.cloud.asset.v1p2beta1.Asset.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.TemporalAsset} TemporalAsset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.asset.v1p2beta1.AssetService#updateFeed}. + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @typedef UpdateFeedCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.asset.v1p2beta1.Feed} [response] Feed */ - TemporalAsset.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a TemporalAsset message. - * @function verify - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateFeed. + * @function updateFeed + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest} request UpdateFeedRequest message or plain object + * @param {google.cloud.asset.v1p2beta1.AssetService.UpdateFeedCallback} callback Node-style callback called with the error, if any, and Feed + * @returns {undefined} + * @variation 1 */ - TemporalAsset.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.window != null && message.hasOwnProperty("window")) { - var error = $root.google.cloud.asset.v1p2beta1.TimeWindow.verify(message.window); - if (error) - return "window." + error; - } - if (message.deleted != null && message.hasOwnProperty("deleted")) - if (typeof message.deleted !== "boolean") - return "deleted: boolean expected"; - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.asset.v1p2beta1.Asset.verify(message.asset); - if (error) - return "asset." + error; - } - return null; - }; + Object.defineProperty(AssetService.prototype.updateFeed = function updateFeed(request, callback) { + return this.rpcCall(updateFeed, $root.google.cloud.asset.v1p2beta1.UpdateFeedRequest, $root.google.cloud.asset.v1p2beta1.Feed, request, callback); + }, "name", { value: "UpdateFeed" }); /** - * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.TemporalAsset} TemporalAsset + * Calls UpdateFeed. + * @function updateFeed + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest} request UpdateFeedRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TemporalAsset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.TemporalAsset) - return object; - var message = new $root.google.cloud.asset.v1p2beta1.TemporalAsset(); - if (object.window != null) { - if (typeof object.window !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.TemporalAsset.window: object expected"); - message.window = $root.google.cloud.asset.v1p2beta1.TimeWindow.fromObject(object.window); - } - if (object.deleted != null) - message.deleted = Boolean(object.deleted); - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.TemporalAsset.asset: object expected"); - message.asset = $root.google.cloud.asset.v1p2beta1.Asset.fromObject(object.asset); - } - return message; - }; /** - * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset - * @static - * @param {google.cloud.asset.v1p2beta1.TemporalAsset} message TemporalAsset - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.asset.v1p2beta1.AssetService#deleteFeed}. + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @typedef DeleteFeedCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - TemporalAsset.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.window = null; - object.deleted = false; - object.asset = null; - } - if (message.window != null && message.hasOwnProperty("window")) - object.window = $root.google.cloud.asset.v1p2beta1.TimeWindow.toObject(message.window, options); - if (message.deleted != null && message.hasOwnProperty("deleted")) - object.deleted = message.deleted; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.asset.v1p2beta1.Asset.toObject(message.asset, options); - return object; - }; /** - * Converts this TemporalAsset to JSON. - * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.TemporalAsset + * Calls DeleteFeed. + * @function deleteFeed + * @memberof google.cloud.asset.v1p2beta1.AssetService + * @instance + * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest} request DeleteFeedRequest message or plain object + * @param {google.cloud.asset.v1p2beta1.AssetService.DeleteFeedCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AssetService.prototype.deleteFeed = function deleteFeed(request, callback) { + return this.rpcCall(deleteFeed, $root.google.cloud.asset.v1p2beta1.DeleteFeedRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFeed" }); + + /** + * Calls DeleteFeed. + * @function deleteFeed + * @memberof google.cloud.asset.v1p2beta1.AssetService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest} request DeleteFeedRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TemporalAsset.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return TemporalAsset; + return AssetService; })(); - v1p2beta1.TimeWindow = (function() { + v1p2beta1.CreateFeedRequest = (function() { /** - * Properties of a TimeWindow. + * Properties of a CreateFeedRequest. * @memberof google.cloud.asset.v1p2beta1 - * @interface ITimeWindow - * @property {google.protobuf.ITimestamp|null} [startTime] TimeWindow startTime - * @property {google.protobuf.ITimestamp|null} [endTime] TimeWindow endTime + * @interface ICreateFeedRequest + * @property {string|null} [parent] CreateFeedRequest parent + * @property {string|null} [feedId] CreateFeedRequest feedId + * @property {google.cloud.asset.v1p2beta1.IFeed|null} [feed] CreateFeedRequest feed */ /** - * Constructs a new TimeWindow. + * Constructs a new CreateFeedRequest. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a TimeWindow. - * @implements ITimeWindow + * @classdesc Represents a CreateFeedRequest. + * @implements ICreateFeedRequest * @constructor - * @param {google.cloud.asset.v1p2beta1.ITimeWindow=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest=} [properties] Properties to set */ - function TimeWindow(properties) { + function CreateFeedRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10834,88 +10793,101 @@ } /** - * TimeWindow startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * CreateFeedRequest parent. + * @member {string} parent + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest * @instance */ - TimeWindow.prototype.startTime = null; + CreateFeedRequest.prototype.parent = ""; /** - * TimeWindow endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * CreateFeedRequest feedId. + * @member {string} feedId + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest * @instance */ - TimeWindow.prototype.endTime = null; + CreateFeedRequest.prototype.feedId = ""; /** - * Creates a new TimeWindow instance using the specified properties. + * CreateFeedRequest feed. + * @member {google.cloud.asset.v1p2beta1.IFeed|null|undefined} feed + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * @instance + */ + CreateFeedRequest.prototype.feed = null; + + /** + * Creates a new CreateFeedRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.ITimeWindow=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.TimeWindow} TimeWindow instance + * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.CreateFeedRequest} CreateFeedRequest instance */ - TimeWindow.create = function create(properties) { - return new TimeWindow(properties); + CreateFeedRequest.create = function create(properties) { + return new CreateFeedRequest(properties); }; /** - * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1p2beta1.TimeWindow.verify|verify} messages. + * Encodes the specified CreateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1p2beta1.CreateFeedRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.ITimeWindow} message TimeWindow message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest} message CreateFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeWindow.encode = function encode(message, writer) { + CreateFeedRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && message.hasOwnProperty("endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.feedId != null && message.hasOwnProperty("feedId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.feedId); + if (message.feed != null && message.hasOwnProperty("feed")) + $root.google.cloud.asset.v1p2beta1.Feed.encode(message.feed, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.TimeWindow.verify|verify} messages. + * Encodes the specified CreateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.CreateFeedRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.ITimeWindow} message TimeWindow message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest} message CreateFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeWindow.encodeDelimited = function encodeDelimited(message, writer) { + CreateFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeWindow message from the specified reader or buffer. + * Decodes a CreateFeedRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.TimeWindow} TimeWindow + * @returns {google.cloud.asset.v1p2beta1.CreateFeedRequest} CreateFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeWindow.decode = function decode(reader, length) { + CreateFeedRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.TimeWindow(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.CreateFeedRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.feedId = reader.string(); + break; + case 3: + message.feed = $root.google.cloud.asset.v1p2beta1.Feed.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -10926,263 +10898,206 @@ }; /** - * Decodes a TimeWindow message from the specified reader or buffer, length delimited. + * Decodes a CreateFeedRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.TimeWindow} TimeWindow + * @returns {google.cloud.asset.v1p2beta1.CreateFeedRequest} CreateFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeWindow.decodeDelimited = function decodeDelimited(reader) { + CreateFeedRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeWindow message. + * Verifies a CreateFeedRequest message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeWindow.verify = function verify(message) { + CreateFeedRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.feedId != null && message.hasOwnProperty("feedId")) + if (!$util.isString(message.feedId)) + return "feedId: string expected"; + if (message.feed != null && message.hasOwnProperty("feed")) { + var error = $root.google.cloud.asset.v1p2beta1.Feed.verify(message.feed); if (error) - return "endTime." + error; + return "feed." + error; } return null; }; /** - * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFeedRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.TimeWindow} TimeWindow + * @returns {google.cloud.asset.v1p2beta1.CreateFeedRequest} CreateFeedRequest */ - TimeWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.TimeWindow) + CreateFeedRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.CreateFeedRequest) return object; - var message = new $root.google.cloud.asset.v1p2beta1.TimeWindow(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.TimeWindow.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.TimeWindow.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + var message = new $root.google.cloud.asset.v1p2beta1.CreateFeedRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.feedId != null) + message.feedId = String(object.feedId); + if (object.feed != null) { + if (typeof object.feed !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.CreateFeedRequest.feed: object expected"); + message.feed = $root.google.cloud.asset.v1p2beta1.Feed.fromObject(object.feed); } return message; }; /** - * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. + * Creates a plain object from a CreateFeedRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.TimeWindow} message TimeWindow + * @param {google.cloud.asset.v1p2beta1.CreateFeedRequest} message CreateFeedRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeWindow.toObject = function toObject(message, options) { + CreateFeedRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.startTime = null; - object.endTime = null; + object.parent = ""; + object.feedId = ""; + object.feed = null; } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.feedId != null && message.hasOwnProperty("feedId")) + object.feedId = message.feedId; + if (message.feed != null && message.hasOwnProperty("feed")) + object.feed = $root.google.cloud.asset.v1p2beta1.Feed.toObject(message.feed, options); return object; }; /** - * Converts this TimeWindow to JSON. + * Converts this CreateFeedRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest * @instance * @returns {Object.} JSON object */ - TimeWindow.prototype.toJSON = function toJSON() { + CreateFeedRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeWindow; + return CreateFeedRequest; })(); - v1p2beta1.Asset = (function() { - - /** - * Properties of an Asset. - * @memberof google.cloud.asset.v1p2beta1 - * @interface IAsset - * @property {string|null} [name] Asset name - * @property {string|null} [assetType] Asset assetType - * @property {google.cloud.asset.v1p2beta1.IResource|null} [resource] Asset resource - * @property {google.iam.v1.IPolicy|null} [iamPolicy] Asset iamPolicy - * @property {Array.|null} [ancestors] Asset ancestors - */ - - /** - * Constructs a new Asset. - * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents an Asset. - * @implements IAsset - * @constructor - * @param {google.cloud.asset.v1p2beta1.IAsset=} [properties] Properties to set - */ - function Asset(properties) { - this.ancestors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Asset name. - * @member {string} name - * @memberof google.cloud.asset.v1p2beta1.Asset - * @instance - */ - Asset.prototype.name = ""; - - /** - * Asset assetType. - * @member {string} assetType - * @memberof google.cloud.asset.v1p2beta1.Asset - * @instance - */ - Asset.prototype.assetType = ""; + v1p2beta1.GetFeedRequest = (function() { /** - * Asset resource. - * @member {google.cloud.asset.v1p2beta1.IResource|null|undefined} resource - * @memberof google.cloud.asset.v1p2beta1.Asset - * @instance + * Properties of a GetFeedRequest. + * @memberof google.cloud.asset.v1p2beta1 + * @interface IGetFeedRequest + * @property {string|null} [name] GetFeedRequest name */ - Asset.prototype.resource = null; /** - * Asset iamPolicy. - * @member {google.iam.v1.IPolicy|null|undefined} iamPolicy - * @memberof google.cloud.asset.v1p2beta1.Asset - * @instance + * Constructs a new GetFeedRequest. + * @memberof google.cloud.asset.v1p2beta1 + * @classdesc Represents a GetFeedRequest. + * @implements IGetFeedRequest + * @constructor + * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest=} [properties] Properties to set */ - Asset.prototype.iamPolicy = null; + function GetFeedRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Asset ancestors. - * @member {Array.} ancestors - * @memberof google.cloud.asset.v1p2beta1.Asset + * GetFeedRequest name. + * @member {string} name + * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest * @instance */ - Asset.prototype.ancestors = $util.emptyArray; + GetFeedRequest.prototype.name = ""; /** - * Creates a new Asset instance using the specified properties. + * Creates a new GetFeedRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.Asset + * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.IAsset=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.Asset} Asset instance + * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.GetFeedRequest} GetFeedRequest instance */ - Asset.create = function create(properties) { - return new Asset(properties); + GetFeedRequest.create = function create(properties) { + return new GetFeedRequest(properties); }; /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1p2beta1.Asset.verify|verify} messages. + * Encodes the specified GetFeedRequest message. Does not implicitly {@link google.cloud.asset.v1p2beta1.GetFeedRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.Asset + * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest} message GetFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encode = function encode(message, writer) { + GetFeedRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.assetType != null && message.hasOwnProperty("assetType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetType); - if (message.resource != null && message.hasOwnProperty("resource")) - $root.google.cloud.asset.v1p2beta1.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) - $root.google.iam.v1.Policy.encode(message.iamPolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.ancestors != null && message.ancestors.length) - for (var i = 0; i < message.ancestors.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.ancestors[i]); return writer; }; /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.Asset.verify|verify} messages. + * Encodes the specified GetFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.GetFeedRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.Asset + * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.IAsset} message Asset message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest} message GetFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Asset.encodeDelimited = function encodeDelimited(message, writer) { + GetFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Asset message from the specified reader or buffer. + * Decodes a GetFeedRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.Asset + * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.Asset} Asset + * @returns {google.cloud.asset.v1p2beta1.GetFeedRequest} GetFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Asset.decode = function decode(reader, length) { + GetFeedRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.Asset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.GetFeedRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.assetType = reader.string(); - break; - case 3: - message.resource = $root.google.cloud.asset.v1p2beta1.Resource.decode(reader, reader.uint32()); - break; - case 4: - message.iamPolicy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.ancestors && message.ancestors.length)) - message.ancestors = []; - message.ancestors.push(reader.string()); - break; default: reader.skipType(tag & 7); break; @@ -11192,310 +11107,184 @@ }; /** - * Decodes an Asset message from the specified reader or buffer, length delimited. + * Decodes a GetFeedRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.Asset + * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.Asset} Asset + * @returns {google.cloud.asset.v1p2beta1.GetFeedRequest} GetFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Asset.decodeDelimited = function decodeDelimited(reader) { + GetFeedRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Asset message. + * Verifies a GetFeedRequest message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.Asset + * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Asset.verify = function verify(message) { + GetFeedRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.assetType != null && message.hasOwnProperty("assetType")) - if (!$util.isString(message.assetType)) - return "assetType: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.asset.v1p2beta1.Resource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) { - var error = $root.google.iam.v1.Policy.verify(message.iamPolicy); - if (error) - return "iamPolicy." + error; - } - if (message.ancestors != null && message.hasOwnProperty("ancestors")) { - if (!Array.isArray(message.ancestors)) - return "ancestors: array expected"; - for (var i = 0; i < message.ancestors.length; ++i) - if (!$util.isString(message.ancestors[i])) - return "ancestors: string[] expected"; - } return null; }; /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * Creates a GetFeedRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.Asset + * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.Asset} Asset + * @returns {google.cloud.asset.v1p2beta1.GetFeedRequest} GetFeedRequest */ - Asset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.Asset) + GetFeedRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.GetFeedRequest) return object; - var message = new $root.google.cloud.asset.v1p2beta1.Asset(); + var message = new $root.google.cloud.asset.v1p2beta1.GetFeedRequest(); if (object.name != null) message.name = String(object.name); - if (object.assetType != null) - message.assetType = String(object.assetType); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.Asset.resource: object expected"); - message.resource = $root.google.cloud.asset.v1p2beta1.Resource.fromObject(object.resource); - } - if (object.iamPolicy != null) { - if (typeof object.iamPolicy !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.Asset.iamPolicy: object expected"); - message.iamPolicy = $root.google.iam.v1.Policy.fromObject(object.iamPolicy); - } - if (object.ancestors) { - if (!Array.isArray(object.ancestors)) - throw TypeError(".google.cloud.asset.v1p2beta1.Asset.ancestors: array expected"); - message.ancestors = []; - for (var i = 0; i < object.ancestors.length; ++i) - message.ancestors[i] = String(object.ancestors[i]); - } return message; }; /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. + * Creates a plain object from a GetFeedRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.Asset + * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.Asset} message Asset + * @param {google.cloud.asset.v1p2beta1.GetFeedRequest} message GetFeedRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Asset.toObject = function toObject(message, options) { + GetFeedRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.ancestors = []; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.assetType = ""; - object.resource = null; - object.iamPolicy = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.assetType != null && message.hasOwnProperty("assetType")) - object.assetType = message.assetType; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.asset.v1p2beta1.Resource.toObject(message.resource, options); - if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) - object.iamPolicy = $root.google.iam.v1.Policy.toObject(message.iamPolicy, options); - if (message.ancestors && message.ancestors.length) { - object.ancestors = []; - for (var j = 0; j < message.ancestors.length; ++j) - object.ancestors[j] = message.ancestors[j]; - } return object; }; /** - * Converts this Asset to JSON. + * Converts this GetFeedRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.Asset + * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest * @instance * @returns {Object.} JSON object */ - Asset.prototype.toJSON = function toJSON() { + GetFeedRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Asset; + return GetFeedRequest; })(); - v1p2beta1.Resource = (function() { - - /** - * Properties of a Resource. - * @memberof google.cloud.asset.v1p2beta1 - * @interface IResource - * @property {string|null} [version] Resource version - * @property {string|null} [discoveryDocumentUri] Resource discoveryDocumentUri - * @property {string|null} [discoveryName] Resource discoveryName - * @property {string|null} [resourceUrl] Resource resourceUrl - * @property {string|null} [parent] Resource parent - * @property {google.protobuf.IStruct|null} [data] Resource data - */ - - /** - * Constructs a new Resource. - * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a Resource. - * @implements IResource - * @constructor - * @param {google.cloud.asset.v1p2beta1.IResource=} [properties] Properties to set - */ - function Resource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Resource version. - * @member {string} version - * @memberof google.cloud.asset.v1p2beta1.Resource - * @instance - */ - Resource.prototype.version = ""; - - /** - * Resource discoveryDocumentUri. - * @member {string} discoveryDocumentUri - * @memberof google.cloud.asset.v1p2beta1.Resource - * @instance - */ - Resource.prototype.discoveryDocumentUri = ""; - - /** - * Resource discoveryName. - * @member {string} discoveryName - * @memberof google.cloud.asset.v1p2beta1.Resource - * @instance - */ - Resource.prototype.discoveryName = ""; + v1p2beta1.ListFeedsRequest = (function() { /** - * Resource resourceUrl. - * @member {string} resourceUrl - * @memberof google.cloud.asset.v1p2beta1.Resource - * @instance + * Properties of a ListFeedsRequest. + * @memberof google.cloud.asset.v1p2beta1 + * @interface IListFeedsRequest + * @property {string|null} [parent] ListFeedsRequest parent */ - Resource.prototype.resourceUrl = ""; /** - * Resource parent. - * @member {string} parent - * @memberof google.cloud.asset.v1p2beta1.Resource - * @instance + * Constructs a new ListFeedsRequest. + * @memberof google.cloud.asset.v1p2beta1 + * @classdesc Represents a ListFeedsRequest. + * @implements IListFeedsRequest + * @constructor + * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest=} [properties] Properties to set */ - Resource.prototype.parent = ""; + function ListFeedsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Resource data. - * @member {google.protobuf.IStruct|null|undefined} data - * @memberof google.cloud.asset.v1p2beta1.Resource + * ListFeedsRequest parent. + * @member {string} parent + * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest * @instance */ - Resource.prototype.data = null; + ListFeedsRequest.prototype.parent = ""; /** - * Creates a new Resource instance using the specified properties. + * Creates a new ListFeedsRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.Resource + * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest * @static - * @param {google.cloud.asset.v1p2beta1.IResource=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.Resource} Resource instance + * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.ListFeedsRequest} ListFeedsRequest instance */ - Resource.create = function create(properties) { - return new Resource(properties); + ListFeedsRequest.create = function create(properties) { + return new ListFeedsRequest(properties); }; /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1p2beta1.Resource.verify|verify} messages. + * Encodes the specified ListFeedsRequest message. Does not implicitly {@link google.cloud.asset.v1p2beta1.ListFeedsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.Resource + * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest * @static - * @param {google.cloud.asset.v1p2beta1.IResource} message Resource message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest} message ListFeedsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Resource.encode = function encode(message, writer) { + ListFeedsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && message.hasOwnProperty("version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.discoveryDocumentUri); - if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.discoveryName); - if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUrl); if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); - if (message.data != null && message.hasOwnProperty("data")) - $root.google.protobuf.Struct.encode(message.data, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); return writer; }; /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.Resource.verify|verify} messages. + * Encodes the specified ListFeedsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.ListFeedsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.Resource + * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest * @static - * @param {google.cloud.asset.v1p2beta1.IResource} message Resource message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest} message ListFeedsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Resource.encodeDelimited = function encodeDelimited(message, writer) { + ListFeedsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Resource message from the specified reader or buffer. + * Decodes a ListFeedsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.Resource + * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.Resource} Resource + * @returns {google.cloud.asset.v1p2beta1.ListFeedsRequest} ListFeedsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Resource.decode = function decode(reader, length) { + ListFeedsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.Resource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.ListFeedsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.version = reader.string(); - break; - case 2: - message.discoveryDocumentUri = reader.string(); - break; - case 3: - message.discoveryName = reader.string(); - break; - case 4: - message.resourceUrl = reader.string(); - break; - case 5: message.parent = reader.string(); break; - case 6: - message.data = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -11505,355 +11294,316 @@ }; /** - * Decodes a Resource message from the specified reader or buffer, length delimited. + * Decodes a ListFeedsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.Resource + * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.Resource} Resource + * @returns {google.cloud.asset.v1p2beta1.ListFeedsRequest} ListFeedsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Resource.decodeDelimited = function decodeDelimited(reader) { + ListFeedsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Resource message. + * Verifies a ListFeedsRequest message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.Resource + * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Resource.verify = function verify(message) { + ListFeedsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) - if (!$util.isString(message.discoveryDocumentUri)) - return "discoveryDocumentUri: string expected"; - if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) - if (!$util.isString(message.discoveryName)) - return "discoveryName: string expected"; - if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) - if (!$util.isString(message.resourceUrl)) - return "resourceUrl: string expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.data != null && message.hasOwnProperty("data")) { - var error = $root.google.protobuf.Struct.verify(message.data); - if (error) - return "data." + error; - } return null; }; /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * Creates a ListFeedsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.Resource + * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.Resource} Resource + * @returns {google.cloud.asset.v1p2beta1.ListFeedsRequest} ListFeedsRequest */ - Resource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.Resource) + ListFeedsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.ListFeedsRequest) return object; - var message = new $root.google.cloud.asset.v1p2beta1.Resource(); - if (object.version != null) - message.version = String(object.version); - if (object.discoveryDocumentUri != null) - message.discoveryDocumentUri = String(object.discoveryDocumentUri); - if (object.discoveryName != null) - message.discoveryName = String(object.discoveryName); - if (object.resourceUrl != null) - message.resourceUrl = String(object.resourceUrl); + var message = new $root.google.cloud.asset.v1p2beta1.ListFeedsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.data != null) { - if (typeof object.data !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.Resource.data: object expected"); - message.data = $root.google.protobuf.Struct.fromObject(object.data); - } return message; }; /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. + * Creates a plain object from a ListFeedsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.Resource + * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest * @static - * @param {google.cloud.asset.v1p2beta1.Resource} message Resource + * @param {google.cloud.asset.v1p2beta1.ListFeedsRequest} message ListFeedsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Resource.toObject = function toObject(message, options) { + ListFeedsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.version = ""; - object.discoveryDocumentUri = ""; - object.discoveryName = ""; - object.resourceUrl = ""; + if (options.defaults) object.parent = ""; - object.data = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) - object.discoveryDocumentUri = message.discoveryDocumentUri; - if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) - object.discoveryName = message.discoveryName; - if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) - object.resourceUrl = message.resourceUrl; if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.data != null && message.hasOwnProperty("data")) - object.data = $root.google.protobuf.Struct.toObject(message.data, options); return object; }; /** - * Converts this Resource to JSON. + * Converts this ListFeedsRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.Resource + * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest * @instance * @returns {Object.} JSON object */ - Resource.prototype.toJSON = function toJSON() { + ListFeedsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Resource; - })(); - - v1p2beta1.AssetService = (function() { - - /** - * Constructs a new AssetService service. - * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents an AssetService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function AssetService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (AssetService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AssetService; - - /** - * Creates new AssetService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {AssetService} RPC service. Useful where requests and/or responses are streamed. - */ - AssetService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.asset.v1p2beta1.AssetService#createFeed}. - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @typedef CreateFeedCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1p2beta1.Feed} [response] Feed - */ - - /** - * Calls CreateFeed. - * @function createFeed - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest} request CreateFeedRequest message or plain object - * @param {google.cloud.asset.v1p2beta1.AssetService.CreateFeedCallback} callback Node-style callback called with the error, if any, and Feed - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AssetService.prototype.createFeed = function createFeed(request, callback) { - return this.rpcCall(createFeed, $root.google.cloud.asset.v1p2beta1.CreateFeedRequest, $root.google.cloud.asset.v1p2beta1.Feed, request, callback); - }, "name", { value: "CreateFeed" }); - - /** - * Calls CreateFeed. - * @function createFeed - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest} request CreateFeedRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + }; + + return ListFeedsRequest; + })(); + + v1p2beta1.ListFeedsResponse = (function() { /** - * Callback as used by {@link google.cloud.asset.v1p2beta1.AssetService#getFeed}. - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @typedef GetFeedCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1p2beta1.Feed} [response] Feed + * Properties of a ListFeedsResponse. + * @memberof google.cloud.asset.v1p2beta1 + * @interface IListFeedsResponse + * @property {Array.|null} [feeds] ListFeedsResponse feeds */ /** - * Calls GetFeed. - * @function getFeed - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest} request GetFeedRequest message or plain object - * @param {google.cloud.asset.v1p2beta1.AssetService.GetFeedCallback} callback Node-style callback called with the error, if any, and Feed - * @returns {undefined} - * @variation 1 + * Constructs a new ListFeedsResponse. + * @memberof google.cloud.asset.v1p2beta1 + * @classdesc Represents a ListFeedsResponse. + * @implements IListFeedsResponse + * @constructor + * @param {google.cloud.asset.v1p2beta1.IListFeedsResponse=} [properties] Properties to set */ - Object.defineProperty(AssetService.prototype.getFeed = function getFeed(request, callback) { - return this.rpcCall(getFeed, $root.google.cloud.asset.v1p2beta1.GetFeedRequest, $root.google.cloud.asset.v1p2beta1.Feed, request, callback); - }, "name", { value: "GetFeed" }); + function ListFeedsResponse(properties) { + this.feeds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetFeed. - * @function getFeed - * @memberof google.cloud.asset.v1p2beta1.AssetService + * ListFeedsResponse feeds. + * @member {Array.} feeds + * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse * @instance - * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest} request GetFeedRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListFeedsResponse.prototype.feeds = $util.emptyArray; /** - * Callback as used by {@link google.cloud.asset.v1p2beta1.AssetService#listFeeds}. - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @typedef ListFeedsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1p2beta1.ListFeedsResponse} [response] ListFeedsResponse + * Creates a new ListFeedsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @static + * @param {google.cloud.asset.v1p2beta1.IListFeedsResponse=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.ListFeedsResponse} ListFeedsResponse instance */ + ListFeedsResponse.create = function create(properties) { + return new ListFeedsResponse(properties); + }; /** - * Calls ListFeeds. - * @function listFeeds - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest} request ListFeedsRequest message or plain object - * @param {google.cloud.asset.v1p2beta1.AssetService.ListFeedsCallback} callback Node-style callback called with the error, if any, and ListFeedsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified ListFeedsResponse message. Does not implicitly {@link google.cloud.asset.v1p2beta1.ListFeedsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @static + * @param {google.cloud.asset.v1p2beta1.IListFeedsResponse} message ListFeedsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AssetService.prototype.listFeeds = function listFeeds(request, callback) { - return this.rpcCall(listFeeds, $root.google.cloud.asset.v1p2beta1.ListFeedsRequest, $root.google.cloud.asset.v1p2beta1.ListFeedsResponse, request, callback); - }, "name", { value: "ListFeeds" }); + ListFeedsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.feeds != null && message.feeds.length) + for (var i = 0; i < message.feeds.length; ++i) + $root.google.cloud.asset.v1p2beta1.Feed.encode(message.feeds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Calls ListFeeds. - * @function listFeeds - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest} request ListFeedsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListFeedsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.ListFeedsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @static + * @param {google.cloud.asset.v1p2beta1.IListFeedsResponse} message ListFeedsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListFeedsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.asset.v1p2beta1.AssetService#updateFeed}. - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @typedef UpdateFeedCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.asset.v1p2beta1.Feed} [response] Feed + * Decodes a ListFeedsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.asset.v1p2beta1.ListFeedsResponse} ListFeedsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListFeedsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.ListFeedsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.feeds && message.feeds.length)) + message.feeds = []; + message.feeds.push($root.google.cloud.asset.v1p2beta1.Feed.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdateFeed. - * @function updateFeed - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest} request UpdateFeedRequest message or plain object - * @param {google.cloud.asset.v1p2beta1.AssetService.UpdateFeedCallback} callback Node-style callback called with the error, if any, and Feed - * @returns {undefined} - * @variation 1 + * Decodes a ListFeedsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.asset.v1p2beta1.ListFeedsResponse} ListFeedsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(AssetService.prototype.updateFeed = function updateFeed(request, callback) { - return this.rpcCall(updateFeed, $root.google.cloud.asset.v1p2beta1.UpdateFeedRequest, $root.google.cloud.asset.v1p2beta1.Feed, request, callback); - }, "name", { value: "UpdateFeed" }); + ListFeedsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateFeed. - * @function updateFeed - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest} request UpdateFeedRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListFeedsResponse message. + * @function verify + * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListFeedsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.feeds != null && message.hasOwnProperty("feeds")) { + if (!Array.isArray(message.feeds)) + return "feeds: array expected"; + for (var i = 0; i < message.feeds.length; ++i) { + var error = $root.google.cloud.asset.v1p2beta1.Feed.verify(message.feeds[i]); + if (error) + return "feeds." + error; + } + } + return null; + }; /** - * Callback as used by {@link google.cloud.asset.v1p2beta1.AssetService#deleteFeed}. - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @typedef DeleteFeedCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a ListFeedsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.asset.v1p2beta1.ListFeedsResponse} ListFeedsResponse */ + ListFeedsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.ListFeedsResponse) + return object; + var message = new $root.google.cloud.asset.v1p2beta1.ListFeedsResponse(); + if (object.feeds) { + if (!Array.isArray(object.feeds)) + throw TypeError(".google.cloud.asset.v1p2beta1.ListFeedsResponse.feeds: array expected"); + message.feeds = []; + for (var i = 0; i < object.feeds.length; ++i) { + if (typeof object.feeds[i] !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.ListFeedsResponse.feeds: object expected"); + message.feeds[i] = $root.google.cloud.asset.v1p2beta1.Feed.fromObject(object.feeds[i]); + } + } + return message; + }; /** - * Calls DeleteFeed. - * @function deleteFeed - * @memberof google.cloud.asset.v1p2beta1.AssetService - * @instance - * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest} request DeleteFeedRequest message or plain object - * @param {google.cloud.asset.v1p2beta1.AssetService.DeleteFeedCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListFeedsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @static + * @param {google.cloud.asset.v1p2beta1.ListFeedsResponse} message ListFeedsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(AssetService.prototype.deleteFeed = function deleteFeed(request, callback) { - return this.rpcCall(deleteFeed, $root.google.cloud.asset.v1p2beta1.DeleteFeedRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteFeed" }); + ListFeedsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.feeds = []; + if (message.feeds && message.feeds.length) { + object.feeds = []; + for (var j = 0; j < message.feeds.length; ++j) + object.feeds[j] = $root.google.cloud.asset.v1p2beta1.Feed.toObject(message.feeds[j], options); + } + return object; + }; - /** - * Calls DeleteFeed. - * @function deleteFeed - * @memberof google.cloud.asset.v1p2beta1.AssetService + /** + * Converts this ListFeedsResponse to JSON. + * @function toJSON + * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse * @instance - * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest} request DeleteFeedRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListFeedsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return AssetService; + return ListFeedsResponse; })(); - v1p2beta1.CreateFeedRequest = (function() { + v1p2beta1.UpdateFeedRequest = (function() { /** - * Properties of a CreateFeedRequest. + * Properties of an UpdateFeedRequest. * @memberof google.cloud.asset.v1p2beta1 - * @interface ICreateFeedRequest - * @property {string|null} [parent] CreateFeedRequest parent - * @property {string|null} [feedId] CreateFeedRequest feedId - * @property {google.cloud.asset.v1p2beta1.IFeed|null} [feed] CreateFeedRequest feed + * @interface IUpdateFeedRequest + * @property {google.cloud.asset.v1p2beta1.IFeed|null} [feed] UpdateFeedRequest feed + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFeedRequest updateMask */ /** - * Constructs a new CreateFeedRequest. + * Constructs a new UpdateFeedRequest. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a CreateFeedRequest. - * @implements ICreateFeedRequest + * @classdesc Represents an UpdateFeedRequest. + * @implements IUpdateFeedRequest * @constructor - * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest=} [properties] Properties to set */ - function CreateFeedRequest(properties) { + function UpdateFeedRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11861,101 +11611,88 @@ } /** - * CreateFeedRequest parent. - * @member {string} parent - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest - * @instance - */ - CreateFeedRequest.prototype.parent = ""; - - /** - * CreateFeedRequest feedId. - * @member {string} feedId - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * UpdateFeedRequest feed. + * @member {google.cloud.asset.v1p2beta1.IFeed|null|undefined} feed + * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest * @instance */ - CreateFeedRequest.prototype.feedId = ""; + UpdateFeedRequest.prototype.feed = null; /** - * CreateFeedRequest feed. - * @member {google.cloud.asset.v1p2beta1.IFeed|null|undefined} feed - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * UpdateFeedRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest * @instance */ - CreateFeedRequest.prototype.feed = null; + UpdateFeedRequest.prototype.updateMask = null; /** - * Creates a new CreateFeedRequest instance using the specified properties. + * Creates a new UpdateFeedRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.CreateFeedRequest} CreateFeedRequest instance + * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.UpdateFeedRequest} UpdateFeedRequest instance */ - CreateFeedRequest.create = function create(properties) { - return new CreateFeedRequest(properties); + UpdateFeedRequest.create = function create(properties) { + return new UpdateFeedRequest(properties); }; /** - * Encodes the specified CreateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1p2beta1.CreateFeedRequest.verify|verify} messages. + * Encodes the specified UpdateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1p2beta1.UpdateFeedRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest} message CreateFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest} message UpdateFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFeedRequest.encode = function encode(message, writer) { + UpdateFeedRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.feedId != null && message.hasOwnProperty("feedId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.feedId); if (message.feed != null && message.hasOwnProperty("feed")) - $root.google.cloud.asset.v1p2beta1.Feed.encode(message.feed, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.asset.v1p2beta1.Feed.encode(message.feed, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.CreateFeedRequest.verify|verify} messages. + * Encodes the specified UpdateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.UpdateFeedRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.ICreateFeedRequest} message CreateFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest} message UpdateFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateFeedRequest message from the specified reader or buffer. + * Decodes an UpdateFeedRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.CreateFeedRequest} CreateFeedRequest + * @returns {google.cloud.asset.v1p2beta1.UpdateFeedRequest} UpdateFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFeedRequest.decode = function decode(reader, length) { + UpdateFeedRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.CreateFeedRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.UpdateFeedRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.feed = $root.google.cloud.asset.v1p2beta1.Feed.decode(reader, reader.uint32()); break; case 2: - message.feedId = reader.string(); - break; - case 3: - message.feed = $root.google.cloud.asset.v1p2beta1.Feed.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -11966,129 +11703,126 @@ }; /** - * Decodes a CreateFeedRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateFeedRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.CreateFeedRequest} CreateFeedRequest + * @returns {google.cloud.asset.v1p2beta1.UpdateFeedRequest} UpdateFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFeedRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateFeedRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateFeedRequest message. + * Verifies an UpdateFeedRequest message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateFeedRequest.verify = function verify(message) { + UpdateFeedRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.feedId != null && message.hasOwnProperty("feedId")) - if (!$util.isString(message.feedId)) - return "feedId: string expected"; if (message.feed != null && message.hasOwnProperty("feed")) { var error = $root.google.cloud.asset.v1p2beta1.Feed.verify(message.feed); if (error) return "feed." + error; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a CreateFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFeedRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.CreateFeedRequest} CreateFeedRequest + * @returns {google.cloud.asset.v1p2beta1.UpdateFeedRequest} UpdateFeedRequest */ - CreateFeedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.CreateFeedRequest) + UpdateFeedRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.UpdateFeedRequest) return object; - var message = new $root.google.cloud.asset.v1p2beta1.CreateFeedRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.feedId != null) - message.feedId = String(object.feedId); + var message = new $root.google.cloud.asset.v1p2beta1.UpdateFeedRequest(); if (object.feed != null) { if (typeof object.feed !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.CreateFeedRequest.feed: object expected"); + throw TypeError(".google.cloud.asset.v1p2beta1.UpdateFeedRequest.feed: object expected"); message.feed = $root.google.cloud.asset.v1p2beta1.Feed.fromObject(object.feed); } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.UpdateFeedRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a CreateFeedRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateFeedRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.CreateFeedRequest} message CreateFeedRequest + * @param {google.cloud.asset.v1p2beta1.UpdateFeedRequest} message UpdateFeedRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateFeedRequest.toObject = function toObject(message, options) { + UpdateFeedRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.feedId = ""; object.feed = null; + object.updateMask = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.feedId != null && message.hasOwnProperty("feedId")) - object.feedId = message.feedId; if (message.feed != null && message.hasOwnProperty("feed")) object.feed = $root.google.cloud.asset.v1p2beta1.Feed.toObject(message.feed, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this CreateFeedRequest to JSON. + * Converts this UpdateFeedRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.CreateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest * @instance * @returns {Object.} JSON object */ - CreateFeedRequest.prototype.toJSON = function toJSON() { + UpdateFeedRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateFeedRequest; + return UpdateFeedRequest; })(); - v1p2beta1.GetFeedRequest = (function() { + v1p2beta1.DeleteFeedRequest = (function() { /** - * Properties of a GetFeedRequest. + * Properties of a DeleteFeedRequest. * @memberof google.cloud.asset.v1p2beta1 - * @interface IGetFeedRequest - * @property {string|null} [name] GetFeedRequest name + * @interface IDeleteFeedRequest + * @property {string|null} [name] DeleteFeedRequest name */ /** - * Constructs a new GetFeedRequest. + * Constructs a new DeleteFeedRequest. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a GetFeedRequest. - * @implements IGetFeedRequest + * @classdesc Represents a DeleteFeedRequest. + * @implements IDeleteFeedRequest * @constructor - * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest=} [properties] Properties to set */ - function GetFeedRequest(properties) { + function DeleteFeedRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12096,35 +11830,35 @@ } /** - * GetFeedRequest name. + * DeleteFeedRequest name. * @member {string} name - * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest + * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest * @instance */ - GetFeedRequest.prototype.name = ""; + DeleteFeedRequest.prototype.name = ""; /** - * Creates a new GetFeedRequest instance using the specified properties. + * Creates a new DeleteFeedRequest instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest + * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.GetFeedRequest} GetFeedRequest instance + * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.DeleteFeedRequest} DeleteFeedRequest instance */ - GetFeedRequest.create = function create(properties) { - return new GetFeedRequest(properties); + DeleteFeedRequest.create = function create(properties) { + return new DeleteFeedRequest(properties); }; /** - * Encodes the specified GetFeedRequest message. Does not implicitly {@link google.cloud.asset.v1p2beta1.GetFeedRequest.verify|verify} messages. + * Encodes the specified DeleteFeedRequest message. Does not implicitly {@link google.cloud.asset.v1p2beta1.DeleteFeedRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest + * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest} message GetFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest} message DeleteFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFeedRequest.encode = function encode(message, writer) { + DeleteFeedRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) @@ -12133,33 +11867,33 @@ }; /** - * Encodes the specified GetFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.GetFeedRequest.verify|verify} messages. + * Encodes the specified DeleteFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.DeleteFeedRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest + * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.IGetFeedRequest} message GetFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest} message DeleteFeedRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFeedRequest message from the specified reader or buffer. + * Decodes a DeleteFeedRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest + * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.GetFeedRequest} GetFeedRequest + * @returns {google.cloud.asset.v1p2beta1.DeleteFeedRequest} DeleteFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFeedRequest.decode = function decode(reader, length) { + DeleteFeedRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.GetFeedRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.DeleteFeedRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -12175,30 +11909,30 @@ }; /** - * Decodes a GetFeedRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFeedRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest + * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.GetFeedRequest} GetFeedRequest + * @returns {google.cloud.asset.v1p2beta1.DeleteFeedRequest} DeleteFeedRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFeedRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteFeedRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFeedRequest message. + * Verifies a DeleteFeedRequest message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest + * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFeedRequest.verify = function verify(message) { + DeleteFeedRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -12208,32 +11942,32 @@ }; /** - * Creates a GetFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFeedRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest + * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.GetFeedRequest} GetFeedRequest + * @returns {google.cloud.asset.v1p2beta1.DeleteFeedRequest} DeleteFeedRequest */ - GetFeedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.GetFeedRequest) + DeleteFeedRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.DeleteFeedRequest) return object; - var message = new $root.google.cloud.asset.v1p2beta1.GetFeedRequest(); + var message = new $root.google.cloud.asset.v1p2beta1.DeleteFeedRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetFeedRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteFeedRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest + * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest * @static - * @param {google.cloud.asset.v1p2beta1.GetFeedRequest} message GetFeedRequest + * @param {google.cloud.asset.v1p2beta1.DeleteFeedRequest} message DeleteFeedRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFeedRequest.toObject = function toObject(message, options) { + DeleteFeedRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -12245,37 +11979,37 @@ }; /** - * Converts this GetFeedRequest to JSON. + * Converts this DeleteFeedRequest to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.GetFeedRequest + * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest * @instance * @returns {Object.} JSON object */ - GetFeedRequest.prototype.toJSON = function toJSON() { + DeleteFeedRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetFeedRequest; + return DeleteFeedRequest; })(); - v1p2beta1.ListFeedsRequest = (function() { + v1p2beta1.OutputConfig = (function() { /** - * Properties of a ListFeedsRequest. + * Properties of an OutputConfig. * @memberof google.cloud.asset.v1p2beta1 - * @interface IListFeedsRequest - * @property {string|null} [parent] ListFeedsRequest parent + * @interface IOutputConfig + * @property {google.cloud.asset.v1p2beta1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination */ /** - * Constructs a new ListFeedsRequest. + * Constructs a new OutputConfig. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a ListFeedsRequest. - * @implements IListFeedsRequest + * @classdesc Represents an OutputConfig. + * @implements IOutputConfig * @constructor - * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.IOutputConfig=} [properties] Properties to set */ - function ListFeedsRequest(properties) { + function OutputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12283,75 +12017,89 @@ } /** - * ListFeedsRequest parent. - * @member {string} parent - * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest + * OutputConfig gcsDestination. + * @member {google.cloud.asset.v1p2beta1.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.asset.v1p2beta1.OutputConfig * @instance */ - ListFeedsRequest.prototype.parent = ""; + OutputConfig.prototype.gcsDestination = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new ListFeedsRequest instance using the specified properties. + * OutputConfig destination. + * @member {"gcsDestination"|undefined} destination + * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * @instance + */ + Object.defineProperty(OutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OutputConfig instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest + * @memberof google.cloud.asset.v1p2beta1.OutputConfig * @static - * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.ListFeedsRequest} ListFeedsRequest instance + * @param {google.cloud.asset.v1p2beta1.IOutputConfig=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.OutputConfig} OutputConfig instance */ - ListFeedsRequest.create = function create(properties) { - return new ListFeedsRequest(properties); + OutputConfig.create = function create(properties) { + return new OutputConfig(properties); }; /** - * Encodes the specified ListFeedsRequest message. Does not implicitly {@link google.cloud.asset.v1p2beta1.ListFeedsRequest.verify|verify} messages. + * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.asset.v1p2beta1.OutputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest + * @memberof google.cloud.asset.v1p2beta1.OutputConfig * @static - * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest} message ListFeedsRequest message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IOutputConfig} message OutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeedsRequest.encode = function encode(message, writer) { + OutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) + $root.google.cloud.asset.v1p2beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListFeedsRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.ListFeedsRequest.verify|verify} messages. + * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.OutputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest + * @memberof google.cloud.asset.v1p2beta1.OutputConfig * @static - * @param {google.cloud.asset.v1p2beta1.IListFeedsRequest} message ListFeedsRequest message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IOutputConfig} message OutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeedsRequest.encodeDelimited = function encodeDelimited(message, writer) { + OutputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFeedsRequest message from the specified reader or buffer. + * Decodes an OutputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest + * @memberof google.cloud.asset.v1p2beta1.OutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.ListFeedsRequest} ListFeedsRequest + * @returns {google.cloud.asset.v1p2beta1.OutputConfig} OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeedsRequest.decode = function decode(reader, length) { + OutputConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.ListFeedsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.OutputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.gcsDestination = $root.google.cloud.asset.v1p2beta1.GcsDestination.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -12362,108 +12110,117 @@ }; /** - * Decodes a ListFeedsRequest message from the specified reader or buffer, length delimited. + * Decodes an OutputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest + * @memberof google.cloud.asset.v1p2beta1.OutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.ListFeedsRequest} ListFeedsRequest + * @returns {google.cloud.asset.v1p2beta1.OutputConfig} OutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeedsRequest.decodeDelimited = function decodeDelimited(reader) { + OutputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFeedsRequest message. + * Verifies an OutputConfig message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest + * @memberof google.cloud.asset.v1p2beta1.OutputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFeedsRequest.verify = function verify(message) { + OutputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.asset.v1p2beta1.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } + } return null; }; /** - * Creates a ListFeedsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest + * @memberof google.cloud.asset.v1p2beta1.OutputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.ListFeedsRequest} ListFeedsRequest + * @returns {google.cloud.asset.v1p2beta1.OutputConfig} OutputConfig */ - ListFeedsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.ListFeedsRequest) + OutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.OutputConfig) return object; - var message = new $root.google.cloud.asset.v1p2beta1.ListFeedsRequest(); - if (object.parent != null) - message.parent = String(object.parent); + var message = new $root.google.cloud.asset.v1p2beta1.OutputConfig(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.OutputConfig.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.asset.v1p2beta1.GcsDestination.fromObject(object.gcsDestination); + } return message; }; /** - * Creates a plain object from a ListFeedsRequest message. Also converts values to other types if specified. + * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest + * @memberof google.cloud.asset.v1p2beta1.OutputConfig * @static - * @param {google.cloud.asset.v1p2beta1.ListFeedsRequest} message ListFeedsRequest + * @param {google.cloud.asset.v1p2beta1.OutputConfig} message OutputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFeedsRequest.toObject = function toObject(message, options) { + OutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.asset.v1p2beta1.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.destination = "gcsDestination"; + } return object; }; /** - * Converts this ListFeedsRequest to JSON. + * Converts this OutputConfig to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.ListFeedsRequest + * @memberof google.cloud.asset.v1p2beta1.OutputConfig * @instance * @returns {Object.} JSON object */ - ListFeedsRequest.prototype.toJSON = function toJSON() { + OutputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListFeedsRequest; + return OutputConfig; })(); - v1p2beta1.ListFeedsResponse = (function() { + v1p2beta1.GcsDestination = (function() { /** - * Properties of a ListFeedsResponse. + * Properties of a GcsDestination. * @memberof google.cloud.asset.v1p2beta1 - * @interface IListFeedsResponse - * @property {Array.|null} [feeds] ListFeedsResponse feeds + * @interface IGcsDestination + * @property {string|null} [uri] GcsDestination uri */ /** - * Constructs a new ListFeedsResponse. + * Constructs a new GcsDestination. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a ListFeedsResponse. - * @implements IListFeedsResponse + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination * @constructor - * @param {google.cloud.asset.v1p2beta1.IListFeedsResponse=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.IGcsDestination=} [properties] Properties to set */ - function ListFeedsResponse(properties) { - this.feeds = []; + function GcsDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12471,78 +12228,89 @@ } /** - * ListFeedsResponse feeds. - * @member {Array.} feeds - * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * GcsDestination uri. + * @member {string} uri + * @memberof google.cloud.asset.v1p2beta1.GcsDestination * @instance */ - ListFeedsResponse.prototype.feeds = $util.emptyArray; + GcsDestination.prototype.uri = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new ListFeedsResponse instance using the specified properties. + * GcsDestination objectUri. + * @member {"uri"|undefined} objectUri + * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * @instance + */ + Object.defineProperty(GcsDestination.prototype, "objectUri", { + get: $util.oneOfGetter($oneOfFields = ["uri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GcsDestination instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @memberof google.cloud.asset.v1p2beta1.GcsDestination * @static - * @param {google.cloud.asset.v1p2beta1.IListFeedsResponse=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.ListFeedsResponse} ListFeedsResponse instance + * @param {google.cloud.asset.v1p2beta1.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.GcsDestination} GcsDestination instance */ - ListFeedsResponse.create = function create(properties) { - return new ListFeedsResponse(properties); + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); }; /** - * Encodes the specified ListFeedsResponse message. Does not implicitly {@link google.cloud.asset.v1p2beta1.ListFeedsResponse.verify|verify} messages. + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.asset.v1p2beta1.GcsDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @memberof google.cloud.asset.v1p2beta1.GcsDestination * @static - * @param {google.cloud.asset.v1p2beta1.IListFeedsResponse} message ListFeedsResponse message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeedsResponse.encode = function encode(message, writer) { + GcsDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.feeds != null && message.feeds.length) - for (var i = 0; i < message.feeds.length; ++i) - $root.google.cloud.asset.v1p2beta1.Feed.encode(message.feeds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uri != null && message.hasOwnProperty("uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); return writer; }; /** - * Encodes the specified ListFeedsResponse message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.ListFeedsResponse.verify|verify} messages. + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.GcsDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @memberof google.cloud.asset.v1p2beta1.GcsDestination * @static - * @param {google.cloud.asset.v1p2beta1.IListFeedsResponse} message ListFeedsResponse message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeedsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFeedsResponse message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @memberof google.cloud.asset.v1p2beta1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.ListFeedsResponse} ListFeedsResponse + * @returns {google.cloud.asset.v1p2beta1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeedsResponse.decode = function decode(reader, length) { + GcsDestination.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.ListFeedsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.GcsDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.feeds && message.feeds.length)) - message.feeds = []; - message.feeds.push($root.google.cloud.asset.v1p2beta1.Feed.decode(reader, reader.uint32())); + message.uri = reader.string(); break; default: reader.skipType(tag & 7); @@ -12553,125 +12321,111 @@ }; /** - * Decodes a ListFeedsResponse message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @memberof google.cloud.asset.v1p2beta1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.ListFeedsResponse} ListFeedsResponse + * @returns {google.cloud.asset.v1p2beta1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeedsResponse.decodeDelimited = function decodeDelimited(reader) { + GcsDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFeedsResponse message. + * Verifies a GcsDestination message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @memberof google.cloud.asset.v1p2beta1.GcsDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFeedsResponse.verify = function verify(message) { + GcsDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.feeds != null && message.hasOwnProperty("feeds")) { - if (!Array.isArray(message.feeds)) - return "feeds: array expected"; - for (var i = 0; i < message.feeds.length; ++i) { - var error = $root.google.cloud.asset.v1p2beta1.Feed.verify(message.feeds[i]); - if (error) - return "feeds." + error; - } + var properties = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + properties.objectUri = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; } return null; }; /** - * Creates a ListFeedsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @memberof google.cloud.asset.v1p2beta1.GcsDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.ListFeedsResponse} ListFeedsResponse + * @returns {google.cloud.asset.v1p2beta1.GcsDestination} GcsDestination */ - ListFeedsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.ListFeedsResponse) + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.GcsDestination) return object; - var message = new $root.google.cloud.asset.v1p2beta1.ListFeedsResponse(); - if (object.feeds) { - if (!Array.isArray(object.feeds)) - throw TypeError(".google.cloud.asset.v1p2beta1.ListFeedsResponse.feeds: array expected"); - message.feeds = []; - for (var i = 0; i < object.feeds.length; ++i) { - if (typeof object.feeds[i] !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.ListFeedsResponse.feeds: object expected"); - message.feeds[i] = $root.google.cloud.asset.v1p2beta1.Feed.fromObject(object.feeds[i]); - } - } + var message = new $root.google.cloud.asset.v1p2beta1.GcsDestination(); + if (object.uri != null) + message.uri = String(object.uri); return message; }; /** - * Creates a plain object from a ListFeedsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @memberof google.cloud.asset.v1p2beta1.GcsDestination * @static - * @param {google.cloud.asset.v1p2beta1.ListFeedsResponse} message ListFeedsResponse + * @param {google.cloud.asset.v1p2beta1.GcsDestination} message GcsDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFeedsResponse.toObject = function toObject(message, options) { + GcsDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.feeds = []; - if (message.feeds && message.feeds.length) { - object.feeds = []; - for (var j = 0; j < message.feeds.length; ++j) - object.feeds[j] = $root.google.cloud.asset.v1p2beta1.Feed.toObject(message.feeds[j], options); + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.objectUri = "uri"; } return object; }; /** - * Converts this ListFeedsResponse to JSON. + * Converts this GcsDestination to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.ListFeedsResponse + * @memberof google.cloud.asset.v1p2beta1.GcsDestination * @instance * @returns {Object.} JSON object */ - ListFeedsResponse.prototype.toJSON = function toJSON() { + GcsDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListFeedsResponse; + return GcsDestination; })(); - v1p2beta1.UpdateFeedRequest = (function() { + v1p2beta1.PubsubDestination = (function() { /** - * Properties of an UpdateFeedRequest. + * Properties of a PubsubDestination. * @memberof google.cloud.asset.v1p2beta1 - * @interface IUpdateFeedRequest - * @property {google.cloud.asset.v1p2beta1.IFeed|null} [feed] UpdateFeedRequest feed - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFeedRequest updateMask + * @interface IPubsubDestination + * @property {string|null} [topic] PubsubDestination topic */ /** - * Constructs a new UpdateFeedRequest. + * Constructs a new PubsubDestination. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents an UpdateFeedRequest. - * @implements IUpdateFeedRequest + * @classdesc Represents a PubsubDestination. + * @implements IPubsubDestination * @constructor - * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.IPubsubDestination=} [properties] Properties to set */ - function UpdateFeedRequest(properties) { + function PubsubDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12679,88 +12433,75 @@ } /** - * UpdateFeedRequest feed. - * @member {google.cloud.asset.v1p2beta1.IFeed|null|undefined} feed - * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest - * @instance - */ - UpdateFeedRequest.prototype.feed = null; - - /** - * UpdateFeedRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest + * PubsubDestination topic. + * @member {string} topic + * @memberof google.cloud.asset.v1p2beta1.PubsubDestination * @instance */ - UpdateFeedRequest.prototype.updateMask = null; + PubsubDestination.prototype.topic = ""; /** - * Creates a new UpdateFeedRequest instance using the specified properties. + * Creates a new PubsubDestination instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.PubsubDestination * @static - * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.UpdateFeedRequest} UpdateFeedRequest instance + * @param {google.cloud.asset.v1p2beta1.IPubsubDestination=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.PubsubDestination} PubsubDestination instance */ - UpdateFeedRequest.create = function create(properties) { - return new UpdateFeedRequest(properties); + PubsubDestination.create = function create(properties) { + return new PubsubDestination(properties); }; /** - * Encodes the specified UpdateFeedRequest message. Does not implicitly {@link google.cloud.asset.v1p2beta1.UpdateFeedRequest.verify|verify} messages. + * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.asset.v1p2beta1.PubsubDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.PubsubDestination * @static - * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest} message UpdateFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IPubsubDestination} message PubsubDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFeedRequest.encode = function encode(message, writer) { + PubsubDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.feed != null && message.hasOwnProperty("feed")) - $root.google.cloud.asset.v1p2beta1.Feed.encode(message.feed, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.topic != null && message.hasOwnProperty("topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); return writer; }; /** - * Encodes the specified UpdateFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.UpdateFeedRequest.verify|verify} messages. + * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.PubsubDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.PubsubDestination * @static - * @param {google.cloud.asset.v1p2beta1.IUpdateFeedRequest} message UpdateFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IPubsubDestination} message PubsubDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { + PubsubDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateFeedRequest message from the specified reader or buffer. + * Decodes a PubsubDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.PubsubDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.UpdateFeedRequest} UpdateFeedRequest + * @returns {google.cloud.asset.v1p2beta1.PubsubDestination} PubsubDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFeedRequest.decode = function decode(reader, length) { + PubsubDestination.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.UpdateFeedRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.PubsubDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.feed = $root.google.cloud.asset.v1p2beta1.Feed.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.topic = reader.string(); break; default: reader.skipType(tag & 7); @@ -12771,126 +12512,107 @@ }; /** - * Decodes an UpdateFeedRequest message from the specified reader or buffer, length delimited. + * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.PubsubDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.UpdateFeedRequest} UpdateFeedRequest + * @returns {google.cloud.asset.v1p2beta1.PubsubDestination} PubsubDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFeedRequest.decodeDelimited = function decodeDelimited(reader) { + PubsubDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateFeedRequest message. + * Verifies a PubsubDestination message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.PubsubDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateFeedRequest.verify = function verify(message) { + PubsubDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.feed != null && message.hasOwnProperty("feed")) { - var error = $root.google.cloud.asset.v1p2beta1.Feed.verify(message.feed); - if (error) - return "feed." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; return null; }; /** - * Creates an UpdateFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.PubsubDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.UpdateFeedRequest} UpdateFeedRequest + * @returns {google.cloud.asset.v1p2beta1.PubsubDestination} PubsubDestination */ - UpdateFeedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.UpdateFeedRequest) + PubsubDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.PubsubDestination) return object; - var message = new $root.google.cloud.asset.v1p2beta1.UpdateFeedRequest(); - if (object.feed != null) { - if (typeof object.feed !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.UpdateFeedRequest.feed: object expected"); - message.feed = $root.google.cloud.asset.v1p2beta1.Feed.fromObject(object.feed); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.UpdateFeedRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.asset.v1p2beta1.PubsubDestination(); + if (object.topic != null) + message.topic = String(object.topic); return message; }; /** - * Creates a plain object from an UpdateFeedRequest message. Also converts values to other types if specified. + * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.PubsubDestination * @static - * @param {google.cloud.asset.v1p2beta1.UpdateFeedRequest} message UpdateFeedRequest + * @param {google.cloud.asset.v1p2beta1.PubsubDestination} message PubsubDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateFeedRequest.toObject = function toObject(message, options) { + PubsubDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.feed = null; - object.updateMask = null; - } - if (message.feed != null && message.hasOwnProperty("feed")) - object.feed = $root.google.cloud.asset.v1p2beta1.Feed.toObject(message.feed, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.topic = ""; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; return object; }; /** - * Converts this UpdateFeedRequest to JSON. + * Converts this PubsubDestination to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.UpdateFeedRequest + * @memberof google.cloud.asset.v1p2beta1.PubsubDestination * @instance * @returns {Object.} JSON object */ - UpdateFeedRequest.prototype.toJSON = function toJSON() { + PubsubDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateFeedRequest; + return PubsubDestination; })(); - v1p2beta1.DeleteFeedRequest = (function() { + v1p2beta1.FeedOutputConfig = (function() { /** - * Properties of a DeleteFeedRequest. + * Properties of a FeedOutputConfig. * @memberof google.cloud.asset.v1p2beta1 - * @interface IDeleteFeedRequest - * @property {string|null} [name] DeleteFeedRequest name + * @interface IFeedOutputConfig + * @property {google.cloud.asset.v1p2beta1.IPubsubDestination|null} [pubsubDestination] FeedOutputConfig pubsubDestination */ /** - * Constructs a new DeleteFeedRequest. + * Constructs a new FeedOutputConfig. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a DeleteFeedRequest. - * @implements IDeleteFeedRequest + * @classdesc Represents a FeedOutputConfig. + * @implements IFeedOutputConfig * @constructor - * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.IFeedOutputConfig=} [properties] Properties to set */ - function DeleteFeedRequest(properties) { + function FeedOutputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12898,75 +12620,89 @@ } /** - * DeleteFeedRequest name. - * @member {string} name - * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest + * FeedOutputConfig pubsubDestination. + * @member {google.cloud.asset.v1p2beta1.IPubsubDestination|null|undefined} pubsubDestination + * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig * @instance */ - DeleteFeedRequest.prototype.name = ""; + FeedOutputConfig.prototype.pubsubDestination = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new DeleteFeedRequest instance using the specified properties. + * FeedOutputConfig destination. + * @member {"pubsubDestination"|undefined} destination + * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * @instance + */ + Object.defineProperty(FeedOutputConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["pubsubDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FeedOutputConfig instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest + * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig * @static - * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.DeleteFeedRequest} DeleteFeedRequest instance + * @param {google.cloud.asset.v1p2beta1.IFeedOutputConfig=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.FeedOutputConfig} FeedOutputConfig instance */ - DeleteFeedRequest.create = function create(properties) { - return new DeleteFeedRequest(properties); + FeedOutputConfig.create = function create(properties) { + return new FeedOutputConfig(properties); }; /** - * Encodes the specified DeleteFeedRequest message. Does not implicitly {@link google.cloud.asset.v1p2beta1.DeleteFeedRequest.verify|verify} messages. + * Encodes the specified FeedOutputConfig message. Does not implicitly {@link google.cloud.asset.v1p2beta1.FeedOutputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest + * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig * @static - * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest} message DeleteFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IFeedOutputConfig} message FeedOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFeedRequest.encode = function encode(message, writer) { + FeedOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) + $root.google.cloud.asset.v1p2beta1.PubsubDestination.encode(message.pubsubDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteFeedRequest message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.DeleteFeedRequest.verify|verify} messages. + * Encodes the specified FeedOutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.FeedOutputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest + * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig * @static - * @param {google.cloud.asset.v1p2beta1.IDeleteFeedRequest} message DeleteFeedRequest message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IFeedOutputConfig} message FeedOutputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFeedRequest.encodeDelimited = function encodeDelimited(message, writer) { + FeedOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteFeedRequest message from the specified reader or buffer. + * Decodes a FeedOutputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest + * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.DeleteFeedRequest} DeleteFeedRequest + * @returns {google.cloud.asset.v1p2beta1.FeedOutputConfig} FeedOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFeedRequest.decode = function decode(reader, length) { + FeedOutputConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.DeleteFeedRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.FeedOutputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.pubsubDestination = $root.google.cloud.asset.v1p2beta1.PubsubDestination.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -12977,107 +12713,123 @@ }; /** - * Decodes a DeleteFeedRequest message from the specified reader or buffer, length delimited. + * Decodes a FeedOutputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest + * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.DeleteFeedRequest} DeleteFeedRequest + * @returns {google.cloud.asset.v1p2beta1.FeedOutputConfig} FeedOutputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFeedRequest.decodeDelimited = function decodeDelimited(reader) { + FeedOutputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteFeedRequest message. + * Verifies a FeedOutputConfig message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest + * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteFeedRequest.verify = function verify(message) { + FeedOutputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + var properties = {}; + if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.asset.v1p2beta1.PubsubDestination.verify(message.pubsubDestination); + if (error) + return "pubsubDestination." + error; + } + } return null; }; /** - * Creates a DeleteFeedRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FeedOutputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest + * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.DeleteFeedRequest} DeleteFeedRequest + * @returns {google.cloud.asset.v1p2beta1.FeedOutputConfig} FeedOutputConfig */ - DeleteFeedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.DeleteFeedRequest) + FeedOutputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.FeedOutputConfig) return object; - var message = new $root.google.cloud.asset.v1p2beta1.DeleteFeedRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.asset.v1p2beta1.FeedOutputConfig(); + if (object.pubsubDestination != null) { + if (typeof object.pubsubDestination !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.FeedOutputConfig.pubsubDestination: object expected"); + message.pubsubDestination = $root.google.cloud.asset.v1p2beta1.PubsubDestination.fromObject(object.pubsubDestination); + } return message; }; /** - * Creates a plain object from a DeleteFeedRequest message. Also converts values to other types if specified. + * Creates a plain object from a FeedOutputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest + * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig * @static - * @param {google.cloud.asset.v1p2beta1.DeleteFeedRequest} message DeleteFeedRequest + * @param {google.cloud.asset.v1p2beta1.FeedOutputConfig} message FeedOutputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFeedRequest.toObject = function toObject(message, options) { + FeedOutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) { + object.pubsubDestination = $root.google.cloud.asset.v1p2beta1.PubsubDestination.toObject(message.pubsubDestination, options); + if (options.oneofs) + object.destination = "pubsubDestination"; + } return object; }; /** - * Converts this DeleteFeedRequest to JSON. + * Converts this FeedOutputConfig to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.DeleteFeedRequest + * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig * @instance * @returns {Object.} JSON object */ - DeleteFeedRequest.prototype.toJSON = function toJSON() { + FeedOutputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteFeedRequest; + return FeedOutputConfig; })(); - v1p2beta1.OutputConfig = (function() { + v1p2beta1.Feed = (function() { /** - * Properties of an OutputConfig. + * Properties of a Feed. * @memberof google.cloud.asset.v1p2beta1 - * @interface IOutputConfig - * @property {google.cloud.asset.v1p2beta1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination + * @interface IFeed + * @property {string|null} [name] Feed name + * @property {Array.|null} [assetNames] Feed assetNames + * @property {Array.|null} [assetTypes] Feed assetTypes + * @property {google.cloud.asset.v1p2beta1.ContentType|null} [contentType] Feed contentType + * @property {google.cloud.asset.v1p2beta1.IFeedOutputConfig|null} [feedOutputConfig] Feed feedOutputConfig */ /** - * Constructs a new OutputConfig. + * Constructs a new Feed. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents an OutputConfig. - * @implements IOutputConfig + * @classdesc Represents a Feed. + * @implements IFeed * @constructor - * @param {google.cloud.asset.v1p2beta1.IOutputConfig=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.IFeed=} [properties] Properties to set */ - function OutputConfig(properties) { + function Feed(properties) { + this.assetNames = []; + this.assetTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13085,89 +12837,133 @@ } /** - * OutputConfig gcsDestination. - * @member {google.cloud.asset.v1p2beta1.IGcsDestination|null|undefined} gcsDestination - * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * Feed name. + * @member {string} name + * @memberof google.cloud.asset.v1p2beta1.Feed * @instance */ - OutputConfig.prototype.gcsDestination = null; + Feed.prototype.name = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Feed assetNames. + * @member {Array.} assetNames + * @memberof google.cloud.asset.v1p2beta1.Feed + * @instance + */ + Feed.prototype.assetNames = $util.emptyArray; /** - * OutputConfig destination. - * @member {"gcsDestination"|undefined} destination - * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * Feed assetTypes. + * @member {Array.} assetTypes + * @memberof google.cloud.asset.v1p2beta1.Feed * @instance */ - Object.defineProperty(OutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), - set: $util.oneOfSetter($oneOfFields) - }); + Feed.prototype.assetTypes = $util.emptyArray; /** - * Creates a new OutputConfig instance using the specified properties. + * Feed contentType. + * @member {google.cloud.asset.v1p2beta1.ContentType} contentType + * @memberof google.cloud.asset.v1p2beta1.Feed + * @instance + */ + Feed.prototype.contentType = 0; + + /** + * Feed feedOutputConfig. + * @member {google.cloud.asset.v1p2beta1.IFeedOutputConfig|null|undefined} feedOutputConfig + * @memberof google.cloud.asset.v1p2beta1.Feed + * @instance + */ + Feed.prototype.feedOutputConfig = null; + + /** + * Creates a new Feed instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * @memberof google.cloud.asset.v1p2beta1.Feed * @static - * @param {google.cloud.asset.v1p2beta1.IOutputConfig=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.OutputConfig} OutputConfig instance + * @param {google.cloud.asset.v1p2beta1.IFeed=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.Feed} Feed instance */ - OutputConfig.create = function create(properties) { - return new OutputConfig(properties); + Feed.create = function create(properties) { + return new Feed(properties); }; /** - * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.asset.v1p2beta1.OutputConfig.verify|verify} messages. + * Encodes the specified Feed message. Does not implicitly {@link google.cloud.asset.v1p2beta1.Feed.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * @memberof google.cloud.asset.v1p2beta1.Feed * @static - * @param {google.cloud.asset.v1p2beta1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IFeed} message Feed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputConfig.encode = function encode(message, writer) { + Feed.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) - $root.google.cloud.asset.v1p2beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.assetNames != null && message.assetNames.length) + for (var i = 0; i < message.assetNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetNames[i]); + if (message.assetTypes != null && message.assetTypes.length) + for (var i = 0; i < message.assetTypes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetTypes[i]); + if (message.contentType != null && message.hasOwnProperty("contentType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.contentType); + if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) + $root.google.cloud.asset.v1p2beta1.FeedOutputConfig.encode(message.feedOutputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.OutputConfig.verify|verify} messages. + * Encodes the specified Feed message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.Feed.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * @memberof google.cloud.asset.v1p2beta1.Feed * @static - * @param {google.cloud.asset.v1p2beta1.IOutputConfig} message OutputConfig message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IFeed} message Feed message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + Feed.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OutputConfig message from the specified reader or buffer. + * Decodes a Feed message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * @memberof google.cloud.asset.v1p2beta1.Feed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.OutputConfig} OutputConfig + * @returns {google.cloud.asset.v1p2beta1.Feed} Feed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputConfig.decode = function decode(reader, length) { + Feed.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.OutputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.Feed(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.gcsDestination = $root.google.cloud.asset.v1p2beta1.GcsDestination.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + case 2: + if (!(message.assetNames && message.assetNames.length)) + message.assetNames = []; + message.assetNames.push(reader.string()); + break; + case 3: + if (!(message.assetTypes && message.assetTypes.length)) + message.assetTypes = []; + message.assetTypes.push(reader.string()); + break; + case 4: + message.contentType = reader.int32(); + break; + case 5: + message.feedOutputConfig = $root.google.cloud.asset.v1p2beta1.FeedOutputConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -13178,117 +12974,207 @@ }; /** - * Decodes an OutputConfig message from the specified reader or buffer, length delimited. + * Decodes a Feed message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * @memberof google.cloud.asset.v1p2beta1.Feed * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.OutputConfig} OutputConfig + * @returns {google.cloud.asset.v1p2beta1.Feed} Feed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputConfig.decodeDelimited = function decodeDelimited(reader) { + Feed.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputConfig message. + * Verifies a Feed message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * @memberof google.cloud.asset.v1p2beta1.Feed * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OutputConfig.verify = function verify(message) { + Feed.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - properties.destination = 1; - { - var error = $root.google.cloud.asset.v1p2beta1.GcsDestination.verify(message.gcsDestination); - if (error) - return "gcsDestination." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.assetNames != null && message.hasOwnProperty("assetNames")) { + if (!Array.isArray(message.assetNames)) + return "assetNames: array expected"; + for (var i = 0; i < message.assetNames.length; ++i) + if (!$util.isString(message.assetNames[i])) + return "assetNames: string[] expected"; + } + if (message.assetTypes != null && message.hasOwnProperty("assetTypes")) { + if (!Array.isArray(message.assetTypes)) + return "assetTypes: array expected"; + for (var i = 0; i < message.assetTypes.length; ++i) + if (!$util.isString(message.assetTypes[i])) + return "assetTypes: string[] expected"; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + switch (message.contentType) { + default: + return "contentType: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) { + var error = $root.google.cloud.asset.v1p2beta1.FeedOutputConfig.verify(message.feedOutputConfig); + if (error) + return "feedOutputConfig." + error; } return null; }; /** - * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Feed message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * @memberof google.cloud.asset.v1p2beta1.Feed * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.OutputConfig} OutputConfig + * @returns {google.cloud.asset.v1p2beta1.Feed} Feed */ - OutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.OutputConfig) + Feed.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.Feed) return object; - var message = new $root.google.cloud.asset.v1p2beta1.OutputConfig(); - if (object.gcsDestination != null) { - if (typeof object.gcsDestination !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.OutputConfig.gcsDestination: object expected"); - message.gcsDestination = $root.google.cloud.asset.v1p2beta1.GcsDestination.fromObject(object.gcsDestination); + var message = new $root.google.cloud.asset.v1p2beta1.Feed(); + if (object.name != null) + message.name = String(object.name); + if (object.assetNames) { + if (!Array.isArray(object.assetNames)) + throw TypeError(".google.cloud.asset.v1p2beta1.Feed.assetNames: array expected"); + message.assetNames = []; + for (var i = 0; i < object.assetNames.length; ++i) + message.assetNames[i] = String(object.assetNames[i]); + } + if (object.assetTypes) { + if (!Array.isArray(object.assetTypes)) + throw TypeError(".google.cloud.asset.v1p2beta1.Feed.assetTypes: array expected"); + message.assetTypes = []; + for (var i = 0; i < object.assetTypes.length; ++i) + message.assetTypes[i] = String(object.assetTypes[i]); + } + switch (object.contentType) { + case "CONTENT_TYPE_UNSPECIFIED": + case 0: + message.contentType = 0; + break; + case "RESOURCE": + case 1: + message.contentType = 1; + break; + case "IAM_POLICY": + case 2: + message.contentType = 2; + break; + } + if (object.feedOutputConfig != null) { + if (typeof object.feedOutputConfig !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.Feed.feedOutputConfig: object expected"); + message.feedOutputConfig = $root.google.cloud.asset.v1p2beta1.FeedOutputConfig.fromObject(object.feedOutputConfig); } return message; }; /** - * Creates a plain object from an OutputConfig message. Also converts values to other types if specified. + * Creates a plain object from a Feed message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * @memberof google.cloud.asset.v1p2beta1.Feed * @static - * @param {google.cloud.asset.v1p2beta1.OutputConfig} message OutputConfig + * @param {google.cloud.asset.v1p2beta1.Feed} message Feed * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputConfig.toObject = function toObject(message, options) { + Feed.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { - object.gcsDestination = $root.google.cloud.asset.v1p2beta1.GcsDestination.toObject(message.gcsDestination, options); - if (options.oneofs) - object.destination = "gcsDestination"; + if (options.arrays || options.defaults) { + object.assetNames = []; + object.assetTypes = []; + } + if (options.defaults) { + object.name = ""; + object.contentType = options.enums === String ? "CONTENT_TYPE_UNSPECIFIED" : 0; + object.feedOutputConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.assetNames && message.assetNames.length) { + object.assetNames = []; + for (var j = 0; j < message.assetNames.length; ++j) + object.assetNames[j] = message.assetNames[j]; + } + if (message.assetTypes && message.assetTypes.length) { + object.assetTypes = []; + for (var j = 0; j < message.assetTypes.length; ++j) + object.assetTypes[j] = message.assetTypes[j]; } + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = options.enums === String ? $root.google.cloud.asset.v1p2beta1.ContentType[message.contentType] : message.contentType; + if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) + object.feedOutputConfig = $root.google.cloud.asset.v1p2beta1.FeedOutputConfig.toObject(message.feedOutputConfig, options); return object; }; /** - * Converts this OutputConfig to JSON. + * Converts this Feed to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.OutputConfig + * @memberof google.cloud.asset.v1p2beta1.Feed * @instance * @returns {Object.} JSON object */ - OutputConfig.prototype.toJSON = function toJSON() { + Feed.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OutputConfig; + return Feed; })(); - v1p2beta1.GcsDestination = (function() { + /** + * ContentType enum. + * @name google.cloud.asset.v1p2beta1.ContentType + * @enum {string} + * @property {number} CONTENT_TYPE_UNSPECIFIED=0 CONTENT_TYPE_UNSPECIFIED value + * @property {number} RESOURCE=1 RESOURCE value + * @property {number} IAM_POLICY=2 IAM_POLICY value + */ + v1p2beta1.ContentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RESOURCE"] = 1; + values[valuesById[2] = "IAM_POLICY"] = 2; + return values; + })(); + + v1p2beta1.TemporalAsset = (function() { /** - * Properties of a GcsDestination. + * Properties of a TemporalAsset. * @memberof google.cloud.asset.v1p2beta1 - * @interface IGcsDestination - * @property {string|null} [uri] GcsDestination uri + * @interface ITemporalAsset + * @property {google.cloud.asset.v1p2beta1.ITimeWindow|null} [window] TemporalAsset window + * @property {boolean|null} [deleted] TemporalAsset deleted + * @property {google.cloud.asset.v1p2beta1.IAsset|null} [asset] TemporalAsset asset */ /** - * Constructs a new GcsDestination. + * Constructs a new TemporalAsset. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a GcsDestination. - * @implements IGcsDestination + * @classdesc Represents a TemporalAsset. + * @implements ITemporalAsset * @constructor - * @param {google.cloud.asset.v1p2beta1.IGcsDestination=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.ITemporalAsset=} [properties] Properties to set */ - function GcsDestination(properties) { + function TemporalAsset(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13296,89 +13182,101 @@ } /** - * GcsDestination uri. - * @member {string} uri - * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * TemporalAsset window. + * @member {google.cloud.asset.v1p2beta1.ITimeWindow|null|undefined} window + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset * @instance */ - GcsDestination.prototype.uri = ""; + TemporalAsset.prototype.window = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * TemporalAsset deleted. + * @member {boolean} deleted + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset + * @instance + */ + TemporalAsset.prototype.deleted = false; /** - * GcsDestination objectUri. - * @member {"uri"|undefined} objectUri - * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * TemporalAsset asset. + * @member {google.cloud.asset.v1p2beta1.IAsset|null|undefined} asset + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset * @instance */ - Object.defineProperty(GcsDestination.prototype, "objectUri", { - get: $util.oneOfGetter($oneOfFields = ["uri"]), - set: $util.oneOfSetter($oneOfFields) - }); + TemporalAsset.prototype.asset = null; /** - * Creates a new GcsDestination instance using the specified properties. + * Creates a new TemporalAsset instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset * @static - * @param {google.cloud.asset.v1p2beta1.IGcsDestination=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.GcsDestination} GcsDestination instance + * @param {google.cloud.asset.v1p2beta1.ITemporalAsset=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.TemporalAsset} TemporalAsset instance */ - GcsDestination.create = function create(properties) { - return new GcsDestination(properties); + TemporalAsset.create = function create(properties) { + return new TemporalAsset(properties); }; /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.asset.v1p2beta1.GcsDestination.verify|verify} messages. + * Encodes the specified TemporalAsset message. Does not implicitly {@link google.cloud.asset.v1p2beta1.TemporalAsset.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset * @static - * @param {google.cloud.asset.v1p2beta1.IGcsDestination} message GcsDestination message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.ITemporalAsset} message TemporalAsset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsDestination.encode = function encode(message, writer) { + TemporalAsset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.uri != null && message.hasOwnProperty("uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.window != null && message.hasOwnProperty("window")) + $root.google.cloud.asset.v1p2beta1.TimeWindow.encode(message.window, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deleted != null && message.hasOwnProperty("deleted")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.deleted); + if (message.asset != null && message.hasOwnProperty("asset")) + $root.google.cloud.asset.v1p2beta1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.GcsDestination.verify|verify} messages. + * Encodes the specified TemporalAsset message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.TemporalAsset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset * @static - * @param {google.cloud.asset.v1p2beta1.IGcsDestination} message GcsDestination message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.ITemporalAsset} message TemporalAsset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { + TemporalAsset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsDestination message from the specified reader or buffer. + * Decodes a TemporalAsset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.GcsDestination} GcsDestination + * @returns {google.cloud.asset.v1p2beta1.TemporalAsset} TemporalAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsDestination.decode = function decode(reader, length) { + TemporalAsset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.GcsDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.TemporalAsset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.uri = reader.string(); + message.window = $root.google.cloud.asset.v1p2beta1.TimeWindow.decode(reader, reader.uint32()); + break; + case 2: + message.deleted = reader.bool(); + break; + case 3: + message.asset = $root.google.cloud.asset.v1p2beta1.Asset.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -13389,111 +13287,135 @@ }; /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * Decodes a TemporalAsset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.GcsDestination} GcsDestination + * @returns {google.cloud.asset.v1p2beta1.TemporalAsset} TemporalAsset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsDestination.decodeDelimited = function decodeDelimited(reader) { + TemporalAsset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsDestination message. + * Verifies a TemporalAsset message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsDestination.verify = function verify(message) { + TemporalAsset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.uri != null && message.hasOwnProperty("uri")) { - properties.objectUri = 1; - if (!$util.isString(message.uri)) - return "uri: string expected"; + if (message.window != null && message.hasOwnProperty("window")) { + var error = $root.google.cloud.asset.v1p2beta1.TimeWindow.verify(message.window); + if (error) + return "window." + error; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.asset.v1p2beta1.Asset.verify(message.asset); + if (error) + return "asset." + error; } return null; }; /** - * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * Creates a TemporalAsset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.GcsDestination} GcsDestination + * @returns {google.cloud.asset.v1p2beta1.TemporalAsset} TemporalAsset */ - GcsDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.GcsDestination) + TemporalAsset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.TemporalAsset) return object; - var message = new $root.google.cloud.asset.v1p2beta1.GcsDestination(); - if (object.uri != null) - message.uri = String(object.uri); + var message = new $root.google.cloud.asset.v1p2beta1.TemporalAsset(); + if (object.window != null) { + if (typeof object.window !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.TemporalAsset.window: object expected"); + message.window = $root.google.cloud.asset.v1p2beta1.TimeWindow.fromObject(object.window); + } + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.TemporalAsset.asset: object expected"); + message.asset = $root.google.cloud.asset.v1p2beta1.Asset.fromObject(object.asset); + } return message; }; /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * Creates a plain object from a TemporalAsset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset * @static - * @param {google.cloud.asset.v1p2beta1.GcsDestination} message GcsDestination + * @param {google.cloud.asset.v1p2beta1.TemporalAsset} message TemporalAsset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsDestination.toObject = function toObject(message, options) { + TemporalAsset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.uri != null && message.hasOwnProperty("uri")) { - object.uri = message.uri; - if (options.oneofs) - object.objectUri = "uri"; + if (options.defaults) { + object.window = null; + object.deleted = false; + object.asset = null; } + if (message.window != null && message.hasOwnProperty("window")) + object.window = $root.google.cloud.asset.v1p2beta1.TimeWindow.toObject(message.window, options); + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.asset.v1p2beta1.Asset.toObject(message.asset, options); return object; }; /** - * Converts this GcsDestination to JSON. + * Converts this TemporalAsset to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.GcsDestination + * @memberof google.cloud.asset.v1p2beta1.TemporalAsset * @instance * @returns {Object.} JSON object */ - GcsDestination.prototype.toJSON = function toJSON() { + TemporalAsset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GcsDestination; + return TemporalAsset; })(); - v1p2beta1.PubsubDestination = (function() { + v1p2beta1.TimeWindow = (function() { /** - * Properties of a PubsubDestination. + * Properties of a TimeWindow. * @memberof google.cloud.asset.v1p2beta1 - * @interface IPubsubDestination - * @property {string|null} [topic] PubsubDestination topic + * @interface ITimeWindow + * @property {google.protobuf.ITimestamp|null} [startTime] TimeWindow startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TimeWindow endTime */ /** - * Constructs a new PubsubDestination. + * Constructs a new TimeWindow. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a PubsubDestination. - * @implements IPubsubDestination + * @classdesc Represents a TimeWindow. + * @implements ITimeWindow * @constructor - * @param {google.cloud.asset.v1p2beta1.IPubsubDestination=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.ITimeWindow=} [properties] Properties to set */ - function PubsubDestination(properties) { + function TimeWindow(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13501,75 +13423,88 @@ } /** - * PubsubDestination topic. - * @member {string} topic - * @memberof google.cloud.asset.v1p2beta1.PubsubDestination + * TimeWindow startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.asset.v1p2beta1.TimeWindow * @instance */ - PubsubDestination.prototype.topic = ""; + TimeWindow.prototype.startTime = null; /** - * Creates a new PubsubDestination instance using the specified properties. + * TimeWindow endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.asset.v1p2beta1.TimeWindow + * @instance + */ + TimeWindow.prototype.endTime = null; + + /** + * Creates a new TimeWindow instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.PubsubDestination + * @memberof google.cloud.asset.v1p2beta1.TimeWindow * @static - * @param {google.cloud.asset.v1p2beta1.IPubsubDestination=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.PubsubDestination} PubsubDestination instance + * @param {google.cloud.asset.v1p2beta1.ITimeWindow=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.TimeWindow} TimeWindow instance */ - PubsubDestination.create = function create(properties) { - return new PubsubDestination(properties); + TimeWindow.create = function create(properties) { + return new TimeWindow(properties); }; /** - * Encodes the specified PubsubDestination message. Does not implicitly {@link google.cloud.asset.v1p2beta1.PubsubDestination.verify|verify} messages. + * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.asset.v1p2beta1.TimeWindow.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.PubsubDestination + * @memberof google.cloud.asset.v1p2beta1.TimeWindow * @static - * @param {google.cloud.asset.v1p2beta1.IPubsubDestination} message PubsubDestination message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.ITimeWindow} message TimeWindow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PubsubDestination.encode = function encode(message, writer) { + TimeWindow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.topic != null && message.hasOwnProperty("topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified PubsubDestination message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.PubsubDestination.verify|verify} messages. + * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.TimeWindow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.PubsubDestination + * @memberof google.cloud.asset.v1p2beta1.TimeWindow * @static - * @param {google.cloud.asset.v1p2beta1.IPubsubDestination} message PubsubDestination message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.ITimeWindow} message TimeWindow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PubsubDestination.encodeDelimited = function encodeDelimited(message, writer) { + TimeWindow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PubsubDestination message from the specified reader or buffer. + * Decodes a TimeWindow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.PubsubDestination + * @memberof google.cloud.asset.v1p2beta1.TimeWindow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.PubsubDestination} PubsubDestination + * @returns {google.cloud.asset.v1p2beta1.TimeWindow} TimeWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PubsubDestination.decode = function decode(reader, length) { + TimeWindow.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.PubsubDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.TimeWindow(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.topic = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -13580,107 +13515,131 @@ }; /** - * Decodes a PubsubDestination message from the specified reader or buffer, length delimited. + * Decodes a TimeWindow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.PubsubDestination + * @memberof google.cloud.asset.v1p2beta1.TimeWindow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.PubsubDestination} PubsubDestination + * @returns {google.cloud.asset.v1p2beta1.TimeWindow} TimeWindow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PubsubDestination.decodeDelimited = function decodeDelimited(reader) { + TimeWindow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PubsubDestination message. + * Verifies a TimeWindow message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.PubsubDestination + * @memberof google.cloud.asset.v1p2beta1.TimeWindow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PubsubDestination.verify = function verify(message) { + TimeWindow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.topic != null && message.hasOwnProperty("topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } return null; }; /** - * Creates a PubsubDestination message from a plain object. Also converts values to their respective internal types. + * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.PubsubDestination + * @memberof google.cloud.asset.v1p2beta1.TimeWindow * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.PubsubDestination} PubsubDestination + * @returns {google.cloud.asset.v1p2beta1.TimeWindow} TimeWindow */ - PubsubDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.PubsubDestination) - return object; - var message = new $root.google.cloud.asset.v1p2beta1.PubsubDestination(); - if (object.topic != null) - message.topic = String(object.topic); + TimeWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.TimeWindow) + return object; + var message = new $root.google.cloud.asset.v1p2beta1.TimeWindow(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.TimeWindow.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.TimeWindow.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } return message; }; /** - * Creates a plain object from a PubsubDestination message. Also converts values to other types if specified. + * Creates a plain object from a TimeWindow message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.PubsubDestination + * @memberof google.cloud.asset.v1p2beta1.TimeWindow * @static - * @param {google.cloud.asset.v1p2beta1.PubsubDestination} message PubsubDestination + * @param {google.cloud.asset.v1p2beta1.TimeWindow} message TimeWindow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PubsubDestination.toObject = function toObject(message, options) { + TimeWindow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.topic = ""; - if (message.topic != null && message.hasOwnProperty("topic")) - object.topic = message.topic; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); return object; }; /** - * Converts this PubsubDestination to JSON. + * Converts this TimeWindow to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.PubsubDestination + * @memberof google.cloud.asset.v1p2beta1.TimeWindow * @instance * @returns {Object.} JSON object */ - PubsubDestination.prototype.toJSON = function toJSON() { + TimeWindow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PubsubDestination; + return TimeWindow; })(); - v1p2beta1.FeedOutputConfig = (function() { + v1p2beta1.Asset = (function() { /** - * Properties of a FeedOutputConfig. + * Properties of an Asset. * @memberof google.cloud.asset.v1p2beta1 - * @interface IFeedOutputConfig - * @property {google.cloud.asset.v1p2beta1.IPubsubDestination|null} [pubsubDestination] FeedOutputConfig pubsubDestination + * @interface IAsset + * @property {string|null} [name] Asset name + * @property {string|null} [assetType] Asset assetType + * @property {google.cloud.asset.v1p2beta1.IResource|null} [resource] Asset resource + * @property {google.iam.v1.IPolicy|null} [iamPolicy] Asset iamPolicy + * @property {Array.|null} [ancestors] Asset ancestors */ /** - * Constructs a new FeedOutputConfig. + * Constructs a new Asset. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a FeedOutputConfig. - * @implements IFeedOutputConfig + * @classdesc Represents an Asset. + * @implements IAsset * @constructor - * @param {google.cloud.asset.v1p2beta1.IFeedOutputConfig=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.IAsset=} [properties] Properties to set */ - function FeedOutputConfig(properties) { + function Asset(properties) { + this.ancestors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13688,89 +13647,130 @@ } /** - * FeedOutputConfig pubsubDestination. - * @member {google.cloud.asset.v1p2beta1.IPubsubDestination|null|undefined} pubsubDestination - * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * Asset name. + * @member {string} name + * @memberof google.cloud.asset.v1p2beta1.Asset * @instance */ - FeedOutputConfig.prototype.pubsubDestination = null; + Asset.prototype.name = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Asset assetType. + * @member {string} assetType + * @memberof google.cloud.asset.v1p2beta1.Asset + * @instance + */ + Asset.prototype.assetType = ""; /** - * FeedOutputConfig destination. - * @member {"pubsubDestination"|undefined} destination - * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * Asset resource. + * @member {google.cloud.asset.v1p2beta1.IResource|null|undefined} resource + * @memberof google.cloud.asset.v1p2beta1.Asset * @instance */ - Object.defineProperty(FeedOutputConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["pubsubDestination"]), - set: $util.oneOfSetter($oneOfFields) - }); + Asset.prototype.resource = null; /** - * Creates a new FeedOutputConfig instance using the specified properties. + * Asset iamPolicy. + * @member {google.iam.v1.IPolicy|null|undefined} iamPolicy + * @memberof google.cloud.asset.v1p2beta1.Asset + * @instance + */ + Asset.prototype.iamPolicy = null; + + /** + * Asset ancestors. + * @member {Array.} ancestors + * @memberof google.cloud.asset.v1p2beta1.Asset + * @instance + */ + Asset.prototype.ancestors = $util.emptyArray; + + /** + * Creates a new Asset instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * @memberof google.cloud.asset.v1p2beta1.Asset * @static - * @param {google.cloud.asset.v1p2beta1.IFeedOutputConfig=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.FeedOutputConfig} FeedOutputConfig instance + * @param {google.cloud.asset.v1p2beta1.IAsset=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.Asset} Asset instance */ - FeedOutputConfig.create = function create(properties) { - return new FeedOutputConfig(properties); + Asset.create = function create(properties) { + return new Asset(properties); }; /** - * Encodes the specified FeedOutputConfig message. Does not implicitly {@link google.cloud.asset.v1p2beta1.FeedOutputConfig.verify|verify} messages. + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.asset.v1p2beta1.Asset.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * @memberof google.cloud.asset.v1p2beta1.Asset * @static - * @param {google.cloud.asset.v1p2beta1.IFeedOutputConfig} message FeedOutputConfig message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeedOutputConfig.encode = function encode(message, writer) { + Asset.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) - $root.google.cloud.asset.v1p2beta1.PubsubDestination.encode(message.pubsubDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.assetType != null && message.hasOwnProperty("assetType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetType); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.google.cloud.asset.v1p2beta1.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) + $root.google.iam.v1.Policy.encode(message.iamPolicy, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.ancestors != null && message.ancestors.length) + for (var i = 0; i < message.ancestors.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.ancestors[i]); return writer; }; /** - * Encodes the specified FeedOutputConfig message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.FeedOutputConfig.verify|verify} messages. + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.Asset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * @memberof google.cloud.asset.v1p2beta1.Asset * @static - * @param {google.cloud.asset.v1p2beta1.IFeedOutputConfig} message FeedOutputConfig message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IAsset} message Asset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeedOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { + Asset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeedOutputConfig message from the specified reader or buffer. + * Decodes an Asset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * @memberof google.cloud.asset.v1p2beta1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.FeedOutputConfig} FeedOutputConfig + * @returns {google.cloud.asset.v1p2beta1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeedOutputConfig.decode = function decode(reader, length) { + Asset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.FeedOutputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.Asset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.pubsubDestination = $root.google.cloud.asset.v1p2beta1.PubsubDestination.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + case 2: + message.assetType = reader.string(); + break; + case 3: + message.resource = $root.google.cloud.asset.v1p2beta1.Resource.decode(reader, reader.uint32()); + break; + case 4: + message.iamPolicy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + case 6: + if (!(message.ancestors && message.ancestors.length)) + message.ancestors = []; + message.ancestors.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -13781,123 +13781,168 @@ }; /** - * Decodes a FeedOutputConfig message from the specified reader or buffer, length delimited. + * Decodes an Asset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * @memberof google.cloud.asset.v1p2beta1.Asset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.FeedOutputConfig} FeedOutputConfig + * @returns {google.cloud.asset.v1p2beta1.Asset} Asset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeedOutputConfig.decodeDelimited = function decodeDelimited(reader) { + Asset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FeedOutputConfig message. + * Verifies an Asset message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * @memberof google.cloud.asset.v1p2beta1.Asset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FeedOutputConfig.verify = function verify(message) { + Asset.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) { - properties.destination = 1; - { - var error = $root.google.cloud.asset.v1p2beta1.PubsubDestination.verify(message.pubsubDestination); - if (error) - return "pubsubDestination." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.assetType != null && message.hasOwnProperty("assetType")) + if (!$util.isString(message.assetType)) + return "assetType: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.asset.v1p2beta1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) { + var error = $root.google.iam.v1.Policy.verify(message.iamPolicy); + if (error) + return "iamPolicy." + error; + } + if (message.ancestors != null && message.hasOwnProperty("ancestors")) { + if (!Array.isArray(message.ancestors)) + return "ancestors: array expected"; + for (var i = 0; i < message.ancestors.length; ++i) + if (!$util.isString(message.ancestors[i])) + return "ancestors: string[] expected"; } return null; }; /** - * Creates a FeedOutputConfig message from a plain object. Also converts values to their respective internal types. + * Creates an Asset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * @memberof google.cloud.asset.v1p2beta1.Asset * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.FeedOutputConfig} FeedOutputConfig + * @returns {google.cloud.asset.v1p2beta1.Asset} Asset */ - FeedOutputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.FeedOutputConfig) + Asset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.Asset) return object; - var message = new $root.google.cloud.asset.v1p2beta1.FeedOutputConfig(); - if (object.pubsubDestination != null) { - if (typeof object.pubsubDestination !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.FeedOutputConfig.pubsubDestination: object expected"); - message.pubsubDestination = $root.google.cloud.asset.v1p2beta1.PubsubDestination.fromObject(object.pubsubDestination); + var message = new $root.google.cloud.asset.v1p2beta1.Asset(); + if (object.name != null) + message.name = String(object.name); + if (object.assetType != null) + message.assetType = String(object.assetType); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.Asset.resource: object expected"); + message.resource = $root.google.cloud.asset.v1p2beta1.Resource.fromObject(object.resource); + } + if (object.iamPolicy != null) { + if (typeof object.iamPolicy !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.Asset.iamPolicy: object expected"); + message.iamPolicy = $root.google.iam.v1.Policy.fromObject(object.iamPolicy); + } + if (object.ancestors) { + if (!Array.isArray(object.ancestors)) + throw TypeError(".google.cloud.asset.v1p2beta1.Asset.ancestors: array expected"); + message.ancestors = []; + for (var i = 0; i < object.ancestors.length; ++i) + message.ancestors[i] = String(object.ancestors[i]); } return message; }; /** - * Creates a plain object from a FeedOutputConfig message. Also converts values to other types if specified. + * Creates a plain object from an Asset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * @memberof google.cloud.asset.v1p2beta1.Asset * @static - * @param {google.cloud.asset.v1p2beta1.FeedOutputConfig} message FeedOutputConfig + * @param {google.cloud.asset.v1p2beta1.Asset} message Asset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeedOutputConfig.toObject = function toObject(message, options) { + Asset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.pubsubDestination != null && message.hasOwnProperty("pubsubDestination")) { - object.pubsubDestination = $root.google.cloud.asset.v1p2beta1.PubsubDestination.toObject(message.pubsubDestination, options); - if (options.oneofs) - object.destination = "pubsubDestination"; + if (options.arrays || options.defaults) + object.ancestors = []; + if (options.defaults) { + object.name = ""; + object.assetType = ""; + object.resource = null; + object.iamPolicy = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.assetType != null && message.hasOwnProperty("assetType")) + object.assetType = message.assetType; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.asset.v1p2beta1.Resource.toObject(message.resource, options); + if (message.iamPolicy != null && message.hasOwnProperty("iamPolicy")) + object.iamPolicy = $root.google.iam.v1.Policy.toObject(message.iamPolicy, options); + if (message.ancestors && message.ancestors.length) { + object.ancestors = []; + for (var j = 0; j < message.ancestors.length; ++j) + object.ancestors[j] = message.ancestors[j]; } return object; }; /** - * Converts this FeedOutputConfig to JSON. + * Converts this Asset to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.FeedOutputConfig + * @memberof google.cloud.asset.v1p2beta1.Asset * @instance * @returns {Object.} JSON object */ - FeedOutputConfig.prototype.toJSON = function toJSON() { + Asset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FeedOutputConfig; + return Asset; })(); - v1p2beta1.Feed = (function() { + v1p2beta1.Resource = (function() { /** - * Properties of a Feed. + * Properties of a Resource. * @memberof google.cloud.asset.v1p2beta1 - * @interface IFeed - * @property {string|null} [name] Feed name - * @property {Array.|null} [assetNames] Feed assetNames - * @property {Array.|null} [assetTypes] Feed assetTypes - * @property {google.cloud.asset.v1p2beta1.ContentType|null} [contentType] Feed contentType - * @property {google.cloud.asset.v1p2beta1.IFeedOutputConfig|null} [feedOutputConfig] Feed feedOutputConfig + * @interface IResource + * @property {string|null} [version] Resource version + * @property {string|null} [discoveryDocumentUri] Resource discoveryDocumentUri + * @property {string|null} [discoveryName] Resource discoveryName + * @property {string|null} [resourceUrl] Resource resourceUrl + * @property {string|null} [parent] Resource parent + * @property {google.protobuf.IStruct|null} [data] Resource data */ /** - * Constructs a new Feed. + * Constructs a new Resource. * @memberof google.cloud.asset.v1p2beta1 - * @classdesc Represents a Feed. - * @implements IFeed + * @classdesc Represents a Resource. + * @implements IResource * @constructor - * @param {google.cloud.asset.v1p2beta1.IFeed=} [properties] Properties to set + * @param {google.cloud.asset.v1p2beta1.IResource=} [properties] Properties to set */ - function Feed(properties) { - this.assetNames = []; - this.assetTypes = []; + function Resource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13905,133 +13950,140 @@ } /** - * Feed name. - * @member {string} name - * @memberof google.cloud.asset.v1p2beta1.Feed + * Resource version. + * @member {string} version + * @memberof google.cloud.asset.v1p2beta1.Resource * @instance */ - Feed.prototype.name = ""; + Resource.prototype.version = ""; /** - * Feed assetNames. - * @member {Array.} assetNames - * @memberof google.cloud.asset.v1p2beta1.Feed + * Resource discoveryDocumentUri. + * @member {string} discoveryDocumentUri + * @memberof google.cloud.asset.v1p2beta1.Resource * @instance */ - Feed.prototype.assetNames = $util.emptyArray; + Resource.prototype.discoveryDocumentUri = ""; /** - * Feed assetTypes. - * @member {Array.} assetTypes - * @memberof google.cloud.asset.v1p2beta1.Feed + * Resource discoveryName. + * @member {string} discoveryName + * @memberof google.cloud.asset.v1p2beta1.Resource * @instance */ - Feed.prototype.assetTypes = $util.emptyArray; + Resource.prototype.discoveryName = ""; /** - * Feed contentType. - * @member {google.cloud.asset.v1p2beta1.ContentType} contentType - * @memberof google.cloud.asset.v1p2beta1.Feed + * Resource resourceUrl. + * @member {string} resourceUrl + * @memberof google.cloud.asset.v1p2beta1.Resource * @instance */ - Feed.prototype.contentType = 0; + Resource.prototype.resourceUrl = ""; /** - * Feed feedOutputConfig. - * @member {google.cloud.asset.v1p2beta1.IFeedOutputConfig|null|undefined} feedOutputConfig - * @memberof google.cloud.asset.v1p2beta1.Feed + * Resource parent. + * @member {string} parent + * @memberof google.cloud.asset.v1p2beta1.Resource * @instance */ - Feed.prototype.feedOutputConfig = null; + Resource.prototype.parent = ""; /** - * Creates a new Feed instance using the specified properties. + * Resource data. + * @member {google.protobuf.IStruct|null|undefined} data + * @memberof google.cloud.asset.v1p2beta1.Resource + * @instance + */ + Resource.prototype.data = null; + + /** + * Creates a new Resource instance using the specified properties. * @function create - * @memberof google.cloud.asset.v1p2beta1.Feed + * @memberof google.cloud.asset.v1p2beta1.Resource * @static - * @param {google.cloud.asset.v1p2beta1.IFeed=} [properties] Properties to set - * @returns {google.cloud.asset.v1p2beta1.Feed} Feed instance + * @param {google.cloud.asset.v1p2beta1.IResource=} [properties] Properties to set + * @returns {google.cloud.asset.v1p2beta1.Resource} Resource instance */ - Feed.create = function create(properties) { - return new Feed(properties); + Resource.create = function create(properties) { + return new Resource(properties); }; /** - * Encodes the specified Feed message. Does not implicitly {@link google.cloud.asset.v1p2beta1.Feed.verify|verify} messages. + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.asset.v1p2beta1.Resource.verify|verify} messages. * @function encode - * @memberof google.cloud.asset.v1p2beta1.Feed + * @memberof google.cloud.asset.v1p2beta1.Resource * @static - * @param {google.cloud.asset.v1p2beta1.IFeed} message Feed message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IResource} message Resource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Feed.encode = function encode(message, writer) { + Resource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.assetNames != null && message.assetNames.length) - for (var i = 0; i < message.assetNames.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetNames[i]); - if (message.assetTypes != null && message.assetTypes.length) - for (var i = 0; i < message.assetTypes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.assetTypes[i]); - if (message.contentType != null && message.hasOwnProperty("contentType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.contentType); - if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) - $root.google.cloud.asset.v1p2beta1.FeedOutputConfig.encode(message.feedOutputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.discoveryDocumentUri); + if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.discoveryName); + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUrl); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parent); + if (message.data != null && message.hasOwnProperty("data")) + $root.google.protobuf.Struct.encode(message.data, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Feed message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.Feed.verify|verify} messages. + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.asset.v1p2beta1.Resource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.asset.v1p2beta1.Feed + * @memberof google.cloud.asset.v1p2beta1.Resource * @static - * @param {google.cloud.asset.v1p2beta1.IFeed} message Feed message or plain object to encode + * @param {google.cloud.asset.v1p2beta1.IResource} message Resource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Feed.encodeDelimited = function encodeDelimited(message, writer) { + Resource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Feed message from the specified reader or buffer. + * Decodes a Resource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.asset.v1p2beta1.Feed + * @memberof google.cloud.asset.v1p2beta1.Resource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.asset.v1p2beta1.Feed} Feed + * @returns {google.cloud.asset.v1p2beta1.Resource} Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Feed.decode = function decode(reader, length) { + Resource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.Feed(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.asset.v1p2beta1.Resource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.version = reader.string(); break; case 2: - if (!(message.assetNames && message.assetNames.length)) - message.assetNames = []; - message.assetNames.push(reader.string()); + message.discoveryDocumentUri = reader.string(); break; case 3: - if (!(message.assetTypes && message.assetTypes.length)) - message.assetTypes = []; - message.assetTypes.push(reader.string()); + message.discoveryName = reader.string(); break; case 4: - message.contentType = reader.int32(); + message.resourceUrl = reader.string(); break; case 5: - message.feedOutputConfig = $root.google.cloud.asset.v1p2beta1.FeedOutputConfig.decode(reader, reader.uint32()); + message.parent = reader.string(); + break; + case 6: + message.data = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -14042,185 +14094,133 @@ }; /** - * Decodes a Feed message from the specified reader or buffer, length delimited. + * Decodes a Resource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.asset.v1p2beta1.Feed + * @memberof google.cloud.asset.v1p2beta1.Resource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.asset.v1p2beta1.Feed} Feed + * @returns {google.cloud.asset.v1p2beta1.Resource} Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Feed.decodeDelimited = function decodeDelimited(reader) { + Resource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Feed message. + * Verifies a Resource message. * @function verify - * @memberof google.cloud.asset.v1p2beta1.Feed + * @memberof google.cloud.asset.v1p2beta1.Resource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Feed.verify = function verify(message) { + Resource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.assetNames != null && message.hasOwnProperty("assetNames")) { - if (!Array.isArray(message.assetNames)) - return "assetNames: array expected"; - for (var i = 0; i < message.assetNames.length; ++i) - if (!$util.isString(message.assetNames[i])) - return "assetNames: string[] expected"; - } - if (message.assetTypes != null && message.hasOwnProperty("assetTypes")) { - if (!Array.isArray(message.assetTypes)) - return "assetTypes: array expected"; - for (var i = 0; i < message.assetTypes.length; ++i) - if (!$util.isString(message.assetTypes[i])) - return "assetTypes: string[] expected"; - } - if (message.contentType != null && message.hasOwnProperty("contentType")) - switch (message.contentType) { - default: - return "contentType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) { - var error = $root.google.cloud.asset.v1p2beta1.FeedOutputConfig.verify(message.feedOutputConfig); + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) + if (!$util.isString(message.discoveryDocumentUri)) + return "discoveryDocumentUri: string expected"; + if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) + if (!$util.isString(message.discoveryName)) + return "discoveryName: string expected"; + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + if (!$util.isString(message.resourceUrl)) + return "resourceUrl: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.data != null && message.hasOwnProperty("data")) { + var error = $root.google.protobuf.Struct.verify(message.data); if (error) - return "feedOutputConfig." + error; + return "data." + error; } return null; }; /** - * Creates a Feed message from a plain object. Also converts values to their respective internal types. + * Creates a Resource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.asset.v1p2beta1.Feed + * @memberof google.cloud.asset.v1p2beta1.Resource * @static * @param {Object.} object Plain object - * @returns {google.cloud.asset.v1p2beta1.Feed} Feed + * @returns {google.cloud.asset.v1p2beta1.Resource} Resource */ - Feed.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.asset.v1p2beta1.Feed) + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.asset.v1p2beta1.Resource) return object; - var message = new $root.google.cloud.asset.v1p2beta1.Feed(); - if (object.name != null) - message.name = String(object.name); - if (object.assetNames) { - if (!Array.isArray(object.assetNames)) - throw TypeError(".google.cloud.asset.v1p2beta1.Feed.assetNames: array expected"); - message.assetNames = []; - for (var i = 0; i < object.assetNames.length; ++i) - message.assetNames[i] = String(object.assetNames[i]); - } - if (object.assetTypes) { - if (!Array.isArray(object.assetTypes)) - throw TypeError(".google.cloud.asset.v1p2beta1.Feed.assetTypes: array expected"); - message.assetTypes = []; - for (var i = 0; i < object.assetTypes.length; ++i) - message.assetTypes[i] = String(object.assetTypes[i]); - } - switch (object.contentType) { - case "CONTENT_TYPE_UNSPECIFIED": - case 0: - message.contentType = 0; - break; - case "RESOURCE": - case 1: - message.contentType = 1; - break; - case "IAM_POLICY": - case 2: - message.contentType = 2; - break; - } - if (object.feedOutputConfig != null) { - if (typeof object.feedOutputConfig !== "object") - throw TypeError(".google.cloud.asset.v1p2beta1.Feed.feedOutputConfig: object expected"); - message.feedOutputConfig = $root.google.cloud.asset.v1p2beta1.FeedOutputConfig.fromObject(object.feedOutputConfig); + var message = new $root.google.cloud.asset.v1p2beta1.Resource(); + if (object.version != null) + message.version = String(object.version); + if (object.discoveryDocumentUri != null) + message.discoveryDocumentUri = String(object.discoveryDocumentUri); + if (object.discoveryName != null) + message.discoveryName = String(object.discoveryName); + if (object.resourceUrl != null) + message.resourceUrl = String(object.resourceUrl); + if (object.parent != null) + message.parent = String(object.parent); + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.asset.v1p2beta1.Resource.data: object expected"); + message.data = $root.google.protobuf.Struct.fromObject(object.data); } return message; }; /** - * Creates a plain object from a Feed message. Also converts values to other types if specified. + * Creates a plain object from a Resource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.asset.v1p2beta1.Feed + * @memberof google.cloud.asset.v1p2beta1.Resource * @static - * @param {google.cloud.asset.v1p2beta1.Feed} message Feed + * @param {google.cloud.asset.v1p2beta1.Resource} message Resource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Feed.toObject = function toObject(message, options) { + Resource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.assetNames = []; - object.assetTypes = []; - } if (options.defaults) { - object.name = ""; - object.contentType = options.enums === String ? "CONTENT_TYPE_UNSPECIFIED" : 0; - object.feedOutputConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.assetNames && message.assetNames.length) { - object.assetNames = []; - for (var j = 0; j < message.assetNames.length; ++j) - object.assetNames[j] = message.assetNames[j]; - } - if (message.assetTypes && message.assetTypes.length) { - object.assetTypes = []; - for (var j = 0; j < message.assetTypes.length; ++j) - object.assetTypes[j] = message.assetTypes[j]; + object.version = ""; + object.discoveryDocumentUri = ""; + object.discoveryName = ""; + object.resourceUrl = ""; + object.parent = ""; + object.data = null; } - if (message.contentType != null && message.hasOwnProperty("contentType")) - object.contentType = options.enums === String ? $root.google.cloud.asset.v1p2beta1.ContentType[message.contentType] : message.contentType; - if (message.feedOutputConfig != null && message.hasOwnProperty("feedOutputConfig")) - object.feedOutputConfig = $root.google.cloud.asset.v1p2beta1.FeedOutputConfig.toObject(message.feedOutputConfig, options); + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.discoveryDocumentUri != null && message.hasOwnProperty("discoveryDocumentUri")) + object.discoveryDocumentUri = message.discoveryDocumentUri; + if (message.discoveryName != null && message.hasOwnProperty("discoveryName")) + object.discoveryName = message.discoveryName; + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + object.resourceUrl = message.resourceUrl; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.data != null && message.hasOwnProperty("data")) + object.data = $root.google.protobuf.Struct.toObject(message.data, options); return object; }; /** - * Converts this Feed to JSON. + * Converts this Resource to JSON. * @function toJSON - * @memberof google.cloud.asset.v1p2beta1.Feed + * @memberof google.cloud.asset.v1p2beta1.Resource * @instance * @returns {Object.} JSON object */ - Feed.prototype.toJSON = function toJSON() { + Resource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Feed; - })(); - - /** - * ContentType enum. - * @name google.cloud.asset.v1p2beta1.ContentType - * @enum {string} - * @property {number} CONTENT_TYPE_UNSPECIFIED=0 CONTENT_TYPE_UNSPECIFIED value - * @property {number} RESOURCE=1 RESOURCE value - * @property {number} IAM_POLICY=2 IAM_POLICY value - */ - v1p2beta1.ContentType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONTENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RESOURCE"] = 1; - values[valuesById[2] = "IAM_POLICY"] = 2; - return values; + return Resource; })(); return v1p2beta1; @@ -14241,30 +14241,26 @@ */ var api = {}; - api.ResourceDescriptor = (function() { + api.Http = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a Http. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14272,143 +14268,91 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - ResourceDescriptor.prototype.plural = ""; + Http.prototype.rules = $util.emptyArray; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - ResourceDescriptor.prototype.singular = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && message.hasOwnProperty("nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && message.hasOwnProperty("history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && message.hasOwnProperty("plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && message.hasOwnProperty("singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -14419,285 +14363,353 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a Http message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.Http} Http */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pattern = []; - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + return Http; + })(); + + api.HttpRule = (function() { + /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {string} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - return ResourceDescriptor; - })(); + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; - api.ResourceReference = (function() { + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance */ + HttpRule.prototype.body = ""; /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + HttpRule.prototype.responseBody = ""; /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule * @instance */ - ResourceReference.prototype.type = ""; + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - ResourceReference.prototype.childType = ""; + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && message.hasOwnProperty("childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.selector != null && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.selector = reader.string(); break; case 2: - message.childType = reader.string(); + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -14708,118 +14720,240 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceReference.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.HttpRule} HttpRule */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return HttpRule; })(); - api.Http = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a Http. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new Http. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14827,91 +14961,88 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - Http.prototype.rules = $util.emptyArray; + CustomHttpPattern.prototype.kind = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new Http instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - Http.create = function create(properties) { - return new Http(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.kind != null && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.kind = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -14922,143 +15053,144 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.Http} message Http + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + if (options.defaults) { + object.kind = ""; + object.path = ""; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this Http to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + return CustomHttpPattern; })(); - api.HttpRule = (function() { + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {string} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { /** - * Properties of a HttpRule. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular */ /** - * Constructs a new HttpRule. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15066,209 +15198,143 @@ } /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = ""; - - /** - * HttpRule put. - * @member {string} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = ""; - - /** - * HttpRule post. - * @member {string} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = ""; - - /** - * HttpRule delete. - * @member {string} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = ""; - - /** - * HttpRule patch. - * @member {string} patch - * @memberof google.api.HttpRule + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.patch = ""; + ResourceDescriptor.prototype.type = ""; /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.custom = null; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.body = ""; + ResourceDescriptor.prototype.nameField = ""; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.responseBody = ""; + ResourceDescriptor.prototype.history = 0; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceDescriptor.prototype.plural = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceDescriptor.prototype.singular = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && message.hasOwnProperty("nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && message.hasOwnProperty("history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && message.hasOwnProperty("plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && message.hasOwnProperty("singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.type = reader.string(); break; case 2: - message.get = reader.string(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); break; case 3: - message.put = reader.string(); + message.nameField = reader.string(); break; case 4: - message.post = reader.string(); + message.history = reader.int32(); break; case 5: - message["delete"] = reader.string(); + message.plural = reader.string(); break; case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.singular = reader.string(); break; default: reader.skipType(tag & 7); @@ -15279,240 +15345,196 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRule.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; } - } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalBindings = []; + object.pattern = []; if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {string} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + return ResourceDescriptor; })(); - api.CustomHttpPattern = (function() { + api.ResourceReference = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a ResourceReference. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new ResourceReference. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15520,88 +15542,88 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - CustomHttpPattern.prototype.kind = ""; + ResourceReference.prototype.type = ""; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - CustomHttpPattern.prototype.path = ""; + ResourceReference.prototype.childType = ""; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && message.hasOwnProperty("childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + ResourceReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + message.type = reader.string(); break; case 2: - message.path = reader.string(); + message.childType = reader.string(); break; default: reader.skipType(tag & 7); @@ -15612,118 +15634,96 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + ResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.type = ""; + object.childType = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {string} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - return values; + return ResourceReference; })(); return api; @@ -20936,8 +20936,8 @@ * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** @@ -21014,20 +21014,20 @@ FieldOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior * @memberof google.protobuf.FieldOptions * @instance */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference * @memberof google.protobuf.FieldOptions * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + FieldOptions.prototype[".google.api.resourceReference"] = null; /** * Creates a new FieldOptions instance using the specified properties. @@ -21133,9 +21133,6 @@ message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; case 1052: if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) message[".google.api.fieldBehavior"] = []; @@ -21146,6 +21143,9 @@ } else message[".google.api.fieldBehavior"].push(reader.int32()); break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -21220,11 +21220,6 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { if (!Array.isArray(message[".google.api.fieldBehavior"])) return ".google.api.fieldBehavior: array expected"; @@ -21241,6 +21236,11 @@ break; } } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } return null; }; @@ -21302,11 +21302,6 @@ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } if (object[".google.api.fieldBehavior"]) { if (!Array.isArray(object[".google.api.fieldBehavior"])) throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); @@ -21340,6 +21335,11 @@ break; } } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } return message; }; diff --git a/packages/google-cloud-asset/protos/protos.json b/packages/google-cloud-asset/protos/protos.json index 4568a83f1ea..c1e58442a51 100644 --- a/packages/google-cloud-asset/protos/protos.json +++ b/packages/google-cloud-asset/protos/protos.json @@ -8,100 +8,15 @@ "nested": { "v1": { "options": { - "cc_enable_arenas": true, "csharp_namespace": "Google.Cloud.Asset.V1", "go_package": "google.golang.org/genproto/googleapis/cloud/asset/v1;asset", "java_multiple_files": true, - "java_outer_classname": "AssetServiceProto", + "java_outer_classname": "AssetProto", "java_package": "com.google.cloud.asset.v1", - "php_namespace": "Google\\Cloud\\Asset\\V1" + "php_namespace": "Google\\Cloud\\Asset\\V1", + "cc_enable_arenas": true }, "nested": { - "TemporalAsset": { - "fields": { - "window": { - "type": "TimeWindow", - "id": 1 - }, - "deleted": { - "type": "bool", - "id": 2 - }, - "asset": { - "type": "Asset", - "id": 3 - } - } - }, - "TimeWindow": { - "fields": { - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - } - } - }, - "Asset": { - "options": { - "(google.api.resource).type": "cloudasset.googleapis.com/Asset", - "(google.api.resource).pattern": "*" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "assetType": { - "type": "string", - "id": 2 - }, - "resource": { - "type": "Resource", - "id": 3 - }, - "iamPolicy": { - "type": "google.iam.v1.Policy", - "id": 4 - }, - "ancestors": { - "rule": "repeated", - "type": "string", - "id": 10 - } - } - }, - "Resource": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "discoveryDocumentUri": { - "type": "string", - "id": 2 - }, - "discoveryName": { - "type": "string", - "id": 3 - }, - "resourceUrl": { - "type": "string", - "id": 4 - }, - "parent": { - "type": "string", - "id": 5 - }, - "data": { - "type": "google.protobuf.Struct", - "id": 6 - } - } - }, "AssetService": { "options": { "(google.api.default_host)": "cloudasset.googleapis.com", @@ -470,20 +385,7 @@ } } } - } - } - }, - "v1beta1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Asset.V1Beta1", - "go_package": "google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset", - "java_multiple_files": true, - "java_outer_classname": "AssetServiceProto", - "java_package": "com.google.cloud.asset.v1beta1", - "php_namespace": "Google\\Cloud\\Asset\\V1beta1" - }, - "nested": { + }, "TemporalAsset": { "fields": { "window": { @@ -533,6 +435,11 @@ "iamPolicy": { "type": "google.iam.v1.Policy", "id": 4 + }, + "ancestors": { + "rule": "repeated", + "type": "string", + "id": 10 } } }, @@ -563,7 +470,20 @@ "id": 6 } } - }, + } + } + }, + "v1beta1": { + "options": { + "csharp_namespace": "Google.Cloud.Asset.V1Beta1", + "go_package": "google.golang.org/genproto/googleapis/cloud/asset/v1beta1;asset", + "java_multiple_files": true, + "java_outer_classname": "AssetProto", + "java_package": "com.google.cloud.asset.v1beta1", + "php_namespace": "Google\\Cloud\\Asset\\V1beta1", + "cc_enable_arenas": true + }, + "nested": { "AssetService": { "options": { "(google.api.default_host)": "cloudasset.googleapis.com", @@ -717,21 +637,40 @@ "RESOURCE": 1, "IAM_POLICY": 2 } - } - } - }, - "v1p1beta1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Asset.V1P1Beta1", - "go_package": "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset", - "java_multiple_files": true, - "java_outer_classname": "AssetServiceProto", - "java_package": "com.google.cloud.asset.v1p1beta1", - "php_namespace": "Google\\Cloud\\Asset\\V1p1beta1" - }, - "nested": { - "StandardResourceMetadata": { + }, + "TemporalAsset": { + "fields": { + "window": { + "type": "TimeWindow", + "id": 1 + }, + "deleted": { + "type": "bool", + "id": 2 + }, + "asset": { + "type": "Asset", + "id": 3 + } + } + }, + "TimeWindow": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "Asset": { + "options": { + "(google.api.resource).type": "cloudasset.googleapis.com/Asset", + "(google.api.resource).pattern": "*" + }, "fields": { "name": { "type": "string", @@ -741,41 +680,57 @@ "type": "string", "id": 2 }, - "project": { - "type": "string", + "resource": { + "type": "Resource", "id": 3 }, - "displayName": { - "type": "string", + "iamPolicy": { + "type": "google.iam.v1.Policy", "id": 4 - }, - "description": { - "type": "string", - "id": 5 - }, - "additionalAttributes": { - "rule": "repeated", - "type": "string", - "id": 10 } } }, - "IamPolicySearchResult": { + "Resource": { "fields": { - "resource": { + "version": { "type": "string", "id": 1 }, - "project": { + "discoveryDocumentUri": { + "type": "string", + "id": 2 + }, + "discoveryName": { "type": "string", "id": 3 }, - "policy": { - "type": "google.iam.v1.Policy", + "resourceUrl": { + "type": "string", "id": 4 + }, + "parent": { + "type": "string", + "id": 5 + }, + "data": { + "type": "google.protobuf.Struct", + "id": 6 } } - }, + } + } + }, + "v1p1beta1": { + "options": { + "csharp_namespace": "Google.Cloud.Asset.V1P1Beta1", + "go_package": "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset", + "java_multiple_files": true, + "java_outer_classname": "AssetProto", + "java_package": "com.google.cloud.asset.v1p1beta1", + "php_namespace": "Google\\Cloud\\Asset\\V1p1beta1", + "cc_enable_arenas": true + }, + "nested": { "AssetService": { "options": { "(google.api.default_host)": "cloudasset.googleapis.com", @@ -1011,49 +966,8 @@ "id": 2 } } - } - } - }, - "v1p2beta1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Asset.V1p2Beta1", - "go_package": "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset", - "java_multiple_files": true, - "java_outer_classname": "AssetServiceProto", - "java_package": "com.google.cloud.asset.v1p2beta1", - "php_namespace": "Google\\Cloud\\Asset\\V1p2Beta1" - }, - "nested": { - "TemporalAsset": { - "fields": { - "window": { - "type": "TimeWindow", - "id": 1 - }, - "deleted": { - "type": "bool", - "id": 2 - }, - "asset": { - "type": "Asset", - "id": 3 - } - } - }, - "TimeWindow": { - "fields": { - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - } - } }, - "Asset": { + "StandardResourceMetadata": { "fields": { "name": { "type": "string", @@ -1063,49 +977,54 @@ "type": "string", "id": 2 }, - "resource": { - "type": "Resource", + "project": { + "type": "string", "id": 3 }, - "iamPolicy": { - "type": "google.iam.v1.Policy", + "displayName": { + "type": "string", "id": 4 }, - "ancestors": { + "description": { + "type": "string", + "id": 5 + }, + "additionalAttributes": { "rule": "repeated", "type": "string", - "id": 6 + "id": 10 } } }, - "Resource": { + "IamPolicySearchResult": { "fields": { - "version": { + "resource": { "type": "string", "id": 1 }, - "discoveryDocumentUri": { - "type": "string", - "id": 2 - }, - "discoveryName": { + "project": { "type": "string", "id": 3 }, - "resourceUrl": { - "type": "string", + "policy": { + "type": "google.iam.v1.Policy", "id": 4 - }, - "parent": { - "type": "string", - "id": 5 - }, - "data": { - "type": "google.protobuf.Struct", - "id": 6 } } - }, + } + } + }, + "v1p2beta1": { + "options": { + "csharp_namespace": "Google.Cloud.Asset.v1p2beta1", + "go_package": "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset", + "java_multiple_files": true, + "java_outer_classname": "AssetProto", + "java_package": "com.google.cloud.asset.v1p2beta1", + "php_namespace": "Google\\Cloud\\Asset\\v1p2beta1", + "cc_enable_arenas": true + }, + "nested": { "AssetService": { "options": { "(google.api.default_host)": "cloudasset.googleapis.com", @@ -1339,6 +1258,87 @@ "RESOURCE": 1, "IAM_POLICY": 2 } + }, + "TemporalAsset": { + "fields": { + "window": { + "type": "TimeWindow", + "id": 1 + }, + "deleted": { + "type": "bool", + "id": 2 + }, + "asset": { + "type": "Asset", + "id": 3 + } + } + }, + "TimeWindow": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "Asset": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "assetType": { + "type": "string", + "id": 2 + }, + "resource": { + "type": "Resource", + "id": 3 + }, + "iamPolicy": { + "type": "google.iam.v1.Policy", + "id": 4 + }, + "ancestors": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "Resource": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "discoveryDocumentUri": { + "type": "string", + "id": 2 + }, + "discoveryName": { + "type": "string", + "id": 3 + }, + "resourceUrl": { + "type": "string", + "id": 4 + }, + "parent": { + "type": "string", + "id": 5 + }, + "data": { + "type": "google.protobuf.Struct", + "id": 6 + } + } } } } @@ -1348,80 +1348,14 @@ }, "api": { "options": { - "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "FieldBehaviorProto", + "java_outer_classname": "ResourceProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI" + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true }, "nested": { - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, "http": { "type": "HttpRule", "id": 72295728, @@ -1540,6 +1474,72 @@ "INPUT_ONLY": 4, "IMMUTABLE": 5 } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } } } }, diff --git a/packages/google-cloud-asset/src/v1/asset_service_client.ts b/packages/google-cloud-asset/src/v1/asset_service_client.ts index 611eaf99c74..663dbbd60b4 100644 --- a/packages/google-cloud-asset/src/v1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1/asset_service_client.ts @@ -141,16 +141,15 @@ export class AssetServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - assetPathTemplate: new gaxModule.PathTemplate('*'), - projectFeedPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/feeds/{feed}' - ), folderFeedPathTemplate: new gaxModule.PathTemplate( 'folders/{folder}/feeds/{feed}' ), organizationFeedPathTemplate: new gaxModule.PathTemplate( 'organizations/{organization}/feeds/{feed}' ), + projectFeedPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/feeds/{feed}' + ), }; // This API contains "long-running operations", which return a @@ -911,53 +910,6 @@ export class AssetServiceClient { // -- Path templates -- // -------------------- - /** - * Return a fully-qualified asset resource name string. - * - * @returns {string} Resource name string. - */ - assetPath() { - return this._pathTemplates.assetPathTemplate.render({}); - } - - /** - * Return a fully-qualified projectFeed resource name string. - * - * @param {string} project - * @param {string} feed - * @returns {string} Resource name string. - */ - projectFeedPath(project: string, feed: string) { - return this._pathTemplates.projectFeedPathTemplate.render({ - project, - feed, - }); - } - - /** - * Parse the project from ProjectFeed resource. - * - * @param {string} projectFeedName - * A fully-qualified path representing project_feed resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectFeedName(projectFeedName: string) { - return this._pathTemplates.projectFeedPathTemplate.match(projectFeedName) - .project; - } - - /** - * Parse the feed from ProjectFeed resource. - * - * @param {string} projectFeedName - * A fully-qualified path representing project_feed resource. - * @returns {string} A string representing the feed. - */ - matchFeedFromProjectFeedName(projectFeedName: string) { - return this._pathTemplates.projectFeedPathTemplate.match(projectFeedName) - .feed; - } - /** * Return a fully-qualified folderFeed resource name string. * @@ -1036,6 +988,44 @@ export class AssetServiceClient { ).feed; } + /** + * Return a fully-qualified projectFeed resource name string. + * + * @param {string} project + * @param {string} feed + * @returns {string} Resource name string. + */ + projectFeedPath(project: string, feed: string) { + return this._pathTemplates.projectFeedPathTemplate.render({ + project, + feed, + }); + } + + /** + * Parse the project from ProjectFeed resource. + * + * @param {string} projectFeedName + * A fully-qualified path representing project_feed resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectFeedName(projectFeedName: string) { + return this._pathTemplates.projectFeedPathTemplate.match(projectFeedName) + .project; + } + + /** + * Parse the feed from ProjectFeed resource. + * + * @param {string} projectFeedName + * A fully-qualified path representing project_feed resource. + * @returns {string} A string representing the feed. + */ + matchFeedFromProjectFeedName(projectFeedName: string) { + return this._pathTemplates.projectFeedPathTemplate.match(projectFeedName) + .feed; + } + /** * Terminate the GRPC channel and close the client. * diff --git a/packages/google-cloud-asset/src/v1/asset_service_proto_list.json b/packages/google-cloud-asset/src/v1/asset_service_proto_list.json index 3f8fd209c29..37185e2cc13 100644 --- a/packages/google-cloud-asset/src/v1/asset_service_proto_list.json +++ b/packages/google-cloud-asset/src/v1/asset_service_proto_list.json @@ -1,4 +1,4 @@ [ - "../../protos/google/cloud/asset/v1/assets.proto", - "../../protos/google/cloud/asset/v1/asset_service.proto" + "../../protos/google/cloud/asset/v1/asset_service.proto", + "../../protos/google/cloud/asset/v1/assets.proto" ] diff --git a/packages/google-cloud-asset/src/v1beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1beta1/asset_service_client.ts index b123bc3bac6..0a8ee82024b 100644 --- a/packages/google-cloud-asset/src/v1beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1beta1/asset_service_client.ts @@ -40,7 +40,6 @@ const version = require('../../../package.json').version; export class AssetServiceClient { private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; auth: gax.GoogleAuth; operationsClient: gax.OperationsClient; @@ -137,13 +136,6 @@ export class AssetServiceClient { opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this._pathTemplates = { - assetPathTemplate: new gaxModule.PathTemplate('*'), - }; - // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. @@ -504,18 +496,6 @@ export class AssetServiceClient { }); return this._innerApiCalls.exportAssets(request, options, callback); } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified asset resource name string. - * - * @returns {string} Resource name string. - */ - assetPath() { - return this._pathTemplates.assetPathTemplate.render({}); - } /** * Terminate the GRPC channel and close the client. diff --git a/packages/google-cloud-asset/src/v1beta1/asset_service_proto_list.json b/packages/google-cloud-asset/src/v1beta1/asset_service_proto_list.json index e843e78ee54..6c8ef83a9be 100644 --- a/packages/google-cloud-asset/src/v1beta1/asset_service_proto_list.json +++ b/packages/google-cloud-asset/src/v1beta1/asset_service_proto_list.json @@ -1,4 +1,4 @@ [ - "../../protos/google/cloud/asset/v1beta1/assets.proto", - "../../protos/google/cloud/asset/v1beta1/asset_service.proto" + "../../protos/google/cloud/asset/v1beta1/asset_service.proto", + "../../protos/google/cloud/asset/v1beta1/assets.proto" ] diff --git a/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts index 01acc772832..95d7889af6c 100644 --- a/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts @@ -315,12 +315,13 @@ export class AssetServiceClient { * Optional. A list of asset types that this request searches for. If empty, it will * search all the supported asset types. * @param {number} [request.pageSize] - * Optional. The page size for search result pagination. Returned results may be fewer - * than requested. The value of this field is capped at 2000. If set to the - * zero value, server will pick an appropriate default. + * Optional. The page size for search result pagination. Page size is capped at 500 even + * if a larger value is given. If set to zero, server will pick an appropriate + * default. Returned results may be fewer than requested. When this happens, + * there could be more results as long as `next_page_token` is returned. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the preceding call - * to this method. `page_token` must be the value of `next_page_token` from + * to this method. `page_token` must be the value of `next_page_token` from * the previous response. The values of all other method parameters, must be * identical to those in the previous call. * @param {object} [options] @@ -401,12 +402,13 @@ export class AssetServiceClient { * Optional. A list of asset types that this request searches for. If empty, it will * search all the supported asset types. * @param {number} [request.pageSize] - * Optional. The page size for search result pagination. Returned results may be fewer - * than requested. The value of this field is capped at 2000. If set to the - * zero value, server will pick an appropriate default. + * Optional. The page size for search result pagination. Page size is capped at 500 even + * if a larger value is given. If set to zero, server will pick an appropriate + * default. Returned results may be fewer than requested. When this happens, + * there could be more results as long as `next_page_token` is returned. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the preceding call - * to this method. `page_token` must be the value of `next_page_token` from + * to this method. `page_token` must be the value of `next_page_token` from * the previous response. The values of all other method parameters, must be * identical to those in the previous call. * @param {object} [options] @@ -416,9 +418,10 @@ export class AssetServiceClient { */ searchResourcesStream( request?: protosTypes.google.cloud.asset.v1p1beta1.ISearchResourcesRequest, - options?: gax.CallOptions | {} + options?: gax.CallOptions ): Transform { request = request || {}; + options = options || {}; const callSettings = new gax.CallSettings(options); return this._descriptors.page.searchResources.createStream( this._innerApiCalls.searchResources as gax.GaxCall, @@ -462,9 +465,10 @@ export class AssetServiceClient { * * "policy:myuser@mydomain.com" * * "policy:(myuser@mydomain.com viewer)" * @param {number} [request.pageSize] - * Optional. The page size for search result pagination. Returned results may be fewer - * than requested. The maximum is 2000. If set to the zero value, the server - * will pick an appropriate default. + * Optional. The page size for search result pagination. Page size is capped at 500 even + * if a larger value is given. If set to zero, server will pick an appropriate + * default. Returned results may be fewer than requested. When this happens, + * there could be more results as long as `next_page_token` is returned. * @param {string} [request.pageToken] * Optional. If present, retrieve the next batch of results from the preceding call to * this method. `page_token` must be the value of `next_page_token` from the @@ -548,9 +552,10 @@ export class AssetServiceClient { * * "policy:myuser@mydomain.com" * * "policy:(myuser@mydomain.com viewer)" * @param {number} [request.pageSize] - * Optional. The page size for search result pagination. Returned results may be fewer - * than requested. The maximum is 2000. If set to the zero value, the server - * will pick an appropriate default. + * Optional. The page size for search result pagination. Page size is capped at 500 even + * if a larger value is given. If set to zero, server will pick an appropriate + * default. Returned results may be fewer than requested. When this happens, + * there could be more results as long as `next_page_token` is returned. * @param {string} [request.pageToken] * Optional. If present, retrieve the next batch of results from the preceding call to * this method. `page_token` must be the value of `next_page_token` from the @@ -563,9 +568,10 @@ export class AssetServiceClient { */ searchIamPoliciesStream( request?: protosTypes.google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest, - options?: gax.CallOptions | {} + options?: gax.CallOptions ): Transform { request = request || {}; + options = options || {}; const callSettings = new gax.CallSettings(options); return this._descriptors.page.searchIamPolicies.createStream( this._innerApiCalls.searchIamPolicies as gax.GaxCall, @@ -614,9 +620,10 @@ export class AssetServiceClient { * Optional. A list of asset types that this request searches for. If empty, it will * search all the supported asset types. * @param {number} [request.pageSize] - * Optional. The page size for search result pagination. Returned results may be fewer - * than requested. The value of this field is capped at 2000. If set to the - * zero value, server will pick an appropriate default. + * Optional. The page size for search result pagination. Page size is capped at 500 even + * if a larger value is given. If set to zero, server will pick an appropriate + * default. Returned results may be fewer than requested. When this happens, + * there could be more results as long as `next_page_token` is returned. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the preceding call * to this method. `page_token` must be the value of `next_page_token` from @@ -707,9 +714,10 @@ export class AssetServiceClient { * Optional. A list of asset types that this request searches for. If empty, it will * search all the supported asset types. * @param {number} [request.pageSize] - * Optional. The page size for search result pagination. Returned results may be fewer - * than requested. The value of this field is capped at 2000. If set to the - * zero value, server will pick an appropriate default. + * Optional. The page size for search result pagination. Page size is capped at 500 even + * if a larger value is given. If set to zero, server will pick an appropriate + * default. Returned results may be fewer than requested. When this happens, + * there could be more results as long as `next_page_token` is returned. * @param {string} [request.pageToken] * Optional. If present, then retrieve the next batch of results from the preceding call * to this method. `page_token` must be the value of `next_page_token` from @@ -722,9 +730,17 @@ export class AssetServiceClient { */ searchAllResourcesStream( request?: protosTypes.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest, - options?: gax.CallOptions | {} + options?: gax.CallOptions ): Transform { request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + scope: request.scope || '', + }); const callSettings = new gax.CallSettings(options); return this._descriptors.page.searchAllResources.createStream( this._innerApiCalls.searchAllResources as gax.GaxCall, @@ -773,9 +789,10 @@ export class AssetServiceClient { * * "policy:myuser@mydomain.com" * * "policy:(myuser@mydomain.com viewer)" * @param {number} [request.pageSize] - * Optional. The page size for search result pagination. Returned results may be fewer - * than requested. The maximum is 2000. If set to the zero value, the server - * will pick an appropriate default. + * Optional. The page size for search result pagination. Page size is capped at 500 even + * if a larger value is given. If set to zero, server will pick an appropriate + * default. Returned results may be fewer than requested. When this happens, + * there could be more results as long as `next_page_token` is returned. * @param {string} [request.pageToken] * Optional. If present, retrieve the next batch of results from the preceding call to * this method. `page_token` must be the value of `next_page_token` from the @@ -866,9 +883,10 @@ export class AssetServiceClient { * * "policy:myuser@mydomain.com" * * "policy:(myuser@mydomain.com viewer)" * @param {number} [request.pageSize] - * Optional. The page size for search result pagination. Returned results may be fewer - * than requested. The maximum is 2000. If set to the zero value, the server - * will pick an appropriate default. + * Optional. The page size for search result pagination. Page size is capped at 500 even + * if a larger value is given. If set to zero, server will pick an appropriate + * default. Returned results may be fewer than requested. When this happens, + * there could be more results as long as `next_page_token` is returned. * @param {string} [request.pageToken] * Optional. If present, retrieve the next batch of results from the preceding call to * this method. `page_token` must be the value of `next_page_token` from the @@ -881,9 +899,17 @@ export class AssetServiceClient { */ searchAllIamPoliciesStream( request?: protosTypes.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest, - options?: gax.CallOptions | {} + options?: gax.CallOptions ): Transform { request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + scope: request.scope || '', + }); const callSettings = new gax.CallSettings(options); return this._descriptors.page.searchAllIamPolicies.createStream( this._innerApiCalls.searchAllIamPolicies as gax.GaxCall, diff --git a/packages/google-cloud-asset/src/v1p1beta1/asset_service_proto_list.json b/packages/google-cloud-asset/src/v1p1beta1/asset_service_proto_list.json index 31c1cf27e9d..4eba2431088 100644 --- a/packages/google-cloud-asset/src/v1p1beta1/asset_service_proto_list.json +++ b/packages/google-cloud-asset/src/v1p1beta1/asset_service_proto_list.json @@ -1,4 +1,4 @@ [ - "../../protos/google/cloud/asset/v1p1beta1/assets.proto", - "../../protos/google/cloud/asset/v1p1beta1/asset_service.proto" + "../../protos/google/cloud/asset/v1p1beta1/asset_service.proto", + "../../protos/google/cloud/asset/v1p1beta1/assets.proto" ] diff --git a/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts index b57241e9943..c3bb3235020 100644 --- a/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts @@ -139,15 +139,15 @@ export class AssetServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - projectFeedPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/feeds/{feed}' - ), folderFeedPathTemplate: new gaxModule.PathTemplate( 'folders/{folder}/feeds/{feed}' ), organizationFeedPathTemplate: new gaxModule.PathTemplate( 'organizations/{organization}/feeds/{feed}' ), + projectFeedPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/feeds/{feed}' + ), }; // Put together the default options sent with requests. @@ -660,44 +660,6 @@ export class AssetServiceClient { // -- Path templates -- // -------------------- - /** - * Return a fully-qualified projectFeed resource name string. - * - * @param {string} project - * @param {string} feed - * @returns {string} Resource name string. - */ - projectFeedPath(project: string, feed: string) { - return this._pathTemplates.projectFeedPathTemplate.render({ - project, - feed, - }); - } - - /** - * Parse the project from ProjectFeed resource. - * - * @param {string} projectFeedName - * A fully-qualified path representing project_feed resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectFeedName(projectFeedName: string) { - return this._pathTemplates.projectFeedPathTemplate.match(projectFeedName) - .project; - } - - /** - * Parse the feed from ProjectFeed resource. - * - * @param {string} projectFeedName - * A fully-qualified path representing project_feed resource. - * @returns {string} A string representing the feed. - */ - matchFeedFromProjectFeedName(projectFeedName: string) { - return this._pathTemplates.projectFeedPathTemplate.match(projectFeedName) - .feed; - } - /** * Return a fully-qualified folderFeed resource name string. * @@ -776,6 +738,44 @@ export class AssetServiceClient { ).feed; } + /** + * Return a fully-qualified projectFeed resource name string. + * + * @param {string} project + * @param {string} feed + * @returns {string} Resource name string. + */ + projectFeedPath(project: string, feed: string) { + return this._pathTemplates.projectFeedPathTemplate.render({ + project, + feed, + }); + } + + /** + * Parse the project from ProjectFeed resource. + * + * @param {string} projectFeedName + * A fully-qualified path representing project_feed resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectFeedName(projectFeedName: string) { + return this._pathTemplates.projectFeedPathTemplate.match(projectFeedName) + .project; + } + + /** + * Parse the feed from ProjectFeed resource. + * + * @param {string} projectFeedName + * A fully-qualified path representing project_feed resource. + * @returns {string} A string representing the feed. + */ + matchFeedFromProjectFeedName(projectFeedName: string) { + return this._pathTemplates.projectFeedPathTemplate.match(projectFeedName) + .feed; + } + /** * Terminate the GRPC channel and close the client. * diff --git a/packages/google-cloud-asset/src/v1p2beta1/asset_service_proto_list.json b/packages/google-cloud-asset/src/v1p2beta1/asset_service_proto_list.json index 33e15d2df28..060b459873e 100644 --- a/packages/google-cloud-asset/src/v1p2beta1/asset_service_proto_list.json +++ b/packages/google-cloud-asset/src/v1p2beta1/asset_service_proto_list.json @@ -1,4 +1,4 @@ [ - "../../protos/google/cloud/asset/v1p2beta1/assets.proto", - "../../protos/google/cloud/asset/v1p2beta1/asset_service.proto" + "../../protos/google/cloud/asset/v1p2beta1/asset_service.proto", + "../../protos/google/cloud/asset/v1p2beta1/assets.proto" ] diff --git a/packages/google-cloud-asset/synth.metadata b/packages/google-cloud-asset/synth.metadata new file mode 100644 index 00000000000..239eb264e84 --- /dev/null +++ b/packages/google-cloud-asset/synth.metadata @@ -0,0 +1,58 @@ +{ + "updateTime": "2020-02-08T12:09:13.326183Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "e7d8a694f4559201e6913f6610069cb08b39274e", + "internalRef": "293903652" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2020.2.4" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "asset", + "apiVersion": "v1beta1", + "language": "typescript", + "generator": "gapic-generator-typescript" + } + }, + { + "client": { + "source": "googleapis", + "apiName": "asset", + "apiVersion": "v1", + "language": "typescript", + "generator": "gapic-generator-typescript" + } + }, + { + "client": { + "source": "googleapis", + "apiName": "asset", + "apiVersion": "v1p1beta1", + "language": "typescript", + "generator": "gapic-generator-typescript" + } + }, + { + "client": { + "source": "googleapis", + "apiName": "asset", + "apiVersion": "v1p2beta1", + "language": "typescript", + "generator": "gapic-generator-typescript" + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-asset/test/gapic-asset_service-v1.ts b/packages/google-cloud-asset/test/gapic-asset_service-v1.ts index 5a87d233785..f56860b8aa8 100644 --- a/packages/google-cloud-asset/test/gapic-asset_service-v1.ts +++ b/packages/google-cloud-asset/test/gapic-asset_service-v1.ts @@ -110,6 +110,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -132,6 +133,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.IBatchGetAssetsHistoryRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -156,6 +158,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.ICreateFeedRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -178,6 +181,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.ICreateFeedRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -202,6 +206,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.IGetFeedRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -224,6 +229,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.IGetFeedRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -248,6 +254,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.IListFeedsRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -270,6 +277,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.IListFeedsRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -344,6 +352,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.IDeleteFeedRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -366,6 +375,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.IDeleteFeedRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -390,6 +400,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.IExportAssetsRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -419,6 +430,7 @@ describe('v1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1.IExportAssetsRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer diff --git a/packages/google-cloud-asset/test/gapic-asset_service-v1beta1.ts b/packages/google-cloud-asset/test/gapic-asset_service-v1beta1.ts index a403153c98c..ad8df628733 100644 --- a/packages/google-cloud-asset/test/gapic-asset_service-v1beta1.ts +++ b/packages/google-cloud-asset/test/gapic-asset_service-v1beta1.ts @@ -112,6 +112,7 @@ describe('v1beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -134,6 +135,7 @@ describe('v1beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1beta1.IBatchGetAssetsHistoryRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -158,6 +160,7 @@ describe('v1beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1beta1.IExportAssetsRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -187,6 +190,7 @@ describe('v1beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1beta1.IExportAssetsRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer diff --git a/packages/google-cloud-asset/test/gapic-asset_service-v1p1beta1.ts b/packages/google-cloud-asset/test/gapic-asset_service-v1p1beta1.ts index 1c0bf79c478..28e8691c20e 100644 --- a/packages/google-cloud-asset/test/gapic-asset_service-v1p1beta1.ts +++ b/packages/google-cloud-asset/test/gapic-asset_service-v1p1beta1.ts @@ -102,7 +102,7 @@ describe('v1p1beta1.AssetServiceClient', () => { // Mock request const request: protosTypes.google.cloud.asset.v1p1beta1.ISearchResourcesRequest = {}; // Mock response - const expectedResponse = {}; + const expectedResponse = {response: 'data'}; // Mock Grpc layer client._innerApiCalls.searchResources = ( actualRequest: {}, @@ -121,7 +121,7 @@ describe('v1p1beta1.AssetServiceClient', () => { .on('error', (err: FakeError) => { done(err); }); - stream.write(request); + stream.write(expectedResponse); }); }); describe('searchIamPolicies', () => { @@ -159,7 +159,7 @@ describe('v1p1beta1.AssetServiceClient', () => { // Mock request const request: protosTypes.google.cloud.asset.v1p1beta1.ISearchIamPoliciesRequest = {}; // Mock response - const expectedResponse = {}; + const expectedResponse = {response: 'data'}; // Mock Grpc layer client._innerApiCalls.searchIamPolicies = ( actualRequest: {}, @@ -178,7 +178,7 @@ describe('v1p1beta1.AssetServiceClient', () => { .on('error', (err: FakeError) => { done(err); }); - stream.write(request); + stream.write(expectedResponse); }); }); describe('searchAllResources', () => { @@ -189,6 +189,7 @@ describe('v1p1beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest = {}; + request.scope = ''; // Mock response const expectedResponse = {}; // Mock Grpc layer @@ -215,8 +216,9 @@ describe('v1p1beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p1beta1.ISearchAllResourcesRequest = {}; + request.scope = ''; // Mock response - const expectedResponse = {}; + const expectedResponse = {response: 'data'}; // Mock Grpc layer client._innerApiCalls.searchAllResources = ( actualRequest: {}, @@ -235,7 +237,7 @@ describe('v1p1beta1.AssetServiceClient', () => { .on('error', (err: FakeError) => { done(err); }); - stream.write(request); + stream.write(expectedResponse); }); }); describe('searchAllIamPolicies', () => { @@ -246,6 +248,7 @@ describe('v1p1beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest = {}; + request.scope = ''; // Mock response const expectedResponse = {}; // Mock Grpc layer @@ -272,8 +275,9 @@ describe('v1p1beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p1beta1.ISearchAllIamPoliciesRequest = {}; + request.scope = ''; // Mock response - const expectedResponse = {}; + const expectedResponse = {response: 'data'}; // Mock Grpc layer client._innerApiCalls.searchAllIamPolicies = ( actualRequest: {}, @@ -292,7 +296,7 @@ describe('v1p1beta1.AssetServiceClient', () => { .on('error', (err: FakeError) => { done(err); }); - stream.write(request); + stream.write(expectedResponse); }); }); }); diff --git a/packages/google-cloud-asset/test/gapic-asset_service-v1p2beta1.ts b/packages/google-cloud-asset/test/gapic-asset_service-v1p2beta1.ts index 98e7b145c75..02fd1b88b57 100644 --- a/packages/google-cloud-asset/test/gapic-asset_service-v1p2beta1.ts +++ b/packages/google-cloud-asset/test/gapic-asset_service-v1p2beta1.ts @@ -91,6 +91,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p2beta1.ICreateFeedRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -113,6 +114,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p2beta1.ICreateFeedRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -137,6 +139,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p2beta1.IGetFeedRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -159,6 +162,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p2beta1.IGetFeedRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -183,6 +187,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p2beta1.IListFeedsRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -205,6 +210,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p2beta1.IListFeedsRequest = {}; + request.parent = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -279,6 +285,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p2beta1.IDeleteFeedRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer @@ -301,6 +308,7 @@ describe('v1p2beta1.AssetServiceClient', () => { }); // Mock request const request: protosTypes.google.cloud.asset.v1p2beta1.IDeleteFeedRequest = {}; + request.name = ''; // Mock response const expectedResponse = {}; // Mock gRPC layer