How to use Delete method of execution Package

Best K6 code snippet using execution.Delete

metadata_client.go

Source:metadata_client.go Github

copy

Full Screen

...37type MetadataCallOptions struct {38 CreateMetadataStore []gax.CallOption39 GetMetadataStore []gax.CallOption40 ListMetadataStores []gax.CallOption41 DeleteMetadataStore []gax.CallOption42 CreateArtifact []gax.CallOption43 GetArtifact []gax.CallOption44 ListArtifacts []gax.CallOption45 UpdateArtifact []gax.CallOption46 DeleteArtifact []gax.CallOption47 PurgeArtifacts []gax.CallOption48 CreateContext []gax.CallOption49 GetContext []gax.CallOption50 ListContexts []gax.CallOption51 UpdateContext []gax.CallOption52 DeleteContext []gax.CallOption53 PurgeContexts []gax.CallOption54 AddContextArtifactsAndExecutions []gax.CallOption55 AddContextChildren []gax.CallOption56 QueryContextLineageSubgraph []gax.CallOption57 CreateExecution []gax.CallOption58 GetExecution []gax.CallOption59 ListExecutions []gax.CallOption60 UpdateExecution []gax.CallOption61 DeleteExecution []gax.CallOption62 PurgeExecutions []gax.CallOption63 AddExecutionEvents []gax.CallOption64 QueryExecutionInputsAndOutputs []gax.CallOption65 CreateMetadataSchema []gax.CallOption66 GetMetadataSchema []gax.CallOption67 ListMetadataSchemas []gax.CallOption68 QueryArtifactLineageSubgraph []gax.CallOption69}70func defaultMetadataGRPCClientOptions() []option.ClientOption {71 return []option.ClientOption{72 internaloption.WithDefaultEndpoint("aiplatform.googleapis.com:443"),73 internaloption.WithDefaultMTLSEndpoint("aiplatform.mtls.googleapis.com:443"),74 internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"),75 internaloption.WithDefaultScopes(DefaultAuthScopes()...),76 internaloption.EnableJwtWithScope(),77 option.WithGRPCDialOption(grpc.WithDefaultCallOptions(78 grpc.MaxCallRecvMsgSize(math.MaxInt32))),79 }80}81func defaultMetadataCallOptions() *MetadataCallOptions {82 return &MetadataCallOptions{83 CreateMetadataStore: []gax.CallOption{},84 GetMetadataStore: []gax.CallOption{},85 ListMetadataStores: []gax.CallOption{},86 DeleteMetadataStore: []gax.CallOption{},87 CreateArtifact: []gax.CallOption{},88 GetArtifact: []gax.CallOption{},89 ListArtifacts: []gax.CallOption{},90 UpdateArtifact: []gax.CallOption{},91 DeleteArtifact: []gax.CallOption{},92 PurgeArtifacts: []gax.CallOption{},93 CreateContext: []gax.CallOption{},94 GetContext: []gax.CallOption{},95 ListContexts: []gax.CallOption{},96 UpdateContext: []gax.CallOption{},97 DeleteContext: []gax.CallOption{},98 PurgeContexts: []gax.CallOption{},99 AddContextArtifactsAndExecutions: []gax.CallOption{},100 AddContextChildren: []gax.CallOption{},101 QueryContextLineageSubgraph: []gax.CallOption{},102 CreateExecution: []gax.CallOption{},103 GetExecution: []gax.CallOption{},104 ListExecutions: []gax.CallOption{},105 UpdateExecution: []gax.CallOption{},106 DeleteExecution: []gax.CallOption{},107 PurgeExecutions: []gax.CallOption{},108 AddExecutionEvents: []gax.CallOption{},109 QueryExecutionInputsAndOutputs: []gax.CallOption{},110 CreateMetadataSchema: []gax.CallOption{},111 GetMetadataSchema: []gax.CallOption{},112 ListMetadataSchemas: []gax.CallOption{},113 QueryArtifactLineageSubgraph: []gax.CallOption{},114 }115}116// internalMetadataClient is an interface that defines the methods availaible from Vertex AI API.117type internalMetadataClient interface {118 Close() error119 setGoogleClientInfo(...string)120 Connection() *grpc.ClientConn121 CreateMetadataStore(context.Context, *aiplatformpb.CreateMetadataStoreRequest, ...gax.CallOption) (*CreateMetadataStoreOperation, error)122 CreateMetadataStoreOperation(name string) *CreateMetadataStoreOperation123 GetMetadataStore(context.Context, *aiplatformpb.GetMetadataStoreRequest, ...gax.CallOption) (*aiplatformpb.MetadataStore, error)124 ListMetadataStores(context.Context, *aiplatformpb.ListMetadataStoresRequest, ...gax.CallOption) *MetadataStoreIterator125 DeleteMetadataStore(context.Context, *aiplatformpb.DeleteMetadataStoreRequest, ...gax.CallOption) (*DeleteMetadataStoreOperation, error)126 DeleteMetadataStoreOperation(name string) *DeleteMetadataStoreOperation127 CreateArtifact(context.Context, *aiplatformpb.CreateArtifactRequest, ...gax.CallOption) (*aiplatformpb.Artifact, error)128 GetArtifact(context.Context, *aiplatformpb.GetArtifactRequest, ...gax.CallOption) (*aiplatformpb.Artifact, error)129 ListArtifacts(context.Context, *aiplatformpb.ListArtifactsRequest, ...gax.CallOption) *ArtifactIterator130 UpdateArtifact(context.Context, *aiplatformpb.UpdateArtifactRequest, ...gax.CallOption) (*aiplatformpb.Artifact, error)131 DeleteArtifact(context.Context, *aiplatformpb.DeleteArtifactRequest, ...gax.CallOption) (*DeleteArtifactOperation, error)132 DeleteArtifactOperation(name string) *DeleteArtifactOperation133 PurgeArtifacts(context.Context, *aiplatformpb.PurgeArtifactsRequest, ...gax.CallOption) (*PurgeArtifactsOperation, error)134 PurgeArtifactsOperation(name string) *PurgeArtifactsOperation135 CreateContext(context.Context, *aiplatformpb.CreateContextRequest, ...gax.CallOption) (*aiplatformpb.Context, error)136 GetContext(context.Context, *aiplatformpb.GetContextRequest, ...gax.CallOption) (*aiplatformpb.Context, error)137 ListContexts(context.Context, *aiplatformpb.ListContextsRequest, ...gax.CallOption) *ContextIterator138 UpdateContext(context.Context, *aiplatformpb.UpdateContextRequest, ...gax.CallOption) (*aiplatformpb.Context, error)139 DeleteContext(context.Context, *aiplatformpb.DeleteContextRequest, ...gax.CallOption) (*DeleteContextOperation, error)140 DeleteContextOperation(name string) *DeleteContextOperation141 PurgeContexts(context.Context, *aiplatformpb.PurgeContextsRequest, ...gax.CallOption) (*PurgeContextsOperation, error)142 PurgeContextsOperation(name string) *PurgeContextsOperation143 AddContextArtifactsAndExecutions(context.Context, *aiplatformpb.AddContextArtifactsAndExecutionsRequest, ...gax.CallOption) (*aiplatformpb.AddContextArtifactsAndExecutionsResponse, error)144 AddContextChildren(context.Context, *aiplatformpb.AddContextChildrenRequest, ...gax.CallOption) (*aiplatformpb.AddContextChildrenResponse, error)145 QueryContextLineageSubgraph(context.Context, *aiplatformpb.QueryContextLineageSubgraphRequest, ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error)146 CreateExecution(context.Context, *aiplatformpb.CreateExecutionRequest, ...gax.CallOption) (*aiplatformpb.Execution, error)147 GetExecution(context.Context, *aiplatformpb.GetExecutionRequest, ...gax.CallOption) (*aiplatformpb.Execution, error)148 ListExecutions(context.Context, *aiplatformpb.ListExecutionsRequest, ...gax.CallOption) *ExecutionIterator149 UpdateExecution(context.Context, *aiplatformpb.UpdateExecutionRequest, ...gax.CallOption) (*aiplatformpb.Execution, error)150 DeleteExecution(context.Context, *aiplatformpb.DeleteExecutionRequest, ...gax.CallOption) (*DeleteExecutionOperation, error)151 DeleteExecutionOperation(name string) *DeleteExecutionOperation152 PurgeExecutions(context.Context, *aiplatformpb.PurgeExecutionsRequest, ...gax.CallOption) (*PurgeExecutionsOperation, error)153 PurgeExecutionsOperation(name string) *PurgeExecutionsOperation154 AddExecutionEvents(context.Context, *aiplatformpb.AddExecutionEventsRequest, ...gax.CallOption) (*aiplatformpb.AddExecutionEventsResponse, error)155 QueryExecutionInputsAndOutputs(context.Context, *aiplatformpb.QueryExecutionInputsAndOutputsRequest, ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error)156 CreateMetadataSchema(context.Context, *aiplatformpb.CreateMetadataSchemaRequest, ...gax.CallOption) (*aiplatformpb.MetadataSchema, error)157 GetMetadataSchema(context.Context, *aiplatformpb.GetMetadataSchemaRequest, ...gax.CallOption) (*aiplatformpb.MetadataSchema, error)158 ListMetadataSchemas(context.Context, *aiplatformpb.ListMetadataSchemasRequest, ...gax.CallOption) *MetadataSchemaIterator159 QueryArtifactLineageSubgraph(context.Context, *aiplatformpb.QueryArtifactLineageSubgraphRequest, ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error)160}161// MetadataClient is a client for interacting with Vertex AI API.162// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.163//164// Service for reading and writing metadata entries.165type MetadataClient struct {166 // The internal transport-dependent client.167 internalClient internalMetadataClient168 // The call options for this service.169 CallOptions *MetadataCallOptions170 // LROClient is used internally to handle long-running operations.171 // It is exposed so that its CallOptions can be modified if required.172 // Users should not Close this client.173 LROClient *lroauto.OperationsClient174}175// Wrapper methods routed to the internal client.176// Close closes the connection to the API service. The user should invoke this when177// the client is no longer required.178func (c *MetadataClient) Close() error {179 return c.internalClient.Close()180}181// setGoogleClientInfo sets the name and version of the application in182// the `x-goog-api-client` header passed on each request. Intended for183// use by Google-written clients.184func (c *MetadataClient) setGoogleClientInfo(keyval ...string) {185 c.internalClient.setGoogleClientInfo(keyval...)186}187// Connection returns a connection to the API service.188//189// Deprecated.190func (c *MetadataClient) Connection() *grpc.ClientConn {191 return c.internalClient.Connection()192}193// CreateMetadataStore initializes a MetadataStore, including allocation of resources.194func (c *MetadataClient) CreateMetadataStore(ctx context.Context, req *aiplatformpb.CreateMetadataStoreRequest, opts ...gax.CallOption) (*CreateMetadataStoreOperation, error) {195 return c.internalClient.CreateMetadataStore(ctx, req, opts...)196}197// CreateMetadataStoreOperation returns a new CreateMetadataStoreOperation from a given name.198// The name must be that of a previously created CreateMetadataStoreOperation, possibly from a different process.199func (c *MetadataClient) CreateMetadataStoreOperation(name string) *CreateMetadataStoreOperation {200 return c.internalClient.CreateMetadataStoreOperation(name)201}202// GetMetadataStore retrieves a specific MetadataStore.203func (c *MetadataClient) GetMetadataStore(ctx context.Context, req *aiplatformpb.GetMetadataStoreRequest, opts ...gax.CallOption) (*aiplatformpb.MetadataStore, error) {204 return c.internalClient.GetMetadataStore(ctx, req, opts...)205}206// ListMetadataStores lists MetadataStores for a Location.207func (c *MetadataClient) ListMetadataStores(ctx context.Context, req *aiplatformpb.ListMetadataStoresRequest, opts ...gax.CallOption) *MetadataStoreIterator {208 return c.internalClient.ListMetadataStores(ctx, req, opts...)209}210// DeleteMetadataStore deletes a single MetadataStore and all its child resources (Artifacts,211// Executions, and Contexts).212func (c *MetadataClient) DeleteMetadataStore(ctx context.Context, req *aiplatformpb.DeleteMetadataStoreRequest, opts ...gax.CallOption) (*DeleteMetadataStoreOperation, error) {213 return c.internalClient.DeleteMetadataStore(ctx, req, opts...)214}215// DeleteMetadataStoreOperation returns a new DeleteMetadataStoreOperation from a given name.216// The name must be that of a previously created DeleteMetadataStoreOperation, possibly from a different process.217func (c *MetadataClient) DeleteMetadataStoreOperation(name string) *DeleteMetadataStoreOperation {218 return c.internalClient.DeleteMetadataStoreOperation(name)219}220// CreateArtifact creates an Artifact associated with a MetadataStore.221func (c *MetadataClient) CreateArtifact(ctx context.Context, req *aiplatformpb.CreateArtifactRequest, opts ...gax.CallOption) (*aiplatformpb.Artifact, error) {222 return c.internalClient.CreateArtifact(ctx, req, opts...)223}224// GetArtifact retrieves a specific Artifact.225func (c *MetadataClient) GetArtifact(ctx context.Context, req *aiplatformpb.GetArtifactRequest, opts ...gax.CallOption) (*aiplatformpb.Artifact, error) {226 return c.internalClient.GetArtifact(ctx, req, opts...)227}228// ListArtifacts lists Artifacts in the MetadataStore.229func (c *MetadataClient) ListArtifacts(ctx context.Context, req *aiplatformpb.ListArtifactsRequest, opts ...gax.CallOption) *ArtifactIterator {230 return c.internalClient.ListArtifacts(ctx, req, opts...)231}232// UpdateArtifact updates a stored Artifact.233func (c *MetadataClient) UpdateArtifact(ctx context.Context, req *aiplatformpb.UpdateArtifactRequest, opts ...gax.CallOption) (*aiplatformpb.Artifact, error) {234 return c.internalClient.UpdateArtifact(ctx, req, opts...)235}236// DeleteArtifact deletes an Artifact.237func (c *MetadataClient) DeleteArtifact(ctx context.Context, req *aiplatformpb.DeleteArtifactRequest, opts ...gax.CallOption) (*DeleteArtifactOperation, error) {238 return c.internalClient.DeleteArtifact(ctx, req, opts...)239}240// DeleteArtifactOperation returns a new DeleteArtifactOperation from a given name.241// The name must be that of a previously created DeleteArtifactOperation, possibly from a different process.242func (c *MetadataClient) DeleteArtifactOperation(name string) *DeleteArtifactOperation {243 return c.internalClient.DeleteArtifactOperation(name)244}245// PurgeArtifacts purges Artifacts.246func (c *MetadataClient) PurgeArtifacts(ctx context.Context, req *aiplatformpb.PurgeArtifactsRequest, opts ...gax.CallOption) (*PurgeArtifactsOperation, error) {247 return c.internalClient.PurgeArtifacts(ctx, req, opts...)248}249// PurgeArtifactsOperation returns a new PurgeArtifactsOperation from a given name.250// The name must be that of a previously created PurgeArtifactsOperation, possibly from a different process.251func (c *MetadataClient) PurgeArtifactsOperation(name string) *PurgeArtifactsOperation {252 return c.internalClient.PurgeArtifactsOperation(name)253}254// CreateContext creates a Context associated with a MetadataStore.255func (c *MetadataClient) CreateContext(ctx context.Context, req *aiplatformpb.CreateContextRequest, opts ...gax.CallOption) (*aiplatformpb.Context, error) {256 return c.internalClient.CreateContext(ctx, req, opts...)257}258// GetContext retrieves a specific Context.259func (c *MetadataClient) GetContext(ctx context.Context, req *aiplatformpb.GetContextRequest, opts ...gax.CallOption) (*aiplatformpb.Context, error) {260 return c.internalClient.GetContext(ctx, req, opts...)261}262// ListContexts lists Contexts on the MetadataStore.263func (c *MetadataClient) ListContexts(ctx context.Context, req *aiplatformpb.ListContextsRequest, opts ...gax.CallOption) *ContextIterator {264 return c.internalClient.ListContexts(ctx, req, opts...)265}266// UpdateContext updates a stored Context.267func (c *MetadataClient) UpdateContext(ctx context.Context, req *aiplatformpb.UpdateContextRequest, opts ...gax.CallOption) (*aiplatformpb.Context, error) {268 return c.internalClient.UpdateContext(ctx, req, opts...)269}270// DeleteContext deletes a stored Context.271func (c *MetadataClient) DeleteContext(ctx context.Context, req *aiplatformpb.DeleteContextRequest, opts ...gax.CallOption) (*DeleteContextOperation, error) {272 return c.internalClient.DeleteContext(ctx, req, opts...)273}274// DeleteContextOperation returns a new DeleteContextOperation from a given name.275// The name must be that of a previously created DeleteContextOperation, possibly from a different process.276func (c *MetadataClient) DeleteContextOperation(name string) *DeleteContextOperation {277 return c.internalClient.DeleteContextOperation(name)278}279// PurgeContexts purges Contexts.280func (c *MetadataClient) PurgeContexts(ctx context.Context, req *aiplatformpb.PurgeContextsRequest, opts ...gax.CallOption) (*PurgeContextsOperation, error) {281 return c.internalClient.PurgeContexts(ctx, req, opts...)282}283// PurgeContextsOperation returns a new PurgeContextsOperation from a given name.284// The name must be that of a previously created PurgeContextsOperation, possibly from a different process.285func (c *MetadataClient) PurgeContextsOperation(name string) *PurgeContextsOperation {286 return c.internalClient.PurgeContextsOperation(name)287}288// AddContextArtifactsAndExecutions adds a set of Artifacts and Executions to a Context. If any of the289// Artifacts or Executions have already been added to a Context, they are290// simply skipped.291func (c *MetadataClient) AddContextArtifactsAndExecutions(ctx context.Context, req *aiplatformpb.AddContextArtifactsAndExecutionsRequest, opts ...gax.CallOption) (*aiplatformpb.AddContextArtifactsAndExecutionsResponse, error) {292 return c.internalClient.AddContextArtifactsAndExecutions(ctx, req, opts...)293}294// AddContextChildren adds a set of Contexts as children to a parent Context. If any of the295// child Contexts have already been added to the parent Context, they are296// simply skipped. If this call would create a cycle or cause any Context to297// have more than 10 parents, the request will fail with an INVALID_ARGUMENT298// error.299func (c *MetadataClient) AddContextChildren(ctx context.Context, req *aiplatformpb.AddContextChildrenRequest, opts ...gax.CallOption) (*aiplatformpb.AddContextChildrenResponse, error) {300 return c.internalClient.AddContextChildren(ctx, req, opts...)301}302// QueryContextLineageSubgraph retrieves Artifacts and Executions within the specified Context, connected303// by Event edges and returned as a LineageSubgraph.304func (c *MetadataClient) QueryContextLineageSubgraph(ctx context.Context, req *aiplatformpb.QueryContextLineageSubgraphRequest, opts ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error) {305 return c.internalClient.QueryContextLineageSubgraph(ctx, req, opts...)306}307// CreateExecution creates an Execution associated with a MetadataStore.308func (c *MetadataClient) CreateExecution(ctx context.Context, req *aiplatformpb.CreateExecutionRequest, opts ...gax.CallOption) (*aiplatformpb.Execution, error) {309 return c.internalClient.CreateExecution(ctx, req, opts...)310}311// GetExecution retrieves a specific Execution.312func (c *MetadataClient) GetExecution(ctx context.Context, req *aiplatformpb.GetExecutionRequest, opts ...gax.CallOption) (*aiplatformpb.Execution, error) {313 return c.internalClient.GetExecution(ctx, req, opts...)314}315// ListExecutions lists Executions in the MetadataStore.316func (c *MetadataClient) ListExecutions(ctx context.Context, req *aiplatformpb.ListExecutionsRequest, opts ...gax.CallOption) *ExecutionIterator {317 return c.internalClient.ListExecutions(ctx, req, opts...)318}319// UpdateExecution updates a stored Execution.320func (c *MetadataClient) UpdateExecution(ctx context.Context, req *aiplatformpb.UpdateExecutionRequest, opts ...gax.CallOption) (*aiplatformpb.Execution, error) {321 return c.internalClient.UpdateExecution(ctx, req, opts...)322}323// DeleteExecution deletes an Execution.324func (c *MetadataClient) DeleteExecution(ctx context.Context, req *aiplatformpb.DeleteExecutionRequest, opts ...gax.CallOption) (*DeleteExecutionOperation, error) {325 return c.internalClient.DeleteExecution(ctx, req, opts...)326}327// DeleteExecutionOperation returns a new DeleteExecutionOperation from a given name.328// The name must be that of a previously created DeleteExecutionOperation, possibly from a different process.329func (c *MetadataClient) DeleteExecutionOperation(name string) *DeleteExecutionOperation {330 return c.internalClient.DeleteExecutionOperation(name)331}332// PurgeExecutions purges Executions.333func (c *MetadataClient) PurgeExecutions(ctx context.Context, req *aiplatformpb.PurgeExecutionsRequest, opts ...gax.CallOption) (*PurgeExecutionsOperation, error) {334 return c.internalClient.PurgeExecutions(ctx, req, opts...)335}336// PurgeExecutionsOperation returns a new PurgeExecutionsOperation from a given name.337// The name must be that of a previously created PurgeExecutionsOperation, possibly from a different process.338func (c *MetadataClient) PurgeExecutionsOperation(name string) *PurgeExecutionsOperation {339 return c.internalClient.PurgeExecutionsOperation(name)340}341// AddExecutionEvents adds Events to the specified Execution. An Event indicates whether an342// Artifact was used as an input or output for an Execution. If an Event343// already exists between the Execution and the Artifact, the Event is344// skipped.345func (c *MetadataClient) AddExecutionEvents(ctx context.Context, req *aiplatformpb.AddExecutionEventsRequest, opts ...gax.CallOption) (*aiplatformpb.AddExecutionEventsResponse, error) {346 return c.internalClient.AddExecutionEvents(ctx, req, opts...)347}348// QueryExecutionInputsAndOutputs obtains the set of input and output Artifacts for this Execution, in the349// form of LineageSubgraph that also contains the Execution and connecting350// Events.351func (c *MetadataClient) QueryExecutionInputsAndOutputs(ctx context.Context, req *aiplatformpb.QueryExecutionInputsAndOutputsRequest, opts ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error) {352 return c.internalClient.QueryExecutionInputsAndOutputs(ctx, req, opts...)353}354// CreateMetadataSchema creates a MetadataSchema.355func (c *MetadataClient) CreateMetadataSchema(ctx context.Context, req *aiplatformpb.CreateMetadataSchemaRequest, opts ...gax.CallOption) (*aiplatformpb.MetadataSchema, error) {356 return c.internalClient.CreateMetadataSchema(ctx, req, opts...)357}358// GetMetadataSchema retrieves a specific MetadataSchema.359func (c *MetadataClient) GetMetadataSchema(ctx context.Context, req *aiplatformpb.GetMetadataSchemaRequest, opts ...gax.CallOption) (*aiplatformpb.MetadataSchema, error) {360 return c.internalClient.GetMetadataSchema(ctx, req, opts...)361}362// ListMetadataSchemas lists MetadataSchemas.363func (c *MetadataClient) ListMetadataSchemas(ctx context.Context, req *aiplatformpb.ListMetadataSchemasRequest, opts ...gax.CallOption) *MetadataSchemaIterator {364 return c.internalClient.ListMetadataSchemas(ctx, req, opts...)365}366// QueryArtifactLineageSubgraph retrieves lineage of an Artifact represented through Artifacts and367// Executions connected by Event edges and returned as a LineageSubgraph.368func (c *MetadataClient) QueryArtifactLineageSubgraph(ctx context.Context, req *aiplatformpb.QueryArtifactLineageSubgraphRequest, opts ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error) {369 return c.internalClient.QueryArtifactLineageSubgraph(ctx, req, opts...)370}371// metadataGRPCClient is a client for interacting with Vertex AI API over gRPC transport.372//373// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.374type metadataGRPCClient struct {375 // Connection pool of gRPC connections to the service.376 connPool gtransport.ConnPool377 // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE378 disableDeadlines bool379 // Points back to the CallOptions field of the containing MetadataClient380 CallOptions **MetadataCallOptions381 // The gRPC API client.382 metadataClient aiplatformpb.MetadataServiceClient383 // LROClient is used internally to handle long-running operations.384 // It is exposed so that its CallOptions can be modified if required.385 // Users should not Close this client.386 LROClient **lroauto.OperationsClient387 // The x-goog-* metadata to be sent with each request.388 xGoogMetadata metadata.MD389}390// NewMetadataClient creates a new metadata service client based on gRPC.391// The returned client must be Closed when it is done being used to clean up its underlying connections.392//393// Service for reading and writing metadata entries.394func NewMetadataClient(ctx context.Context, opts ...option.ClientOption) (*MetadataClient, error) {395 clientOpts := defaultMetadataGRPCClientOptions()396 if newMetadataClientHook != nil {397 hookOpts, err := newMetadataClientHook(ctx, clientHookParams{})398 if err != nil {399 return nil, err400 }401 clientOpts = append(clientOpts, hookOpts...)402 }403 disableDeadlines, err := checkDisableDeadlines()404 if err != nil {405 return nil, err406 }407 connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...)408 if err != nil {409 return nil, err410 }411 client := MetadataClient{CallOptions: defaultMetadataCallOptions()}412 c := &metadataGRPCClient{413 connPool: connPool,414 disableDeadlines: disableDeadlines,415 metadataClient: aiplatformpb.NewMetadataServiceClient(connPool),416 CallOptions: &client.CallOptions,417 }418 c.setGoogleClientInfo()419 client.internalClient = c420 client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool))421 if err != nil {422 // This error "should not happen", since we are just reusing old connection pool423 // and never actually need to dial.424 // If this does happen, we could leak connp. However, we cannot close conn:425 // If the user invoked the constructor with option.WithGRPCConn,426 // we would close a connection that's still in use.427 // TODO: investigate error conditions.428 return nil, err429 }430 c.LROClient = &client.LROClient431 return &client, nil432}433// Connection returns a connection to the API service.434//435// Deprecated.436func (c *metadataGRPCClient) Connection() *grpc.ClientConn {437 return c.connPool.Conn()438}439// setGoogleClientInfo sets the name and version of the application in440// the `x-goog-api-client` header passed on each request. Intended for441// use by Google-written clients.442func (c *metadataGRPCClient) setGoogleClientInfo(keyval ...string) {443 kv := append([]string{"gl-go", versionGo()}, keyval...)444 kv = append(kv, "gapic", versionClient, "gax", gax.Version, "grpc", grpc.Version)445 c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))446}447// Close closes the connection to the API service. The user should invoke this when448// the client is no longer required.449func (c *metadataGRPCClient) Close() error {450 return c.connPool.Close()451}452func (c *metadataGRPCClient) CreateMetadataStore(ctx context.Context, req *aiplatformpb.CreateMetadataStoreRequest, opts ...gax.CallOption) (*CreateMetadataStoreOperation, error) {453 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))454 ctx = insertMetadata(ctx, c.xGoogMetadata, md)455 opts = append((*c.CallOptions).CreateMetadataStore[0:len((*c.CallOptions).CreateMetadataStore):len((*c.CallOptions).CreateMetadataStore)], opts...)456 var resp *longrunningpb.Operation457 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {458 var err error459 resp, err = c.metadataClient.CreateMetadataStore(ctx, req, settings.GRPC...)460 return err461 }, opts...)462 if err != nil {463 return nil, err464 }465 return &CreateMetadataStoreOperation{466 lro: longrunning.InternalNewOperation(*c.LROClient, resp),467 }, nil468}469func (c *metadataGRPCClient) GetMetadataStore(ctx context.Context, req *aiplatformpb.GetMetadataStoreRequest, opts ...gax.CallOption) (*aiplatformpb.MetadataStore, error) {470 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))471 ctx = insertMetadata(ctx, c.xGoogMetadata, md)472 opts = append((*c.CallOptions).GetMetadataStore[0:len((*c.CallOptions).GetMetadataStore):len((*c.CallOptions).GetMetadataStore)], opts...)473 var resp *aiplatformpb.MetadataStore474 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {475 var err error476 resp, err = c.metadataClient.GetMetadataStore(ctx, req, settings.GRPC...)477 return err478 }, opts...)479 if err != nil {480 return nil, err481 }482 return resp, nil483}484func (c *metadataGRPCClient) ListMetadataStores(ctx context.Context, req *aiplatformpb.ListMetadataStoresRequest, opts ...gax.CallOption) *MetadataStoreIterator {485 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))486 ctx = insertMetadata(ctx, c.xGoogMetadata, md)487 opts = append((*c.CallOptions).ListMetadataStores[0:len((*c.CallOptions).ListMetadataStores):len((*c.CallOptions).ListMetadataStores)], opts...)488 it := &MetadataStoreIterator{}489 req = proto.Clone(req).(*aiplatformpb.ListMetadataStoresRequest)490 it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.MetadataStore, string, error) {491 resp := &aiplatformpb.ListMetadataStoresResponse{}492 if pageToken != "" {493 req.PageToken = pageToken494 }495 if pageSize > math.MaxInt32 {496 req.PageSize = math.MaxInt32497 } else if pageSize != 0 {498 req.PageSize = int32(pageSize)499 }500 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {501 var err error502 resp, err = c.metadataClient.ListMetadataStores(ctx, req, settings.GRPC...)503 return err504 }, opts...)505 if err != nil {506 return nil, "", err507 }508 it.Response = resp509 return resp.GetMetadataStores(), resp.GetNextPageToken(), nil510 }511 fetch := func(pageSize int, pageToken string) (string, error) {512 items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)513 if err != nil {514 return "", err515 }516 it.items = append(it.items, items...)517 return nextPageToken, nil518 }519 it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)520 it.pageInfo.MaxSize = int(req.GetPageSize())521 it.pageInfo.Token = req.GetPageToken()522 return it523}524func (c *metadataGRPCClient) DeleteMetadataStore(ctx context.Context, req *aiplatformpb.DeleteMetadataStoreRequest, opts ...gax.CallOption) (*DeleteMetadataStoreOperation, error) {525 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))526 ctx = insertMetadata(ctx, c.xGoogMetadata, md)527 opts = append((*c.CallOptions).DeleteMetadataStore[0:len((*c.CallOptions).DeleteMetadataStore):len((*c.CallOptions).DeleteMetadataStore)], opts...)528 var resp *longrunningpb.Operation529 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {530 var err error531 resp, err = c.metadataClient.DeleteMetadataStore(ctx, req, settings.GRPC...)532 return err533 }, opts...)534 if err != nil {535 return nil, err536 }537 return &DeleteMetadataStoreOperation{538 lro: longrunning.InternalNewOperation(*c.LROClient, resp),539 }, nil540}541func (c *metadataGRPCClient) CreateArtifact(ctx context.Context, req *aiplatformpb.CreateArtifactRequest, opts ...gax.CallOption) (*aiplatformpb.Artifact, error) {542 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))543 ctx = insertMetadata(ctx, c.xGoogMetadata, md)544 opts = append((*c.CallOptions).CreateArtifact[0:len((*c.CallOptions).CreateArtifact):len((*c.CallOptions).CreateArtifact)], opts...)545 var resp *aiplatformpb.Artifact546 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {547 var err error548 resp, err = c.metadataClient.CreateArtifact(ctx, req, settings.GRPC...)549 return err550 }, opts...)551 if err != nil {552 return nil, err553 }554 return resp, nil555}556func (c *metadataGRPCClient) GetArtifact(ctx context.Context, req *aiplatformpb.GetArtifactRequest, opts ...gax.CallOption) (*aiplatformpb.Artifact, error) {557 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))558 ctx = insertMetadata(ctx, c.xGoogMetadata, md)559 opts = append((*c.CallOptions).GetArtifact[0:len((*c.CallOptions).GetArtifact):len((*c.CallOptions).GetArtifact)], opts...)560 var resp *aiplatformpb.Artifact561 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {562 var err error563 resp, err = c.metadataClient.GetArtifact(ctx, req, settings.GRPC...)564 return err565 }, opts...)566 if err != nil {567 return nil, err568 }569 return resp, nil570}571func (c *metadataGRPCClient) ListArtifacts(ctx context.Context, req *aiplatformpb.ListArtifactsRequest, opts ...gax.CallOption) *ArtifactIterator {572 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))573 ctx = insertMetadata(ctx, c.xGoogMetadata, md)574 opts = append((*c.CallOptions).ListArtifacts[0:len((*c.CallOptions).ListArtifacts):len((*c.CallOptions).ListArtifacts)], opts...)575 it := &ArtifactIterator{}576 req = proto.Clone(req).(*aiplatformpb.ListArtifactsRequest)577 it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Artifact, string, error) {578 resp := &aiplatformpb.ListArtifactsResponse{}579 if pageToken != "" {580 req.PageToken = pageToken581 }582 if pageSize > math.MaxInt32 {583 req.PageSize = math.MaxInt32584 } else if pageSize != 0 {585 req.PageSize = int32(pageSize)586 }587 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {588 var err error589 resp, err = c.metadataClient.ListArtifacts(ctx, req, settings.GRPC...)590 return err591 }, opts...)592 if err != nil {593 return nil, "", err594 }595 it.Response = resp596 return resp.GetArtifacts(), resp.GetNextPageToken(), nil597 }598 fetch := func(pageSize int, pageToken string) (string, error) {599 items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)600 if err != nil {601 return "", err602 }603 it.items = append(it.items, items...)604 return nextPageToken, nil605 }606 it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)607 it.pageInfo.MaxSize = int(req.GetPageSize())608 it.pageInfo.Token = req.GetPageToken()609 return it610}611func (c *metadataGRPCClient) UpdateArtifact(ctx context.Context, req *aiplatformpb.UpdateArtifactRequest, opts ...gax.CallOption) (*aiplatformpb.Artifact, error) {612 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "artifact.name", url.QueryEscape(req.GetArtifact().GetName())))613 ctx = insertMetadata(ctx, c.xGoogMetadata, md)614 opts = append((*c.CallOptions).UpdateArtifact[0:len((*c.CallOptions).UpdateArtifact):len((*c.CallOptions).UpdateArtifact)], opts...)615 var resp *aiplatformpb.Artifact616 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {617 var err error618 resp, err = c.metadataClient.UpdateArtifact(ctx, req, settings.GRPC...)619 return err620 }, opts...)621 if err != nil {622 return nil, err623 }624 return resp, nil625}626func (c *metadataGRPCClient) DeleteArtifact(ctx context.Context, req *aiplatformpb.DeleteArtifactRequest, opts ...gax.CallOption) (*DeleteArtifactOperation, error) {627 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))628 ctx = insertMetadata(ctx, c.xGoogMetadata, md)629 opts = append((*c.CallOptions).DeleteArtifact[0:len((*c.CallOptions).DeleteArtifact):len((*c.CallOptions).DeleteArtifact)], opts...)630 var resp *longrunningpb.Operation631 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {632 var err error633 resp, err = c.metadataClient.DeleteArtifact(ctx, req, settings.GRPC...)634 return err635 }, opts...)636 if err != nil {637 return nil, err638 }639 return &DeleteArtifactOperation{640 lro: longrunning.InternalNewOperation(*c.LROClient, resp),641 }, nil642}643func (c *metadataGRPCClient) PurgeArtifacts(ctx context.Context, req *aiplatformpb.PurgeArtifactsRequest, opts ...gax.CallOption) (*PurgeArtifactsOperation, error) {644 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))645 ctx = insertMetadata(ctx, c.xGoogMetadata, md)646 opts = append((*c.CallOptions).PurgeArtifacts[0:len((*c.CallOptions).PurgeArtifacts):len((*c.CallOptions).PurgeArtifacts)], opts...)647 var resp *longrunningpb.Operation648 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {649 var err error650 resp, err = c.metadataClient.PurgeArtifacts(ctx, req, settings.GRPC...)651 return err652 }, opts...)653 if err != nil {654 return nil, err655 }656 return &PurgeArtifactsOperation{657 lro: longrunning.InternalNewOperation(*c.LROClient, resp),658 }, nil659}660func (c *metadataGRPCClient) CreateContext(ctx context.Context, req *aiplatformpb.CreateContextRequest, opts ...gax.CallOption) (*aiplatformpb.Context, error) {661 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))662 ctx = insertMetadata(ctx, c.xGoogMetadata, md)663 opts = append((*c.CallOptions).CreateContext[0:len((*c.CallOptions).CreateContext):len((*c.CallOptions).CreateContext)], opts...)664 var resp *aiplatformpb.Context665 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {666 var err error667 resp, err = c.metadataClient.CreateContext(ctx, req, settings.GRPC...)668 return err669 }, opts...)670 if err != nil {671 return nil, err672 }673 return resp, nil674}675func (c *metadataGRPCClient) GetContext(ctx context.Context, req *aiplatformpb.GetContextRequest, opts ...gax.CallOption) (*aiplatformpb.Context, error) {676 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))677 ctx = insertMetadata(ctx, c.xGoogMetadata, md)678 opts = append((*c.CallOptions).GetContext[0:len((*c.CallOptions).GetContext):len((*c.CallOptions).GetContext)], opts...)679 var resp *aiplatformpb.Context680 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {681 var err error682 resp, err = c.metadataClient.GetContext(ctx, req, settings.GRPC...)683 return err684 }, opts...)685 if err != nil {686 return nil, err687 }688 return resp, nil689}690func (c *metadataGRPCClient) ListContexts(ctx context.Context, req *aiplatformpb.ListContextsRequest, opts ...gax.CallOption) *ContextIterator {691 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))692 ctx = insertMetadata(ctx, c.xGoogMetadata, md)693 opts = append((*c.CallOptions).ListContexts[0:len((*c.CallOptions).ListContexts):len((*c.CallOptions).ListContexts)], opts...)694 it := &ContextIterator{}695 req = proto.Clone(req).(*aiplatformpb.ListContextsRequest)696 it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Context, string, error) {697 resp := &aiplatformpb.ListContextsResponse{}698 if pageToken != "" {699 req.PageToken = pageToken700 }701 if pageSize > math.MaxInt32 {702 req.PageSize = math.MaxInt32703 } else if pageSize != 0 {704 req.PageSize = int32(pageSize)705 }706 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {707 var err error708 resp, err = c.metadataClient.ListContexts(ctx, req, settings.GRPC...)709 return err710 }, opts...)711 if err != nil {712 return nil, "", err713 }714 it.Response = resp715 return resp.GetContexts(), resp.GetNextPageToken(), nil716 }717 fetch := func(pageSize int, pageToken string) (string, error) {718 items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)719 if err != nil {720 return "", err721 }722 it.items = append(it.items, items...)723 return nextPageToken, nil724 }725 it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)726 it.pageInfo.MaxSize = int(req.GetPageSize())727 it.pageInfo.Token = req.GetPageToken()728 return it729}730func (c *metadataGRPCClient) UpdateContext(ctx context.Context, req *aiplatformpb.UpdateContextRequest, opts ...gax.CallOption) (*aiplatformpb.Context, error) {731 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "context.name", url.QueryEscape(req.GetContext().GetName())))732 ctx = insertMetadata(ctx, c.xGoogMetadata, md)733 opts = append((*c.CallOptions).UpdateContext[0:len((*c.CallOptions).UpdateContext):len((*c.CallOptions).UpdateContext)], opts...)734 var resp *aiplatformpb.Context735 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {736 var err error737 resp, err = c.metadataClient.UpdateContext(ctx, req, settings.GRPC...)738 return err739 }, opts...)740 if err != nil {741 return nil, err742 }743 return resp, nil744}745func (c *metadataGRPCClient) DeleteContext(ctx context.Context, req *aiplatformpb.DeleteContextRequest, opts ...gax.CallOption) (*DeleteContextOperation, error) {746 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))747 ctx = insertMetadata(ctx, c.xGoogMetadata, md)748 opts = append((*c.CallOptions).DeleteContext[0:len((*c.CallOptions).DeleteContext):len((*c.CallOptions).DeleteContext)], opts...)749 var resp *longrunningpb.Operation750 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {751 var err error752 resp, err = c.metadataClient.DeleteContext(ctx, req, settings.GRPC...)753 return err754 }, opts...)755 if err != nil {756 return nil, err757 }758 return &DeleteContextOperation{759 lro: longrunning.InternalNewOperation(*c.LROClient, resp),760 }, nil761}762func (c *metadataGRPCClient) PurgeContexts(ctx context.Context, req *aiplatformpb.PurgeContextsRequest, opts ...gax.CallOption) (*PurgeContextsOperation, error) {763 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))764 ctx = insertMetadata(ctx, c.xGoogMetadata, md)765 opts = append((*c.CallOptions).PurgeContexts[0:len((*c.CallOptions).PurgeContexts):len((*c.CallOptions).PurgeContexts)], opts...)766 var resp *longrunningpb.Operation767 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {768 var err error769 resp, err = c.metadataClient.PurgeContexts(ctx, req, settings.GRPC...)770 return err771 }, opts...)772 if err != nil {773 return nil, err774 }775 return &PurgeContextsOperation{776 lro: longrunning.InternalNewOperation(*c.LROClient, resp),777 }, nil778}779func (c *metadataGRPCClient) AddContextArtifactsAndExecutions(ctx context.Context, req *aiplatformpb.AddContextArtifactsAndExecutionsRequest, opts ...gax.CallOption) (*aiplatformpb.AddContextArtifactsAndExecutionsResponse, error) {780 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "context", url.QueryEscape(req.GetContext())))781 ctx = insertMetadata(ctx, c.xGoogMetadata, md)782 opts = append((*c.CallOptions).AddContextArtifactsAndExecutions[0:len((*c.CallOptions).AddContextArtifactsAndExecutions):len((*c.CallOptions).AddContextArtifactsAndExecutions)], opts...)783 var resp *aiplatformpb.AddContextArtifactsAndExecutionsResponse784 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {785 var err error786 resp, err = c.metadataClient.AddContextArtifactsAndExecutions(ctx, req, settings.GRPC...)787 return err788 }, opts...)789 if err != nil {790 return nil, err791 }792 return resp, nil793}794func (c *metadataGRPCClient) AddContextChildren(ctx context.Context, req *aiplatformpb.AddContextChildrenRequest, opts ...gax.CallOption) (*aiplatformpb.AddContextChildrenResponse, error) {795 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "context", url.QueryEscape(req.GetContext())))796 ctx = insertMetadata(ctx, c.xGoogMetadata, md)797 opts = append((*c.CallOptions).AddContextChildren[0:len((*c.CallOptions).AddContextChildren):len((*c.CallOptions).AddContextChildren)], opts...)798 var resp *aiplatformpb.AddContextChildrenResponse799 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {800 var err error801 resp, err = c.metadataClient.AddContextChildren(ctx, req, settings.GRPC...)802 return err803 }, opts...)804 if err != nil {805 return nil, err806 }807 return resp, nil808}809func (c *metadataGRPCClient) QueryContextLineageSubgraph(ctx context.Context, req *aiplatformpb.QueryContextLineageSubgraphRequest, opts ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error) {810 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "context", url.QueryEscape(req.GetContext())))811 ctx = insertMetadata(ctx, c.xGoogMetadata, md)812 opts = append((*c.CallOptions).QueryContextLineageSubgraph[0:len((*c.CallOptions).QueryContextLineageSubgraph):len((*c.CallOptions).QueryContextLineageSubgraph)], opts...)813 var resp *aiplatformpb.LineageSubgraph814 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {815 var err error816 resp, err = c.metadataClient.QueryContextLineageSubgraph(ctx, req, settings.GRPC...)817 return err818 }, opts...)819 if err != nil {820 return nil, err821 }822 return resp, nil823}824func (c *metadataGRPCClient) CreateExecution(ctx context.Context, req *aiplatformpb.CreateExecutionRequest, opts ...gax.CallOption) (*aiplatformpb.Execution, error) {825 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))826 ctx = insertMetadata(ctx, c.xGoogMetadata, md)827 opts = append((*c.CallOptions).CreateExecution[0:len((*c.CallOptions).CreateExecution):len((*c.CallOptions).CreateExecution)], opts...)828 var resp *aiplatformpb.Execution829 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {830 var err error831 resp, err = c.metadataClient.CreateExecution(ctx, req, settings.GRPC...)832 return err833 }, opts...)834 if err != nil {835 return nil, err836 }837 return resp, nil838}839func (c *metadataGRPCClient) GetExecution(ctx context.Context, req *aiplatformpb.GetExecutionRequest, opts ...gax.CallOption) (*aiplatformpb.Execution, error) {840 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))841 ctx = insertMetadata(ctx, c.xGoogMetadata, md)842 opts = append((*c.CallOptions).GetExecution[0:len((*c.CallOptions).GetExecution):len((*c.CallOptions).GetExecution)], opts...)843 var resp *aiplatformpb.Execution844 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {845 var err error846 resp, err = c.metadataClient.GetExecution(ctx, req, settings.GRPC...)847 return err848 }, opts...)849 if err != nil {850 return nil, err851 }852 return resp, nil853}854func (c *metadataGRPCClient) ListExecutions(ctx context.Context, req *aiplatformpb.ListExecutionsRequest, opts ...gax.CallOption) *ExecutionIterator {855 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))856 ctx = insertMetadata(ctx, c.xGoogMetadata, md)857 opts = append((*c.CallOptions).ListExecutions[0:len((*c.CallOptions).ListExecutions):len((*c.CallOptions).ListExecutions)], opts...)858 it := &ExecutionIterator{}859 req = proto.Clone(req).(*aiplatformpb.ListExecutionsRequest)860 it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Execution, string, error) {861 resp := &aiplatformpb.ListExecutionsResponse{}862 if pageToken != "" {863 req.PageToken = pageToken864 }865 if pageSize > math.MaxInt32 {866 req.PageSize = math.MaxInt32867 } else if pageSize != 0 {868 req.PageSize = int32(pageSize)869 }870 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {871 var err error872 resp, err = c.metadataClient.ListExecutions(ctx, req, settings.GRPC...)873 return err874 }, opts...)875 if err != nil {876 return nil, "", err877 }878 it.Response = resp879 return resp.GetExecutions(), resp.GetNextPageToken(), nil880 }881 fetch := func(pageSize int, pageToken string) (string, error) {882 items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)883 if err != nil {884 return "", err885 }886 it.items = append(it.items, items...)887 return nextPageToken, nil888 }889 it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)890 it.pageInfo.MaxSize = int(req.GetPageSize())891 it.pageInfo.Token = req.GetPageToken()892 return it893}894func (c *metadataGRPCClient) UpdateExecution(ctx context.Context, req *aiplatformpb.UpdateExecutionRequest, opts ...gax.CallOption) (*aiplatformpb.Execution, error) {895 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "execution.name", url.QueryEscape(req.GetExecution().GetName())))896 ctx = insertMetadata(ctx, c.xGoogMetadata, md)897 opts = append((*c.CallOptions).UpdateExecution[0:len((*c.CallOptions).UpdateExecution):len((*c.CallOptions).UpdateExecution)], opts...)898 var resp *aiplatformpb.Execution899 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {900 var err error901 resp, err = c.metadataClient.UpdateExecution(ctx, req, settings.GRPC...)902 return err903 }, opts...)904 if err != nil {905 return nil, err906 }907 return resp, nil908}909func (c *metadataGRPCClient) DeleteExecution(ctx context.Context, req *aiplatformpb.DeleteExecutionRequest, opts ...gax.CallOption) (*DeleteExecutionOperation, error) {910 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))911 ctx = insertMetadata(ctx, c.xGoogMetadata, md)912 opts = append((*c.CallOptions).DeleteExecution[0:len((*c.CallOptions).DeleteExecution):len((*c.CallOptions).DeleteExecution)], opts...)913 var resp *longrunningpb.Operation914 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {915 var err error916 resp, err = c.metadataClient.DeleteExecution(ctx, req, settings.GRPC...)917 return err918 }, opts...)919 if err != nil {920 return nil, err921 }922 return &DeleteExecutionOperation{923 lro: longrunning.InternalNewOperation(*c.LROClient, resp),924 }, nil925}926func (c *metadataGRPCClient) PurgeExecutions(ctx context.Context, req *aiplatformpb.PurgeExecutionsRequest, opts ...gax.CallOption) (*PurgeExecutionsOperation, error) {927 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))928 ctx = insertMetadata(ctx, c.xGoogMetadata, md)929 opts = append((*c.CallOptions).PurgeExecutions[0:len((*c.CallOptions).PurgeExecutions):len((*c.CallOptions).PurgeExecutions)], opts...)930 var resp *longrunningpb.Operation931 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {932 var err error933 resp, err = c.metadataClient.PurgeExecutions(ctx, req, settings.GRPC...)934 return err935 }, opts...)936 if err != nil {937 return nil, err938 }939 return &PurgeExecutionsOperation{940 lro: longrunning.InternalNewOperation(*c.LROClient, resp),941 }, nil942}943func (c *metadataGRPCClient) AddExecutionEvents(ctx context.Context, req *aiplatformpb.AddExecutionEventsRequest, opts ...gax.CallOption) (*aiplatformpb.AddExecutionEventsResponse, error) {944 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "execution", url.QueryEscape(req.GetExecution())))945 ctx = insertMetadata(ctx, c.xGoogMetadata, md)946 opts = append((*c.CallOptions).AddExecutionEvents[0:len((*c.CallOptions).AddExecutionEvents):len((*c.CallOptions).AddExecutionEvents)], opts...)947 var resp *aiplatformpb.AddExecutionEventsResponse948 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {949 var err error950 resp, err = c.metadataClient.AddExecutionEvents(ctx, req, settings.GRPC...)951 return err952 }, opts...)953 if err != nil {954 return nil, err955 }956 return resp, nil957}958func (c *metadataGRPCClient) QueryExecutionInputsAndOutputs(ctx context.Context, req *aiplatformpb.QueryExecutionInputsAndOutputsRequest, opts ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error) {959 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "execution", url.QueryEscape(req.GetExecution())))960 ctx = insertMetadata(ctx, c.xGoogMetadata, md)961 opts = append((*c.CallOptions).QueryExecutionInputsAndOutputs[0:len((*c.CallOptions).QueryExecutionInputsAndOutputs):len((*c.CallOptions).QueryExecutionInputsAndOutputs)], opts...)962 var resp *aiplatformpb.LineageSubgraph963 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {964 var err error965 resp, err = c.metadataClient.QueryExecutionInputsAndOutputs(ctx, req, settings.GRPC...)966 return err967 }, opts...)968 if err != nil {969 return nil, err970 }971 return resp, nil972}973func (c *metadataGRPCClient) CreateMetadataSchema(ctx context.Context, req *aiplatformpb.CreateMetadataSchemaRequest, opts ...gax.CallOption) (*aiplatformpb.MetadataSchema, error) {974 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))975 ctx = insertMetadata(ctx, c.xGoogMetadata, md)976 opts = append((*c.CallOptions).CreateMetadataSchema[0:len((*c.CallOptions).CreateMetadataSchema):len((*c.CallOptions).CreateMetadataSchema)], opts...)977 var resp *aiplatformpb.MetadataSchema978 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {979 var err error980 resp, err = c.metadataClient.CreateMetadataSchema(ctx, req, settings.GRPC...)981 return err982 }, opts...)983 if err != nil {984 return nil, err985 }986 return resp, nil987}988func (c *metadataGRPCClient) GetMetadataSchema(ctx context.Context, req *aiplatformpb.GetMetadataSchemaRequest, opts ...gax.CallOption) (*aiplatformpb.MetadataSchema, error) {989 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))990 ctx = insertMetadata(ctx, c.xGoogMetadata, md)991 opts = append((*c.CallOptions).GetMetadataSchema[0:len((*c.CallOptions).GetMetadataSchema):len((*c.CallOptions).GetMetadataSchema)], opts...)992 var resp *aiplatformpb.MetadataSchema993 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {994 var err error995 resp, err = c.metadataClient.GetMetadataSchema(ctx, req, settings.GRPC...)996 return err997 }, opts...)998 if err != nil {999 return nil, err1000 }1001 return resp, nil1002}1003func (c *metadataGRPCClient) ListMetadataSchemas(ctx context.Context, req *aiplatformpb.ListMetadataSchemasRequest, opts ...gax.CallOption) *MetadataSchemaIterator {1004 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))1005 ctx = insertMetadata(ctx, c.xGoogMetadata, md)1006 opts = append((*c.CallOptions).ListMetadataSchemas[0:len((*c.CallOptions).ListMetadataSchemas):len((*c.CallOptions).ListMetadataSchemas)], opts...)1007 it := &MetadataSchemaIterator{}1008 req = proto.Clone(req).(*aiplatformpb.ListMetadataSchemasRequest)1009 it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.MetadataSchema, string, error) {1010 resp := &aiplatformpb.ListMetadataSchemasResponse{}1011 if pageToken != "" {1012 req.PageToken = pageToken1013 }1014 if pageSize > math.MaxInt32 {1015 req.PageSize = math.MaxInt321016 } else if pageSize != 0 {1017 req.PageSize = int32(pageSize)1018 }1019 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {1020 var err error1021 resp, err = c.metadataClient.ListMetadataSchemas(ctx, req, settings.GRPC...)1022 return err1023 }, opts...)1024 if err != nil {1025 return nil, "", err1026 }1027 it.Response = resp1028 return resp.GetMetadataSchemas(), resp.GetNextPageToken(), nil1029 }1030 fetch := func(pageSize int, pageToken string) (string, error) {1031 items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)1032 if err != nil {1033 return "", err1034 }1035 it.items = append(it.items, items...)1036 return nextPageToken, nil1037 }1038 it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)1039 it.pageInfo.MaxSize = int(req.GetPageSize())1040 it.pageInfo.Token = req.GetPageToken()1041 return it1042}1043func (c *metadataGRPCClient) QueryArtifactLineageSubgraph(ctx context.Context, req *aiplatformpb.QueryArtifactLineageSubgraphRequest, opts ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error) {1044 md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "artifact", url.QueryEscape(req.GetArtifact())))1045 ctx = insertMetadata(ctx, c.xGoogMetadata, md)1046 opts = append((*c.CallOptions).QueryArtifactLineageSubgraph[0:len((*c.CallOptions).QueryArtifactLineageSubgraph):len((*c.CallOptions).QueryArtifactLineageSubgraph)], opts...)1047 var resp *aiplatformpb.LineageSubgraph1048 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {1049 var err error1050 resp, err = c.metadataClient.QueryArtifactLineageSubgraph(ctx, req, settings.GRPC...)1051 return err1052 }, opts...)1053 if err != nil {1054 return nil, err1055 }1056 return resp, nil1057}1058// CreateMetadataStoreOperation manages a long-running operation from CreateMetadataStore.1059type CreateMetadataStoreOperation struct {1060 lro *longrunning.Operation1061}1062// CreateMetadataStoreOperation returns a new CreateMetadataStoreOperation from a given name.1063// The name must be that of a previously created CreateMetadataStoreOperation, possibly from a different process.1064func (c *metadataGRPCClient) CreateMetadataStoreOperation(name string) *CreateMetadataStoreOperation {1065 return &CreateMetadataStoreOperation{1066 lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}),1067 }1068}1069// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.1070//1071// See documentation of Poll for error-handling information.1072func (op *CreateMetadataStoreOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.MetadataStore, error) {1073 var resp aiplatformpb.MetadataStore1074 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {1075 return nil, err1076 }1077 return &resp, nil1078}1079// Poll fetches the latest state of the long-running operation.1080//1081// Poll also fetches the latest metadata, which can be retrieved by Metadata.1082//1083// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and1084// the operation has completed with failure, the error is returned and op.Done will return true.1085// If Poll succeeds and the operation has completed successfully,1086// op.Done will return true, and the response of the operation is returned.1087// If Poll succeeds and the operation has not completed, the returned response and error are both nil.1088func (op *CreateMetadataStoreOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.MetadataStore, error) {1089 var resp aiplatformpb.MetadataStore1090 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {1091 return nil, err1092 }1093 if !op.Done() {1094 return nil, nil1095 }1096 return &resp, nil1097}1098// Metadata returns metadata associated with the long-running operation.1099// Metadata itself does not contact the server, but Poll does.1100// To get the latest metadata, call this method after a successful call to Poll.1101// If the metadata is not available, the returned metadata and error are both nil.1102func (op *CreateMetadataStoreOperation) Metadata() (*aiplatformpb.CreateMetadataStoreOperationMetadata, error) {1103 var meta aiplatformpb.CreateMetadataStoreOperationMetadata1104 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {1105 return nil, nil1106 } else if err != nil {1107 return nil, err1108 }1109 return &meta, nil1110}1111// Done reports whether the long-running operation has completed.1112func (op *CreateMetadataStoreOperation) Done() bool {1113 return op.lro.Done()1114}1115// Name returns the name of the long-running operation.1116// The name is assigned by the server and is unique within the service from which the operation is created.1117func (op *CreateMetadataStoreOperation) Name() string {1118 return op.lro.Name()1119}1120// DeleteArtifactOperation manages a long-running operation from DeleteArtifact.1121type DeleteArtifactOperation struct {1122 lro *longrunning.Operation1123}1124// DeleteArtifactOperation returns a new DeleteArtifactOperation from a given name.1125// The name must be that of a previously created DeleteArtifactOperation, possibly from a different process.1126func (c *metadataGRPCClient) DeleteArtifactOperation(name string) *DeleteArtifactOperation {1127 return &DeleteArtifactOperation{1128 lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}),1129 }1130}1131// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.1132//1133// See documentation of Poll for error-handling information.1134func (op *DeleteArtifactOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {1135 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)1136}1137// Poll fetches the latest state of the long-running operation.1138//1139// Poll also fetches the latest metadata, which can be retrieved by Metadata.1140//1141// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and1142// the operation has completed with failure, the error is returned and op.Done will return true.1143// If Poll succeeds and the operation has completed successfully,1144// op.Done will return true, and the response of the operation is returned.1145// If Poll succeeds and the operation has not completed, the returned response and error are both nil.1146func (op *DeleteArtifactOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {1147 return op.lro.Poll(ctx, nil, opts...)1148}1149// Metadata returns metadata associated with the long-running operation.1150// Metadata itself does not contact the server, but Poll does.1151// To get the latest metadata, call this method after a successful call to Poll.1152// If the metadata is not available, the returned metadata and error are both nil.1153func (op *DeleteArtifactOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) {1154 var meta aiplatformpb.DeleteOperationMetadata1155 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {1156 return nil, nil1157 } else if err != nil {1158 return nil, err1159 }1160 return &meta, nil1161}1162// Done reports whether the long-running operation has completed.1163func (op *DeleteArtifactOperation) Done() bool {1164 return op.lro.Done()1165}1166// Name returns the name of the long-running operation.1167// The name is assigned by the server and is unique within the service from which the operation is created.1168func (op *DeleteArtifactOperation) Name() string {1169 return op.lro.Name()1170}1171// DeleteContextOperation manages a long-running operation from DeleteContext.1172type DeleteContextOperation struct {1173 lro *longrunning.Operation1174}1175// DeleteContextOperation returns a new DeleteContextOperation from a given name.1176// The name must be that of a previously created DeleteContextOperation, possibly from a different process.1177func (c *metadataGRPCClient) DeleteContextOperation(name string) *DeleteContextOperation {1178 return &DeleteContextOperation{1179 lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}),1180 }1181}1182// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.1183//1184// See documentation of Poll for error-handling information.1185func (op *DeleteContextOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {1186 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)1187}1188// Poll fetches the latest state of the long-running operation.1189//1190// Poll also fetches the latest metadata, which can be retrieved by Metadata.1191//1192// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and1193// the operation has completed with failure, the error is returned and op.Done will return true.1194// If Poll succeeds and the operation has completed successfully,1195// op.Done will return true, and the response of the operation is returned.1196// If Poll succeeds and the operation has not completed, the returned response and error are both nil.1197func (op *DeleteContextOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {1198 return op.lro.Poll(ctx, nil, opts...)1199}1200// Metadata returns metadata associated with the long-running operation.1201// Metadata itself does not contact the server, but Poll does.1202// To get the latest metadata, call this method after a successful call to Poll.1203// If the metadata is not available, the returned metadata and error are both nil.1204func (op *DeleteContextOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) {1205 var meta aiplatformpb.DeleteOperationMetadata1206 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {1207 return nil, nil1208 } else if err != nil {1209 return nil, err1210 }1211 return &meta, nil1212}1213// Done reports whether the long-running operation has completed.1214func (op *DeleteContextOperation) Done() bool {1215 return op.lro.Done()1216}1217// Name returns the name of the long-running operation.1218// The name is assigned by the server and is unique within the service from which the operation is created.1219func (op *DeleteContextOperation) Name() string {1220 return op.lro.Name()1221}1222// DeleteExecutionOperation manages a long-running operation from DeleteExecution.1223type DeleteExecutionOperation struct {1224 lro *longrunning.Operation1225}1226// DeleteExecutionOperation returns a new DeleteExecutionOperation from a given name.1227// The name must be that of a previously created DeleteExecutionOperation, possibly from a different process.1228func (c *metadataGRPCClient) DeleteExecutionOperation(name string) *DeleteExecutionOperation {1229 return &DeleteExecutionOperation{1230 lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}),1231 }1232}1233// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.1234//1235// See documentation of Poll for error-handling information.1236func (op *DeleteExecutionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {1237 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)1238}1239// Poll fetches the latest state of the long-running operation.1240//1241// Poll also fetches the latest metadata, which can be retrieved by Metadata.1242//1243// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and1244// the operation has completed with failure, the error is returned and op.Done will return true.1245// If Poll succeeds and the operation has completed successfully,1246// op.Done will return true, and the response of the operation is returned.1247// If Poll succeeds and the operation has not completed, the returned response and error are both nil.1248func (op *DeleteExecutionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {1249 return op.lro.Poll(ctx, nil, opts...)1250}1251// Metadata returns metadata associated with the long-running operation.1252// Metadata itself does not contact the server, but Poll does.1253// To get the latest metadata, call this method after a successful call to Poll.1254// If the metadata is not available, the returned metadata and error are both nil.1255func (op *DeleteExecutionOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) {1256 var meta aiplatformpb.DeleteOperationMetadata1257 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {1258 return nil, nil1259 } else if err != nil {1260 return nil, err1261 }1262 return &meta, nil1263}1264// Done reports whether the long-running operation has completed.1265func (op *DeleteExecutionOperation) Done() bool {1266 return op.lro.Done()1267}1268// Name returns the name of the long-running operation.1269// The name is assigned by the server and is unique within the service from which the operation is created.1270func (op *DeleteExecutionOperation) Name() string {1271 return op.lro.Name()1272}1273// DeleteMetadataStoreOperation manages a long-running operation from DeleteMetadataStore.1274type DeleteMetadataStoreOperation struct {1275 lro *longrunning.Operation1276}1277// DeleteMetadataStoreOperation returns a new DeleteMetadataStoreOperation from a given name.1278// The name must be that of a previously created DeleteMetadataStoreOperation, possibly from a different process.1279func (c *metadataGRPCClient) DeleteMetadataStoreOperation(name string) *DeleteMetadataStoreOperation {1280 return &DeleteMetadataStoreOperation{1281 lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}),1282 }1283}1284// Wait blocks until the long-running operation is completed, returning the response and any errors encountered.1285//1286// See documentation of Poll for error-handling information.1287func (op *DeleteMetadataStoreOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {1288 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)1289}1290// Poll fetches the latest state of the long-running operation.1291//1292// Poll also fetches the latest metadata, which can be retrieved by Metadata.1293//1294// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and1295// the operation has completed with failure, the error is returned and op.Done will return true.1296// If Poll succeeds and the operation has completed successfully,1297// op.Done will return true, and the response of the operation is returned.1298// If Poll succeeds and the operation has not completed, the returned response and error are both nil.1299func (op *DeleteMetadataStoreOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {1300 return op.lro.Poll(ctx, nil, opts...)1301}1302// Metadata returns metadata associated with the long-running operation.1303// Metadata itself does not contact the server, but Poll does.1304// To get the latest metadata, call this method after a successful call to Poll.1305// If the metadata is not available, the returned metadata and error are both nil.1306func (op *DeleteMetadataStoreOperation) Metadata() (*aiplatformpb.DeleteMetadataStoreOperationMetadata, error) {1307 var meta aiplatformpb.DeleteMetadataStoreOperationMetadata1308 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {1309 return nil, nil1310 } else if err != nil {1311 return nil, err1312 }1313 return &meta, nil1314}1315// Done reports whether the long-running operation has completed.1316func (op *DeleteMetadataStoreOperation) Done() bool {1317 return op.lro.Done()1318}1319// Name returns the name of the long-running operation.1320// The name is assigned by the server and is unique within the service from which the operation is created.1321func (op *DeleteMetadataStoreOperation) Name() string {1322 return op.lro.Name()1323}1324// PurgeArtifactsOperation manages a long-running operation from PurgeArtifacts.1325type PurgeArtifactsOperation struct {1326 lro *longrunning.Operation1327}1328// PurgeArtifactsOperation returns a new PurgeArtifactsOperation from a given name.1329// The name must be that of a previously created PurgeArtifactsOperation, possibly from a different process.1330func (c *metadataGRPCClient) PurgeArtifactsOperation(name string) *PurgeArtifactsOperation {1331 return &PurgeArtifactsOperation{1332 lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}),1333 }1334}1335// Wait blocks until the long-running operation is completed, returning the response and any errors encountered....

Full Screen

Full Screen

zz_generated_pipeline_execution_controller.go

Source:zz_generated_pipeline_execution_controller.go Github

copy

Full Screen

...68 Create(*PipelineExecution) (*PipelineExecution, error)69 GetNamespaced(namespace, name string, opts metav1.GetOptions) (*PipelineExecution, error)70 Get(name string, opts metav1.GetOptions) (*PipelineExecution, error)71 Update(*PipelineExecution) (*PipelineExecution, error)72 Delete(name string, options *metav1.DeleteOptions) error73 DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error74 List(opts metav1.ListOptions) (*PipelineExecutionList, error)75 Watch(opts metav1.ListOptions) (watch.Interface, error)76 DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error77 Controller() PipelineExecutionController78 AddHandler(ctx context.Context, name string, sync PipelineExecutionHandlerFunc)79 AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync PipelineExecutionHandlerFunc)80 AddLifecycle(ctx context.Context, name string, lifecycle PipelineExecutionLifecycle)81 AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle PipelineExecutionLifecycle)82 AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync PipelineExecutionHandlerFunc)83 AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync PipelineExecutionHandlerFunc)84 AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle PipelineExecutionLifecycle)85 AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle PipelineExecutionLifecycle)86}87type pipelineExecutionLister struct {88 controller *pipelineExecutionController89}90func (l *pipelineExecutionLister) List(namespace string, selector labels.Selector) (ret []*PipelineExecution, err error) {91 err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) {92 ret = append(ret, obj.(*PipelineExecution))93 })94 return95}96func (l *pipelineExecutionLister) Get(namespace, name string) (*PipelineExecution, error) {97 var key string98 if namespace != "" {99 key = namespace + "/" + name100 } else {101 key = name102 }103 obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key)104 if err != nil {105 return nil, err106 }107 if !exists {108 return nil, errors.NewNotFound(schema.GroupResource{109 Group: PipelineExecutionGroupVersionKind.Group,110 Resource: "pipelineExecution",111 }, key)112 }113 return obj.(*PipelineExecution), nil114}115type pipelineExecutionController struct {116 controller.GenericController117}118func (c *pipelineExecutionController) Generic() controller.GenericController {119 return c.GenericController120}121func (c *pipelineExecutionController) Lister() PipelineExecutionLister {122 return &pipelineExecutionLister{123 controller: c,124 }125}126func (c *pipelineExecutionController) AddHandler(ctx context.Context, name string, handler PipelineExecutionHandlerFunc) {127 c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) {128 if obj == nil {129 return handler(key, nil)130 } else if v, ok := obj.(*PipelineExecution); ok {131 return handler(key, v)132 } else {133 return nil, nil134 }135 })136}137func (c *pipelineExecutionController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler PipelineExecutionHandlerFunc) {138 c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) {139 if !enabled() {140 return nil, nil141 } else if obj == nil {142 return handler(key, nil)143 } else if v, ok := obj.(*PipelineExecution); ok {144 return handler(key, v)145 } else {146 return nil, nil147 }148 })149}150func (c *pipelineExecutionController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler PipelineExecutionHandlerFunc) {151 c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) {152 if obj == nil {153 return handler(key, nil)154 } else if v, ok := obj.(*PipelineExecution); ok && controller.ObjectInCluster(cluster, obj) {155 return handler(key, v)156 } else {157 return nil, nil158 }159 })160}161func (c *pipelineExecutionController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler PipelineExecutionHandlerFunc) {162 c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) {163 if !enabled() {164 return nil, nil165 } else if obj == nil {166 return handler(key, nil)167 } else if v, ok := obj.(*PipelineExecution); ok && controller.ObjectInCluster(cluster, obj) {168 return handler(key, v)169 } else {170 return nil, nil171 }172 })173}174type pipelineExecutionFactory struct {175}176func (c pipelineExecutionFactory) Object() runtime.Object {177 return &PipelineExecution{}178}179func (c pipelineExecutionFactory) List() runtime.Object {180 return &PipelineExecutionList{}181}182func (s *pipelineExecutionClient) Controller() PipelineExecutionController {183 s.client.Lock()184 defer s.client.Unlock()185 c, ok := s.client.pipelineExecutionControllers[s.ns]186 if ok {187 return c188 }189 genericController := controller.NewGenericController(PipelineExecutionGroupVersionKind.Kind+"Controller",190 s.objectClient)191 c = &pipelineExecutionController{192 GenericController: genericController,193 }194 s.client.pipelineExecutionControllers[s.ns] = c195 s.client.starters = append(s.client.starters, c)196 return c197}198type pipelineExecutionClient struct {199 client *Client200 ns string201 objectClient *objectclient.ObjectClient202 controller PipelineExecutionController203}204func (s *pipelineExecutionClient) ObjectClient() *objectclient.ObjectClient {205 return s.objectClient206}207func (s *pipelineExecutionClient) Create(o *PipelineExecution) (*PipelineExecution, error) {208 obj, err := s.objectClient.Create(o)209 return obj.(*PipelineExecution), err210}211func (s *pipelineExecutionClient) Get(name string, opts metav1.GetOptions) (*PipelineExecution, error) {212 obj, err := s.objectClient.Get(name, opts)213 return obj.(*PipelineExecution), err214}215func (s *pipelineExecutionClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*PipelineExecution, error) {216 obj, err := s.objectClient.GetNamespaced(namespace, name, opts)217 return obj.(*PipelineExecution), err218}219func (s *pipelineExecutionClient) Update(o *PipelineExecution) (*PipelineExecution, error) {220 obj, err := s.objectClient.Update(o.Name, o)221 return obj.(*PipelineExecution), err222}223func (s *pipelineExecutionClient) Delete(name string, options *metav1.DeleteOptions) error {224 return s.objectClient.Delete(name, options)225}226func (s *pipelineExecutionClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error {227 return s.objectClient.DeleteNamespaced(namespace, name, options)228}229func (s *pipelineExecutionClient) List(opts metav1.ListOptions) (*PipelineExecutionList, error) {230 obj, err := s.objectClient.List(opts)231 return obj.(*PipelineExecutionList), err232}233func (s *pipelineExecutionClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {234 return s.objectClient.Watch(opts)235}236// Patch applies the patch and returns the patched deployment.237func (s *pipelineExecutionClient) Patch(o *PipelineExecution, patchType types.PatchType, data []byte, subresources ...string) (*PipelineExecution, error) {238 obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...)239 return obj.(*PipelineExecution), err240}241func (s *pipelineExecutionClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {242 return s.objectClient.DeleteCollection(deleteOpts, listOpts)243}244func (s *pipelineExecutionClient) AddHandler(ctx context.Context, name string, sync PipelineExecutionHandlerFunc) {245 s.Controller().AddHandler(ctx, name, sync)246}247func (s *pipelineExecutionClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync PipelineExecutionHandlerFunc) {248 s.Controller().AddFeatureHandler(ctx, enabled, name, sync)249}250func (s *pipelineExecutionClient) AddLifecycle(ctx context.Context, name string, lifecycle PipelineExecutionLifecycle) {251 sync := NewPipelineExecutionLifecycleAdapter(name, false, s, lifecycle)252 s.Controller().AddHandler(ctx, name, sync)253}254func (s *pipelineExecutionClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle PipelineExecutionLifecycle) {255 sync := NewPipelineExecutionLifecycleAdapter(name, false, s, lifecycle)256 s.Controller().AddFeatureHandler(ctx, enabled, name, sync)257}258func (s *pipelineExecutionClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync PipelineExecutionHandlerFunc) {259 s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync)260}261func (s *pipelineExecutionClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync PipelineExecutionHandlerFunc) {262 s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync)263}264func (s *pipelineExecutionClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle PipelineExecutionLifecycle) {265 sync := NewPipelineExecutionLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)266 s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync)267}268func (s *pipelineExecutionClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle PipelineExecutionLifecycle) {269 sync := NewPipelineExecutionLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)270 s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync)271}272type PipelineExecutionIndexer func(obj *PipelineExecution) ([]string, error)273type PipelineExecutionClientCache interface {274 Get(namespace, name string) (*PipelineExecution, error)275 List(namespace string, selector labels.Selector) ([]*PipelineExecution, error)276 Index(name string, indexer PipelineExecutionIndexer)277 GetIndexed(name, key string) ([]*PipelineExecution, error)278}279type PipelineExecutionClient interface {280 Create(*PipelineExecution) (*PipelineExecution, error)281 Get(namespace, name string, opts metav1.GetOptions) (*PipelineExecution, error)282 Update(*PipelineExecution) (*PipelineExecution, error)283 Delete(namespace, name string, options *metav1.DeleteOptions) error284 List(namespace string, opts metav1.ListOptions) (*PipelineExecutionList, error)285 Watch(opts metav1.ListOptions) (watch.Interface, error)286 Cache() PipelineExecutionClientCache287 OnCreate(ctx context.Context, name string, sync PipelineExecutionChangeHandlerFunc)288 OnChange(ctx context.Context, name string, sync PipelineExecutionChangeHandlerFunc)289 OnRemove(ctx context.Context, name string, sync PipelineExecutionChangeHandlerFunc)290 Enqueue(namespace, name string)291 Generic() controller.GenericController292 ObjectClient() *objectclient.ObjectClient293 Interface() PipelineExecutionInterface294}295type pipelineExecutionClientCache struct {296 client *pipelineExecutionClient2297}298type pipelineExecutionClient2 struct {299 iface PipelineExecutionInterface300 controller PipelineExecutionController301}302func (n *pipelineExecutionClient2) Interface() PipelineExecutionInterface {303 return n.iface304}305func (n *pipelineExecutionClient2) Generic() controller.GenericController {306 return n.iface.Controller().Generic()307}308func (n *pipelineExecutionClient2) ObjectClient() *objectclient.ObjectClient {309 return n.Interface().ObjectClient()310}311func (n *pipelineExecutionClient2) Enqueue(namespace, name string) {312 n.iface.Controller().Enqueue(namespace, name)313}314func (n *pipelineExecutionClient2) Create(obj *PipelineExecution) (*PipelineExecution, error) {315 return n.iface.Create(obj)316}317func (n *pipelineExecutionClient2) Get(namespace, name string, opts metav1.GetOptions) (*PipelineExecution, error) {318 return n.iface.GetNamespaced(namespace, name, opts)319}320func (n *pipelineExecutionClient2) Update(obj *PipelineExecution) (*PipelineExecution, error) {321 return n.iface.Update(obj)322}323func (n *pipelineExecutionClient2) Delete(namespace, name string, options *metav1.DeleteOptions) error {324 return n.iface.DeleteNamespaced(namespace, name, options)325}326func (n *pipelineExecutionClient2) List(namespace string, opts metav1.ListOptions) (*PipelineExecutionList, error) {327 return n.iface.List(opts)328}329func (n *pipelineExecutionClient2) Watch(opts metav1.ListOptions) (watch.Interface, error) {330 return n.iface.Watch(opts)331}332func (n *pipelineExecutionClientCache) Get(namespace, name string) (*PipelineExecution, error) {333 return n.client.controller.Lister().Get(namespace, name)334}335func (n *pipelineExecutionClientCache) List(namespace string, selector labels.Selector) ([]*PipelineExecution, error) {336 return n.client.controller.Lister().List(namespace, selector)337}338func (n *pipelineExecutionClient2) Cache() PipelineExecutionClientCache {...

Full Screen

Full Screen

delete_execution_plan.go

Source:delete_execution_plan.go Github

copy

Full Screen

...16import (17 "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"18 "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"19)20// DeleteExecutionPlan invokes the emr.DeleteExecutionPlan API synchronously21// api document: https://help.aliyun.com/api/emr/deleteexecutionplan.html22func (client *Client) DeleteExecutionPlan(request *DeleteExecutionPlanRequest) (response *DeleteExecutionPlanResponse, err error) {23 response = CreateDeleteExecutionPlanResponse()24 err = client.DoAction(request, response)25 return26}27// DeleteExecutionPlanWithChan invokes the emr.DeleteExecutionPlan API asynchronously28// api document: https://help.aliyun.com/api/emr/deleteexecutionplan.html29// asynchronous document: https://help.aliyun.com/document_detail/66220.html30func (client *Client) DeleteExecutionPlanWithChan(request *DeleteExecutionPlanRequest) (<-chan *DeleteExecutionPlanResponse, <-chan error) {31 responseChan := make(chan *DeleteExecutionPlanResponse, 1)32 errChan := make(chan error, 1)33 err := client.AddAsyncTask(func() {34 defer close(responseChan)35 defer close(errChan)36 response, err := client.DeleteExecutionPlan(request)37 if err != nil {38 errChan <- err39 } else {40 responseChan <- response41 }42 })43 if err != nil {44 errChan <- err45 close(responseChan)46 close(errChan)47 }48 return responseChan, errChan49}50// DeleteExecutionPlanWithCallback invokes the emr.DeleteExecutionPlan API asynchronously51// api document: https://help.aliyun.com/api/emr/deleteexecutionplan.html52// asynchronous document: https://help.aliyun.com/document_detail/66220.html53func (client *Client) DeleteExecutionPlanWithCallback(request *DeleteExecutionPlanRequest, callback func(response *DeleteExecutionPlanResponse, err error)) <-chan int {54 result := make(chan int, 1)55 err := client.AddAsyncTask(func() {56 var response *DeleteExecutionPlanResponse57 var err error58 defer close(result)59 response, err = client.DeleteExecutionPlan(request)60 callback(response, err)61 result <- 162 })63 if err != nil {64 defer close(result)65 callback(nil, err)66 result <- 067 }68 return result69}70// DeleteExecutionPlanRequest is the request struct for api DeleteExecutionPlan71type DeleteExecutionPlanRequest struct {72 *requests.RpcRequest73 ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`74 Id string `position:"Query" name:"Id"`75}76// DeleteExecutionPlanResponse is the response struct for api DeleteExecutionPlan77type DeleteExecutionPlanResponse struct {78 *responses.BaseResponse79 RequestId string `json:"RequestId" xml:"RequestId"`80}81// CreateDeleteExecutionPlanRequest creates a request to invoke DeleteExecutionPlan API82func CreateDeleteExecutionPlanRequest() (request *DeleteExecutionPlanRequest) {83 request = &DeleteExecutionPlanRequest{84 RpcRequest: &requests.RpcRequest{},85 }86 request.InitWithApiInfo("Emr", "2016-04-08", "DeleteExecutionPlan", "emr", "openAPI")87 return88}89// CreateDeleteExecutionPlanResponse creates a response to parse from DeleteExecutionPlan response90func CreateDeleteExecutionPlanResponse() (response *DeleteExecutionPlanResponse) {91 response = &DeleteExecutionPlanResponse{92 BaseResponse: &responses.BaseResponse{},93 }94 return95}

Full Screen

Full Screen

Delete

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 err := exec.Command("rm", "test.txt").Run()4 if err != nil {5 fmt.Println(err)6 }7}8import (9func main() {10 err := exec.Command("mv", "test.txt", "test1.txt").Run()11 if err != nil {12 fmt.Println(err)13 }14}15import (16func main() {17 out, err := exec.Command("ls").Output()18 if err != nil {19 fmt.Println(err)20 }21 fmt.Println(string(out))22}

Full Screen

Full Screen

Delete

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 cmd := exec.Command("rm", "-rf", "test.txt")4 err := cmd.Run()5 if err != nil {6 fmt.Println("Error: ", err.Error())7 }8}9Delete File Using os.Remove() Method10import (11func main() {12 err := os.Remove("test.txt")13 if err != nil {14 fmt.Println("Error: ", err.Error())15 }16}17Delete File Using os.RemoveAll() Method18import (19func main() {20 err := os.RemoveAll("test.txt")21 if err != nil {22 fmt.Println("Error: ", err.Error())23 }24}25Delete File Using os.Chmod() Method26import (27func main() {28 err := os.Chmod("test.txt", 0777)29 if err != nil {30 fmt.Println("Error: ", err.Error())31 }32}33Delete File Using os.Chown() Method

Full Screen

Full Screen

Delete

Using AI Code Generation

copy

Full Screen

1execution.Delete(1);2execution.Delete(1);3execution.Delete(1);4execution.Delete(1);5execution.Delete(1);6execution.Delete(1);7execution.Delete(1);8execution.Delete(1);9execution.Delete(1);10execution.Delete(1);11execution.Delete(1);12execution.Delete(1);13execution.Delete(1);14execution.Delete(1);15execution.Delete(1);16execution.Delete(1);17execution.Delete(1);18execution.Delete(1);19execution.Delete(1);20execution.Delete(1);21execution.Delete(1);22execution.Delete(1);23execution.Delete(1);24execution.Delete(1);25execution.Delete(1);26execution.Delete(1);27execution.Delete(1);

Full Screen

Full Screen

Delete

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 err := exec.Command("rm", "file.txt").Run()4 if err != nil {5 fmt.Println(err)6 }7}

Full Screen

Full Screen

Delete

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 cmd := exec.Command("ls", "-l")4 cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}5 cmd.Start()6 syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)7}

Full Screen

Full Screen

Delete

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 cmd := exec.Command("ls", "-la")4 cmd.Process.Kill()5}6import (7func main() {8 cmd := exec.Command("ls", "-la")9 err := cmd.Process.Kill()10 if err != nil {11 fmt.Println(err)12 }13}

Full Screen

Full Screen

Delete

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 cmd := exec.Command("cmd", "/c", "echo", "Hello World")4 output, err := cmd.Output()5 if err != nil {6 fmt.Println(err.Error())7 }8 fmt.Println(string(output))9}10import (11func main() {12 cmd := exec.Command("cmd", "/c", "echo", "Hello World")13 output, err := cmd.Start()14 if err != nil {15 fmt.Println(err.Error())16 }17 fmt.Println(string(output))18}19import (20func main() {21 cmd := exec.Command("cmd", "/c", "echo", "Hello World")22 output, err := cmd.Run()23 if err != nil {24 fmt.Println(err.Error())25 }26 fmt.Println(string(output))27}28import (29func main() {30 cmd := exec.Command("cmd", "/c", "echo", "Hello World")31 output, err := cmd.LookPath()32 if err != nil {33 fmt.Println(err.Error())34 }35 fmt.Println(string(output))36}

Full Screen

Full Screen

Delete

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 process := exec.Command("ls", "-ltr")4 output, err := process.Output()5 if err != nil {6 fmt.Println(err)7 }8 fmt.Println(string(output))9}10import (11func main() {12 process := exec.Command("ls", "-ltr")13 err := process.Start()14 if err != nil {15 fmt.Println(err)16 }17 fmt.Println("Command Successfully Executed")18}19import (20func main() {

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful