diff --git a/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto b/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto index 7deb3593..6acace9e 100644 --- a/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto +++ b/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto @@ -280,6 +280,29 @@ service FeaturestoreService { }; } + // Delete Feature values from Featurestore. + // + // The progress of the deletion is tracked by the returned operation. The + // deleted feature values are guaranteed to be invisible to subsequent read + // operations after the operation is marked as successfully done. + // + // If a delete feature values operation fails, the feature values + // returned from reads and exports may be inconsistent. If consistency is + // required, the caller must retry the same delete request again and wait till + // the new operation returned is marked as successfully done. + rpc DeleteFeatureValues(DeleteFeatureValuesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:deleteFeatureValues" + body: "*" + }; + option (google.api.method_signature) = "entity_type"; + option (google.longrunning.operation_info) = { + response_type: "DeleteFeatureValuesResponse" + metadata_type: "DeleteFeatureValuesOperationMetadata" + }; + } + // Searches Features matching a query in a given project. rpc SearchFeatures(SearchFeaturesRequest) returns (SearchFeaturesResponse) { option (google.api.http) = { @@ -1207,6 +1230,12 @@ message BatchReadFeatureValuesOperationMetadata { GenericOperationMetadata generic_metadata = 1; } +// Details of operations that delete Feature values. +message DeleteFeatureValuesOperationMetadata { + // Operation metadata for Featurestore delete Features values. + GenericOperationMetadata generic_metadata = 1; +} + // Details of operations that perform create EntityType. message CreateEntityTypeOperationMetadata { // Operation metadata for EntityType. @@ -1224,3 +1253,51 @@ message BatchCreateFeaturesOperationMetadata { // Operation metadata for Feature. GenericOperationMetadata generic_metadata = 1; } + +// Request message for +// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues]. +message DeleteFeatureValuesRequest { + // Message to select entity. + // If an entity id is selected, all the feature values corresponding to the + // entity id will be deleted, including the entityId. + message SelectEntity { + // Required. Selectors choosing feature values of which entity id to be + // deleted from the EntityType. + EntityIdSelector entity_id_selector = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // Defines options to select feature values to be deleted. + oneof DeleteOption { + // Select feature values to be deleted by specifying entities. + SelectEntity select_entity = 2; + } + + // Required. The resource name of the EntityType grouping the Features for + // which values are being deleted from. Format: + // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + string entity_type = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/EntityType" + } + ]; +} + +// Response message for +// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues]. +message DeleteFeatureValuesResponse {} + +// Selector for entityId. Getting ids from the given source. +message EntityIdSelector { + // Details about the source data, including the location of the storage and + // the format. + oneof EntityIdsSource { + // Source of Csv + CsvSource csv_source = 3; + } + + // Source column that holds entity IDs. If not provided, entity IDs are + // extracted from the column named `entity_id`. + string entity_id_field = 5; +} diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 582ba204..88421210 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -89818,6 +89818,20 @@ export namespace google { */ public exportFeatureValues(request: google.cloud.aiplatform.v1beta1.IExportFeatureValuesRequest): Promise; + /** + * Calls DeleteFeatureValues. + * @param request DeleteFeatureValuesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteFeatureValues(request: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest, callback: google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValuesCallback): void; + + /** + * Calls DeleteFeatureValues. + * @param request DeleteFeatureValuesRequest message or plain object + * @returns Promise + */ + public deleteFeatureValues(request: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest): Promise; + /** * Calls SearchFeatures. * @param request SearchFeaturesRequest message or plain object @@ -89968,6 +89982,13 @@ export namespace google { */ type ExportFeatureValuesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.FeaturestoreService|deleteFeatureValues}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteFeatureValuesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.aiplatform.v1beta1.FeaturestoreService|searchFeatures}. * @param error Error, if any @@ -94276,6 +94297,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a DeleteFeatureValuesOperationMetadata. */ + interface IDeleteFeatureValuesOperationMetadata { + + /** DeleteFeatureValuesOperationMetadata genericMetadata */ + genericMetadata?: (google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null); + } + + /** Represents a DeleteFeatureValuesOperationMetadata. */ + class DeleteFeatureValuesOperationMetadata implements IDeleteFeatureValuesOperationMetadata { + + /** + * Constructs a new DeleteFeatureValuesOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata); + + /** DeleteFeatureValuesOperationMetadata genericMetadata. */ + public genericMetadata?: (google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null); + + /** + * Creates a new DeleteFeatureValuesOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFeatureValuesOperationMetadata instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata; + + /** + * Encodes the specified DeleteFeatureValuesOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata.verify|verify} messages. + * @param message DeleteFeatureValuesOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFeatureValuesOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata.verify|verify} messages. + * @param message DeleteFeatureValuesOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFeatureValuesOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFeatureValuesOperationMetadata + * @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.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata; + + /** + * Decodes a DeleteFeatureValuesOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFeatureValuesOperationMetadata + * @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.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata; + + /** + * Verifies a DeleteFeatureValuesOperationMetadata 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 DeleteFeatureValuesOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFeatureValuesOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata; + + /** + * Creates a plain object from a DeleteFeatureValuesOperationMetadata message. Also converts values to other types if specified. + * @param message DeleteFeatureValuesOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFeatureValuesOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFeatureValuesOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CreateEntityTypeOperationMetadata. */ interface ICreateEntityTypeOperationMetadata { @@ -94567,6 +94685,409 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a DeleteFeatureValuesRequest. */ + interface IDeleteFeatureValuesRequest { + + /** DeleteFeatureValuesRequest selectEntity */ + selectEntity?: (google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity|null); + + /** DeleteFeatureValuesRequest entityType */ + entityType?: (string|null); + } + + /** Represents a DeleteFeatureValuesRequest. */ + class DeleteFeatureValuesRequest implements IDeleteFeatureValuesRequest { + + /** + * Constructs a new DeleteFeatureValuesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest); + + /** DeleteFeatureValuesRequest selectEntity. */ + public selectEntity?: (google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity|null); + + /** DeleteFeatureValuesRequest entityType. */ + public entityType: string; + + /** DeleteFeatureValuesRequest DeleteOption. */ + public DeleteOption?: "selectEntity"; + + /** + * Creates a new DeleteFeatureValuesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFeatureValuesRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest; + + /** + * Encodes the specified DeleteFeatureValuesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.verify|verify} messages. + * @param message DeleteFeatureValuesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFeatureValuesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.verify|verify} messages. + * @param message DeleteFeatureValuesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFeatureValuesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFeatureValuesRequest + * @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.aiplatform.v1beta1.DeleteFeatureValuesRequest; + + /** + * Decodes a DeleteFeatureValuesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFeatureValuesRequest + * @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.aiplatform.v1beta1.DeleteFeatureValuesRequest; + + /** + * Verifies a DeleteFeatureValuesRequest 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 DeleteFeatureValuesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFeatureValuesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest; + + /** + * Creates a plain object from a DeleteFeatureValuesRequest message. Also converts values to other types if specified. + * @param message DeleteFeatureValuesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFeatureValuesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFeatureValuesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeleteFeatureValuesRequest { + + /** Properties of a SelectEntity. */ + interface ISelectEntity { + + /** SelectEntity entityIdSelector */ + entityIdSelector?: (google.cloud.aiplatform.v1beta1.IEntityIdSelector|null); + } + + /** Represents a SelectEntity. */ + class SelectEntity implements ISelectEntity { + + /** + * Constructs a new SelectEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity); + + /** SelectEntity entityIdSelector. */ + public entityIdSelector?: (google.cloud.aiplatform.v1beta1.IEntityIdSelector|null); + + /** + * Creates a new SelectEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectEntity instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity; + + /** + * Encodes the specified SelectEntity message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity.verify|verify} messages. + * @param message SelectEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectEntity message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity.verify|verify} messages. + * @param message SelectEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectEntity + * @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.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity; + + /** + * Decodes a SelectEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectEntity + * @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.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity; + + /** + * Verifies a SelectEntity 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 SelectEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity; + + /** + * Creates a plain object from a SelectEntity message. Also converts values to other types if specified. + * @param message SelectEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DeleteFeatureValuesResponse. */ + interface IDeleteFeatureValuesResponse { + } + + /** Represents a DeleteFeatureValuesResponse. */ + class DeleteFeatureValuesResponse implements IDeleteFeatureValuesResponse { + + /** + * Constructs a new DeleteFeatureValuesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse); + + /** + * Creates a new DeleteFeatureValuesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFeatureValuesResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse; + + /** + * Encodes the specified DeleteFeatureValuesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.verify|verify} messages. + * @param message DeleteFeatureValuesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFeatureValuesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.verify|verify} messages. + * @param message DeleteFeatureValuesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFeatureValuesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFeatureValuesResponse + * @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.aiplatform.v1beta1.DeleteFeatureValuesResponse; + + /** + * Decodes a DeleteFeatureValuesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFeatureValuesResponse + * @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.aiplatform.v1beta1.DeleteFeatureValuesResponse; + + /** + * Verifies a DeleteFeatureValuesResponse 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 DeleteFeatureValuesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFeatureValuesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse; + + /** + * Creates a plain object from a DeleteFeatureValuesResponse message. Also converts values to other types if specified. + * @param message DeleteFeatureValuesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFeatureValuesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFeatureValuesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EntityIdSelector. */ + interface IEntityIdSelector { + + /** EntityIdSelector csvSource */ + csvSource?: (google.cloud.aiplatform.v1beta1.ICsvSource|null); + + /** EntityIdSelector entityIdField */ + entityIdField?: (string|null); + } + + /** Represents an EntityIdSelector. */ + class EntityIdSelector implements IEntityIdSelector { + + /** + * Constructs a new EntityIdSelector. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IEntityIdSelector); + + /** EntityIdSelector csvSource. */ + public csvSource?: (google.cloud.aiplatform.v1beta1.ICsvSource|null); + + /** EntityIdSelector entityIdField. */ + public entityIdField: string; + + /** EntityIdSelector EntityIdsSource. */ + public EntityIdsSource?: "csvSource"; + + /** + * Creates a new EntityIdSelector instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityIdSelector instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IEntityIdSelector): google.cloud.aiplatform.v1beta1.EntityIdSelector; + + /** + * Encodes the specified EntityIdSelector message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EntityIdSelector.verify|verify} messages. + * @param message EntityIdSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IEntityIdSelector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityIdSelector message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EntityIdSelector.verify|verify} messages. + * @param message EntityIdSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IEntityIdSelector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityIdSelector message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityIdSelector + * @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.aiplatform.v1beta1.EntityIdSelector; + + /** + * Decodes an EntityIdSelector message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityIdSelector + * @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.aiplatform.v1beta1.EntityIdSelector; + + /** + * Verifies an EntityIdSelector 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 EntityIdSelector message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityIdSelector + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.EntityIdSelector; + + /** + * Creates a plain object from an EntityIdSelector message. Also converts values to other types if specified. + * @param message EntityIdSelector + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.EntityIdSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityIdSelector to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntityIdSelector + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a HyperparameterTuningJob. */ interface IHyperparameterTuningJob { diff --git a/protos/protos.js b/protos/protos.js index 73d7e277..9a44a1ef 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -218281,6 +218281,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.FeaturestoreService|deleteFeatureValues}. + * @memberof google.cloud.aiplatform.v1beta1.FeaturestoreService + * @typedef DeleteFeatureValuesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteFeatureValues. + * @function deleteFeatureValues + * @memberof google.cloud.aiplatform.v1beta1.FeaturestoreService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest} request DeleteFeatureValuesRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValuesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FeaturestoreService.prototype.deleteFeatureValues = function deleteFeatureValues(request, callback) { + return this.rpcCall(deleteFeatureValues, $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteFeatureValues" }); + + /** + * Calls DeleteFeatureValues. + * @function deleteFeatureValues + * @memberof google.cloud.aiplatform.v1beta1.FeaturestoreService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest} request DeleteFeatureValuesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.aiplatform.v1beta1.FeaturestoreService|searchFeatures}. * @memberof google.cloud.aiplatform.v1beta1.FeaturestoreService @@ -228615,6 +228648,214 @@ return BatchReadFeatureValuesOperationMetadata; })(); + v1beta1.DeleteFeatureValuesOperationMetadata = (function() { + + /** + * Properties of a DeleteFeatureValuesOperationMetadata. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IDeleteFeatureValuesOperationMetadata + * @property {google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null} [genericMetadata] DeleteFeatureValuesOperationMetadata genericMetadata + */ + + /** + * Constructs a new DeleteFeatureValuesOperationMetadata. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a DeleteFeatureValuesOperationMetadata. + * @implements IDeleteFeatureValuesOperationMetadata + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata=} [properties] Properties to set + */ + function DeleteFeatureValuesOperationMetadata(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]]; + } + + /** + * DeleteFeatureValuesOperationMetadata genericMetadata. + * @member {google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null|undefined} genericMetadata + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + * @instance + */ + DeleteFeatureValuesOperationMetadata.prototype.genericMetadata = null; + + /** + * Creates a new DeleteFeatureValuesOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata} DeleteFeatureValuesOperationMetadata instance + */ + DeleteFeatureValuesOperationMetadata.create = function create(properties) { + return new DeleteFeatureValuesOperationMetadata(properties); + }; + + /** + * Encodes the specified DeleteFeatureValuesOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata} message DeleteFeatureValuesOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.genericMetadata != null && Object.hasOwnProperty.call(message, "genericMetadata")) + $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.encode(message.genericMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeleteFeatureValuesOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata} message DeleteFeatureValuesOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFeatureValuesOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata} DeleteFeatureValuesOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesOperationMetadata.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.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFeatureValuesOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata} DeleteFeatureValuesOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFeatureValuesOperationMetadata message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFeatureValuesOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) { + var error = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.verify(message.genericMetadata); + if (error) + return "genericMetadata." + error; + } + return null; + }; + + /** + * Creates a DeleteFeatureValuesOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata} DeleteFeatureValuesOperationMetadata + */ + DeleteFeatureValuesOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata(); + if (object.genericMetadata != null) { + if (typeof object.genericMetadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata.genericMetadata: object expected"); + message.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.fromObject(object.genericMetadata); + } + return message; + }; + + /** + * Creates a plain object from a DeleteFeatureValuesOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata} message DeleteFeatureValuesOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFeatureValuesOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.genericMetadata = null; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) + object.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.toObject(message.genericMetadata, options); + return object; + }; + + /** + * Converts this DeleteFeatureValuesOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + DeleteFeatureValuesOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFeatureValuesOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFeatureValuesOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata"; + }; + + return DeleteFeatureValuesOperationMetadata; + })(); + v1beta1.CreateEntityTypeOperationMetadata = (function() { /** @@ -229239,6 +229480,891 @@ return BatchCreateFeaturesOperationMetadata; })(); + v1beta1.DeleteFeatureValuesRequest = (function() { + + /** + * Properties of a DeleteFeatureValuesRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IDeleteFeatureValuesRequest + * @property {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity|null} [selectEntity] DeleteFeatureValuesRequest selectEntity + * @property {string|null} [entityType] DeleteFeatureValuesRequest entityType + */ + + /** + * Constructs a new DeleteFeatureValuesRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a DeleteFeatureValuesRequest. + * @implements IDeleteFeatureValuesRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest=} [properties] Properties to set + */ + function DeleteFeatureValuesRequest(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]]; + } + + /** + * DeleteFeatureValuesRequest selectEntity. + * @member {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity|null|undefined} selectEntity + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @instance + */ + DeleteFeatureValuesRequest.prototype.selectEntity = null; + + /** + * DeleteFeatureValuesRequest entityType. + * @member {string} entityType + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @instance + */ + DeleteFeatureValuesRequest.prototype.entityType = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DeleteFeatureValuesRequest DeleteOption. + * @member {"selectEntity"|undefined} DeleteOption + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @instance + */ + Object.defineProperty(DeleteFeatureValuesRequest.prototype, "DeleteOption", { + get: $util.oneOfGetter($oneOfFields = ["selectEntity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeleteFeatureValuesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest} DeleteFeatureValuesRequest instance + */ + DeleteFeatureValuesRequest.create = function create(properties) { + return new DeleteFeatureValuesRequest(properties); + }; + + /** + * Encodes the specified DeleteFeatureValuesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest} message DeleteFeatureValuesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityType); + if (message.selectEntity != null && Object.hasOwnProperty.call(message, "selectEntity")) + $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity.encode(message.selectEntity, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeleteFeatureValuesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest} message DeleteFeatureValuesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFeatureValuesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest} DeleteFeatureValuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesRequest.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.aiplatform.v1beta1.DeleteFeatureValuesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.selectEntity = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity.decode(reader, reader.uint32()); + break; + } + case 1: { + message.entityType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFeatureValuesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest} DeleteFeatureValuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFeatureValuesRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFeatureValuesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selectEntity != null && message.hasOwnProperty("selectEntity")) { + properties.DeleteOption = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity.verify(message.selectEntity); + if (error) + return "selectEntity." + error; + } + } + if (message.entityType != null && message.hasOwnProperty("entityType")) + if (!$util.isString(message.entityType)) + return "entityType: string expected"; + return null; + }; + + /** + * Creates a DeleteFeatureValuesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest} DeleteFeatureValuesRequest + */ + DeleteFeatureValuesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest(); + if (object.selectEntity != null) { + if (typeof object.selectEntity !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.selectEntity: object expected"); + message.selectEntity = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity.fromObject(object.selectEntity); + } + if (object.entityType != null) + message.entityType = String(object.entityType); + return message; + }; + + /** + * Creates a plain object from a DeleteFeatureValuesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest} message DeleteFeatureValuesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFeatureValuesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.entityType = ""; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = message.entityType; + if (message.selectEntity != null && message.hasOwnProperty("selectEntity")) { + object.selectEntity = $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity.toObject(message.selectEntity, options); + if (options.oneofs) + object.DeleteOption = "selectEntity"; + } + return object; + }; + + /** + * Converts this DeleteFeatureValuesRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteFeatureValuesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFeatureValuesRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFeatureValuesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest"; + }; + + DeleteFeatureValuesRequest.SelectEntity = (function() { + + /** + * Properties of a SelectEntity. + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @interface ISelectEntity + * @property {google.cloud.aiplatform.v1beta1.IEntityIdSelector|null} [entityIdSelector] SelectEntity entityIdSelector + */ + + /** + * Constructs a new SelectEntity. + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest + * @classdesc Represents a SelectEntity. + * @implements ISelectEntity + * @constructor + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity=} [properties] Properties to set + */ + function SelectEntity(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]]; + } + + /** + * SelectEntity entityIdSelector. + * @member {google.cloud.aiplatform.v1beta1.IEntityIdSelector|null|undefined} entityIdSelector + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity + * @instance + */ + SelectEntity.prototype.entityIdSelector = null; + + /** + * Creates a new SelectEntity instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity} SelectEntity instance + */ + SelectEntity.create = function create(properties) { + return new SelectEntity(properties); + }; + + /** + * Encodes the specified SelectEntity message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity} message SelectEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entityIdSelector != null && Object.hasOwnProperty.call(message, "entityIdSelector")) + $root.google.cloud.aiplatform.v1beta1.EntityIdSelector.encode(message.entityIdSelector, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SelectEntity message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.ISelectEntity} message SelectEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity} SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectEntity.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.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entityIdSelector = $root.google.cloud.aiplatform.v1beta1.EntityIdSelector.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity} SelectEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectEntity message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entityIdSelector != null && message.hasOwnProperty("entityIdSelector")) { + var error = $root.google.cloud.aiplatform.v1beta1.EntityIdSelector.verify(message.entityIdSelector); + if (error) + return "entityIdSelector." + error; + } + return null; + }; + + /** + * Creates a SelectEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity} SelectEntity + */ + SelectEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity(); + if (object.entityIdSelector != null) { + if (typeof object.entityIdSelector !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity.entityIdSelector: object expected"); + message.entityIdSelector = $root.google.cloud.aiplatform.v1beta1.EntityIdSelector.fromObject(object.entityIdSelector); + } + return message; + }; + + /** + * Creates a plain object from a SelectEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity} message SelectEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.entityIdSelector = null; + if (message.entityIdSelector != null && message.hasOwnProperty("entityIdSelector")) + object.entityIdSelector = $root.google.cloud.aiplatform.v1beta1.EntityIdSelector.toObject(message.entityIdSelector, options); + return object; + }; + + /** + * Converts this SelectEntity to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity + * @instance + * @returns {Object.} JSON object + */ + SelectEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectEntity + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity"; + }; + + return SelectEntity; + })(); + + return DeleteFeatureValuesRequest; + })(); + + v1beta1.DeleteFeatureValuesResponse = (function() { + + /** + * Properties of a DeleteFeatureValuesResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IDeleteFeatureValuesResponse + */ + + /** + * Constructs a new DeleteFeatureValuesResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a DeleteFeatureValuesResponse. + * @implements IDeleteFeatureValuesResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse=} [properties] Properties to set + */ + function DeleteFeatureValuesResponse(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]]; + } + + /** + * Creates a new DeleteFeatureValuesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse} DeleteFeatureValuesResponse instance + */ + DeleteFeatureValuesResponse.create = function create(properties) { + return new DeleteFeatureValuesResponse(properties); + }; + + /** + * Encodes the specified DeleteFeatureValuesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse} message DeleteFeatureValuesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DeleteFeatureValuesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse} message DeleteFeatureValuesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureValuesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFeatureValuesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse} DeleteFeatureValuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesResponse.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.aiplatform.v1beta1.DeleteFeatureValuesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFeatureValuesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse} DeleteFeatureValuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureValuesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFeatureValuesResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFeatureValuesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DeleteFeatureValuesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse} DeleteFeatureValuesResponse + */ + DeleteFeatureValuesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse) + return object; + return new $root.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse(); + }; + + /** + * Creates a plain object from a DeleteFeatureValuesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse} message DeleteFeatureValuesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFeatureValuesResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DeleteFeatureValuesResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @instance + * @returns {Object.} JSON object + */ + DeleteFeatureValuesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFeatureValuesResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFeatureValuesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse"; + }; + + return DeleteFeatureValuesResponse; + })(); + + v1beta1.EntityIdSelector = (function() { + + /** + * Properties of an EntityIdSelector. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IEntityIdSelector + * @property {google.cloud.aiplatform.v1beta1.ICsvSource|null} [csvSource] EntityIdSelector csvSource + * @property {string|null} [entityIdField] EntityIdSelector entityIdField + */ + + /** + * Constructs a new EntityIdSelector. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an EntityIdSelector. + * @implements IEntityIdSelector + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IEntityIdSelector=} [properties] Properties to set + */ + function EntityIdSelector(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]]; + } + + /** + * EntityIdSelector csvSource. + * @member {google.cloud.aiplatform.v1beta1.ICsvSource|null|undefined} csvSource + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @instance + */ + EntityIdSelector.prototype.csvSource = null; + + /** + * EntityIdSelector entityIdField. + * @member {string} entityIdField + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @instance + */ + EntityIdSelector.prototype.entityIdField = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EntityIdSelector EntityIdsSource. + * @member {"csvSource"|undefined} EntityIdsSource + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @instance + */ + Object.defineProperty(EntityIdSelector.prototype, "EntityIdsSource", { + get: $util.oneOfGetter($oneOfFields = ["csvSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EntityIdSelector instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @static + * @param {google.cloud.aiplatform.v1beta1.IEntityIdSelector=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.EntityIdSelector} EntityIdSelector instance + */ + EntityIdSelector.create = function create(properties) { + return new EntityIdSelector(properties); + }; + + /** + * Encodes the specified EntityIdSelector message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EntityIdSelector.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @static + * @param {google.cloud.aiplatform.v1beta1.IEntityIdSelector} message EntityIdSelector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityIdSelector.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.csvSource != null && Object.hasOwnProperty.call(message, "csvSource")) + $root.google.cloud.aiplatform.v1beta1.CsvSource.encode(message.csvSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.entityIdField != null && Object.hasOwnProperty.call(message, "entityIdField")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.entityIdField); + return writer; + }; + + /** + * Encodes the specified EntityIdSelector message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EntityIdSelector.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @static + * @param {google.cloud.aiplatform.v1beta1.IEntityIdSelector} message EntityIdSelector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityIdSelector.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityIdSelector message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.EntityIdSelector} EntityIdSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityIdSelector.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.aiplatform.v1beta1.EntityIdSelector(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.csvSource = $root.google.cloud.aiplatform.v1beta1.CsvSource.decode(reader, reader.uint32()); + break; + } + case 5: { + message.entityIdField = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityIdSelector message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.EntityIdSelector} EntityIdSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityIdSelector.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityIdSelector message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityIdSelector.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.csvSource != null && message.hasOwnProperty("csvSource")) { + properties.EntityIdsSource = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.CsvSource.verify(message.csvSource); + if (error) + return "csvSource." + error; + } + } + if (message.entityIdField != null && message.hasOwnProperty("entityIdField")) + if (!$util.isString(message.entityIdField)) + return "entityIdField: string expected"; + return null; + }; + + /** + * Creates an EntityIdSelector message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.EntityIdSelector} EntityIdSelector + */ + EntityIdSelector.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.EntityIdSelector) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.EntityIdSelector(); + if (object.csvSource != null) { + if (typeof object.csvSource !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EntityIdSelector.csvSource: object expected"); + message.csvSource = $root.google.cloud.aiplatform.v1beta1.CsvSource.fromObject(object.csvSource); + } + if (object.entityIdField != null) + message.entityIdField = String(object.entityIdField); + return message; + }; + + /** + * Creates a plain object from an EntityIdSelector message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @static + * @param {google.cloud.aiplatform.v1beta1.EntityIdSelector} message EntityIdSelector + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityIdSelector.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.entityIdField = ""; + if (message.csvSource != null && message.hasOwnProperty("csvSource")) { + object.csvSource = $root.google.cloud.aiplatform.v1beta1.CsvSource.toObject(message.csvSource, options); + if (options.oneofs) + object.EntityIdsSource = "csvSource"; + } + if (message.entityIdField != null && message.hasOwnProperty("entityIdField")) + object.entityIdField = message.entityIdField; + return object; + }; + + /** + * Converts this EntityIdSelector to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @instance + * @returns {Object.} JSON object + */ + EntityIdSelector.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntityIdSelector + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.EntityIdSelector + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityIdSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.EntityIdSelector"; + }; + + return EntityIdSelector; + })(); + v1beta1.HyperparameterTuningJob = (function() { /** diff --git a/protos/protos.json b/protos/protos.json index 8e5971f6..f2976212 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -23373,6 +23373,34 @@ } ] }, + "DeleteFeatureValues": { + "requestType": "DeleteFeatureValuesRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:deleteFeatureValues", + "(google.api.http).body": "*", + "(google.api.method_signature)": "entity_type", + "(google.longrunning.operation_info).response_type": "DeleteFeatureValuesResponse", + "(google.longrunning.operation_info).metadata_type": "DeleteFeatureValuesOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:deleteFeatureValues", + "body": "*" + } + }, + { + "(google.api.method_signature)": "entity_type" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DeleteFeatureValuesResponse", + "metadata_type": "DeleteFeatureValuesOperationMetadata" + } + } + ] + }, "SearchFeatures": { "requestType": "SearchFeaturesRequest", "responseType": "SearchFeaturesResponse", @@ -24160,6 +24188,14 @@ } } }, + "DeleteFeatureValuesOperationMetadata": { + "fields": { + "genericMetadata": { + "type": "GenericOperationMetadata", + "id": 1 + } + } + }, "CreateEntityTypeOperationMetadata": { "fields": { "genericMetadata": { @@ -24184,6 +24220,64 @@ } } }, + "DeleteFeatureValuesRequest": { + "oneofs": { + "DeleteOption": { + "oneof": [ + "selectEntity" + ] + } + }, + "fields": { + "selectEntity": { + "type": "SelectEntity", + "id": 2 + }, + "entityType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/EntityType" + } + } + }, + "nested": { + "SelectEntity": { + "fields": { + "entityIdSelector": { + "type": "EntityIdSelector", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "DeleteFeatureValuesResponse": { + "fields": {} + }, + "EntityIdSelector": { + "oneofs": { + "EntityIdsSource": { + "oneof": [ + "csvSource" + ] + } + }, + "fields": { + "csvSource": { + "type": "CsvSource", + "id": 3 + }, + "entityIdField": { + "type": "string", + "id": 5 + } + } + }, "HyperparameterTuningJob": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/HyperparameterTuningJob", diff --git a/samples/generated/v1beta1/featurestore_service.delete_feature_values.js b/samples/generated/v1beta1/featurestore_service.delete_feature_values.js new file mode 100644 index 00000000..bf59ebc1 --- /dev/null +++ b/samples/generated/v1beta1/featurestore_service.delete_feature_values.js @@ -0,0 +1,68 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(entityType) { + // [START aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Select feature values to be deleted by specifying entities. + */ + // const selectEntity = {} + /** + * Required. The resource name of the EntityType grouping the Features for + * which values are being deleted from. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + */ + // const entityType = 'abc123' + + // Imports the Aiplatform library + const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new FeaturestoreServiceClient(); + + async function callDeleteFeatureValues() { + // Construct request + const request = { + entityType, + }; + + // Run request + const [operation] = await aiplatformClient.deleteFeatureValues(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteFeatureValues(); + // [END aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index c71c4042..47974425 100644 --- a/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -2195,6 +2195,50 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async", + "title": "DatasetService deleteFeatureValues Sample", + "origin": "API_DEFINITION", + "description": " Delete Feature values from Featurestore. The progress of the deletion is tracked by the returned operation. The deleted feature values are guaranteed to be invisible to subsequent read operations after the operation is marked as successfully done. If a delete feature values operation fails, the feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same delete request again and wait till the new operation returned is marked as successfully done.", + "canonical": true, + "file": "featurestore_service.delete_feature_values.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFeatureValues", + "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues", + "async": true, + "parameters": [ + { + "name": "select_entity", + "type": ".google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity" + }, + { + "name": "entity_type", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "FeaturestoreServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient" + }, + "method": { + "shortName": "DeleteFeatureValues", + "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues", + "service": { + "shortName": "FeaturestoreService", + "fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_SearchFeatures_async", "title": "DatasetService searchFeatures Sample", diff --git a/src/v1beta1/featurestore_service_client.ts b/src/v1beta1/featurestore_service_client.ts index 7805fa3c..dce1a03e 100644 --- a/src/v1beta1/featurestore_service_client.ts +++ b/src/v1beta1/featurestore_service_client.ts @@ -1411,6 +1411,12 @@ export class FeaturestoreServiceClient { const exportFeatureValuesMetadata = protoFilesRoot.lookup( '.google.cloud.aiplatform.v1beta1.ExportFeatureValuesOperationMetadata' ) as gax.protobuf.Type; + const deleteFeatureValuesResponse = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse' + ) as gax.protobuf.Type; + const deleteFeatureValuesMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createFeaturestore: new this._gaxModule.LongrunningDescriptor( @@ -1472,6 +1478,11 @@ export class FeaturestoreServiceClient { exportFeatureValuesResponse.decode.bind(exportFeatureValuesResponse), exportFeatureValuesMetadata.decode.bind(exportFeatureValuesMetadata) ), + deleteFeatureValues: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteFeatureValuesResponse.decode.bind(deleteFeatureValuesResponse), + deleteFeatureValuesMetadata.decode.bind(deleteFeatureValuesMetadata) + ), }; // Put together the default options sent with requests. @@ -1544,6 +1555,7 @@ export class FeaturestoreServiceClient { 'importFeatureValues', 'batchReadFeatureValues', 'exportFeatureValues', + 'deleteFeatureValues', 'searchFeatures', ]; for (const methodName of featurestoreServiceStubMethods) { @@ -3854,6 +3866,157 @@ export class FeaturestoreServiceClient { protos.google.cloud.aiplatform.v1beta1.ExportFeatureValuesOperationMetadata >; } + /** + * Delete Feature values from Featurestore. + * + * The progress of the deletion is tracked by the returned operation. The + * deleted feature values are guaranteed to be invisible to subsequent read + * operations after the operation is marked as successfully done. + * + * If a delete feature values operation fails, the feature values + * returned from reads and exports may be inconsistent. If consistency is + * required, the caller must retry the same delete request again and wait till + * the new operation returned is marked as successfully done. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity} request.selectEntity + * Select feature values to be deleted by specifying entities. + * @param {string} request.entityType + * Required. The resource name of the EntityType grouping the Features for + * which values are being deleted from. Format: + * `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/featurestore_service.delete_feature_values.js + * region_tag:aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async + */ + deleteFeatureValues( + request?: protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteFeatureValues( + request: protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteFeatureValues( + request: protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteFeatureValues( + request?: protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + entity_type: request.entityType ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteFeatureValues(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteFeatureValues()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/featurestore_service.delete_feature_values.js + * region_tag:aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async + */ + async checkDeleteFeatureValuesProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteFeatureValues, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesOperationMetadata + >; + } /** * Lists Featurestores in a given project and location. * diff --git a/src/v1beta1/featurestore_service_client_config.json b/src/v1beta1/featurestore_service_client_config.json index 094a033d..210e871c 100644 --- a/src/v1beta1/featurestore_service_client_config.json +++ b/src/v1beta1/featurestore_service_client_config.json @@ -114,6 +114,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "DeleteFeatureValues": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "SearchFeatures": { "timeout_millis": 5000, "retry_codes_name": "non_idempotent", diff --git a/src/v1beta1/gapic_metadata.json b/src/v1beta1/gapic_metadata.json index e3e19f14..ed36453b 100644 --- a/src/v1beta1/gapic_metadata.json +++ b/src/v1beta1/gapic_metadata.json @@ -429,6 +429,11 @@ "exportFeatureValues" ] }, + "DeleteFeatureValues": { + "methods": [ + "deleteFeatureValues" + ] + }, "ListFeaturestores": { "methods": [ "listFeaturestores", @@ -542,6 +547,11 @@ "exportFeatureValues" ] }, + "DeleteFeatureValues": { + "methods": [ + "deleteFeatureValues" + ] + }, "ListFeaturestores": { "methods": [ "listFeaturestores", diff --git a/test/gapic_featurestore_service_v1beta1.ts b/test/gapic_featurestore_service_v1beta1.ts index b7a070f1..055fbb24 100644 --- a/test/gapic_featurestore_service_v1beta1.ts +++ b/test/gapic_featurestore_service_v1beta1.ts @@ -3102,6 +3102,202 @@ describe('v1beta1.FeaturestoreServiceClient', () => { }); }); + describe('deleteFeatureValues', () => { + it('invokes deleteFeatureValues without error', async () => { + const client = + new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest() + ); + const defaultValue1 = getTypeDefaultValue('DeleteFeatureValuesRequest', [ + 'entityType', + ]); + request.entityType = defaultValue1; + const expectedHeaderRequestParams = `entity_type=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFeatureValues = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteFeatureValues(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeatureValues without error using callback', async () => { + const client = + new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest() + ); + const defaultValue1 = getTypeDefaultValue('DeleteFeatureValuesRequest', [ + 'entityType', + ]); + request.entityType = defaultValue1; + const expectedHeaderRequestParams = `entity_type=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFeatureValues = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFeatureValues( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesResponse, + protos.google.cloud.aiplatform.v1beta1.IDeleteFeatureValuesOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeatureValues with call error', async () => { + const client = + new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest() + ); + const defaultValue1 = getTypeDefaultValue('DeleteFeatureValuesRequest', [ + 'entityType', + ]); + request.entityType = defaultValue1; + const expectedHeaderRequestParams = `entity_type=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFeatureValues = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteFeatureValues(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeatureValues with LRO error', async () => { + const client = + new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest() + ); + const defaultValue1 = getTypeDefaultValue('DeleteFeatureValuesRequest', [ + 'entityType', + ]); + request.entityType = defaultValue1; + const expectedHeaderRequestParams = `entity_type=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFeatureValues = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteFeatureValues(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFeatureValues as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteFeatureValuesProgress without error', async () => { + const client = + new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteFeatureValuesProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteFeatureValuesProgress with error', async () => { + const client = + new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteFeatureValuesProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('listFeaturestores', () => { it('invokes listFeaturestores without error', async () => { const client =