cloud.google.com/go/aiplatform@v1.106.0/apiv1/aiplatformpb/migration_service_grpc.pb.go (about)

     1  // Copyright 2025 Google LLC
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
    16  // versions:
    17  // - protoc-gen-go-grpc v1.3.0
    18  // - protoc             v4.25.7
    19  // source: google/cloud/aiplatform/v1/migration_service.proto
    20  
    21  package aiplatformpb
    22  
    23  import (
    24  	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
    25  	context "context"
    26  	grpc "google.golang.org/grpc"
    27  	codes "google.golang.org/grpc/codes"
    28  	status "google.golang.org/grpc/status"
    29  )
    30  
    31  // This is a compile-time assertion to ensure that this generated file
    32  // is compatible with the grpc package it is being compiled against.
    33  // Requires gRPC-Go v1.32.0 or later.
    34  const _ = grpc.SupportPackageIsVersion7
    35  
    36  const (
    37  	MigrationService_SearchMigratableResources_FullMethodName = "/google.cloud.aiplatform.v1.MigrationService/SearchMigratableResources"
    38  	MigrationService_BatchMigrateResources_FullMethodName     = "/google.cloud.aiplatform.v1.MigrationService/BatchMigrateResources"
    39  )
    40  
    41  // MigrationServiceClient is the client API for MigrationService service.
    42  //
    43  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
    44  type MigrationServiceClient interface {
    45  	// Searches all of the resources in automl.googleapis.com,
    46  	// datalabeling.googleapis.com and ml.googleapis.com that can be migrated to
    47  	// Vertex AI's given location.
    48  	SearchMigratableResources(ctx context.Context, in *SearchMigratableResourcesRequest, opts ...grpc.CallOption) (*SearchMigratableResourcesResponse, error)
    49  	// Batch migrates resources from ml.googleapis.com, automl.googleapis.com,
    50  	// and datalabeling.googleapis.com to Vertex AI.
    51  	BatchMigrateResources(ctx context.Context, in *BatchMigrateResourcesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
    52  }
    53  
    54  type migrationServiceClient struct {
    55  	cc grpc.ClientConnInterface
    56  }
    57  
    58  func NewMigrationServiceClient(cc grpc.ClientConnInterface) MigrationServiceClient {
    59  	return &migrationServiceClient{cc}
    60  }
    61  
    62  func (c *migrationServiceClient) SearchMigratableResources(ctx context.Context, in *SearchMigratableResourcesRequest, opts ...grpc.CallOption) (*SearchMigratableResourcesResponse, error) {
    63  	out := new(SearchMigratableResourcesResponse)
    64  	err := c.cc.Invoke(ctx, MigrationService_SearchMigratableResources_FullMethodName, in, out, opts...)
    65  	if err != nil {
    66  		return nil, err
    67  	}
    68  	return out, nil
    69  }
    70  
    71  func (c *migrationServiceClient) BatchMigrateResources(ctx context.Context, in *BatchMigrateResourcesRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
    72  	out := new(longrunningpb.Operation)
    73  	err := c.cc.Invoke(ctx, MigrationService_BatchMigrateResources_FullMethodName, in, out, opts...)
    74  	if err != nil {
    75  		return nil, err
    76  	}
    77  	return out, nil
    78  }
    79  
    80  // MigrationServiceServer is the server API for MigrationService service.
    81  // All implementations should embed UnimplementedMigrationServiceServer
    82  // for forward compatibility
    83  type MigrationServiceServer interface {
    84  	// Searches all of the resources in automl.googleapis.com,
    85  	// datalabeling.googleapis.com and ml.googleapis.com that can be migrated to
    86  	// Vertex AI's given location.
    87  	SearchMigratableResources(context.Context, *SearchMigratableResourcesRequest) (*SearchMigratableResourcesResponse, error)
    88  	// Batch migrates resources from ml.googleapis.com, automl.googleapis.com,
    89  	// and datalabeling.googleapis.com to Vertex AI.
    90  	BatchMigrateResources(context.Context, *BatchMigrateResourcesRequest) (*longrunningpb.Operation, error)
    91  }
    92  
    93  // UnimplementedMigrationServiceServer should be embedded to have forward compatible implementations.
    94  type UnimplementedMigrationServiceServer struct {
    95  }
    96  
    97  func (UnimplementedMigrationServiceServer) SearchMigratableResources(context.Context, *SearchMigratableResourcesRequest) (*SearchMigratableResourcesResponse, error) {
    98  	return nil, status.Errorf(codes.Unimplemented, "method SearchMigratableResources not implemented")
    99  }
   100  func (UnimplementedMigrationServiceServer) BatchMigrateResources(context.Context, *BatchMigrateResourcesRequest) (*longrunningpb.Operation, error) {
   101  	return nil, status.Errorf(codes.Unimplemented, "method BatchMigrateResources not implemented")
   102  }
   103  
   104  // UnsafeMigrationServiceServer may be embedded to opt out of forward compatibility for this service.
   105  // Use of this interface is not recommended, as added methods to MigrationServiceServer will
   106  // result in compilation errors.
   107  type UnsafeMigrationServiceServer interface {
   108  	mustEmbedUnimplementedMigrationServiceServer()
   109  }
   110  
   111  func RegisterMigrationServiceServer(s grpc.ServiceRegistrar, srv MigrationServiceServer) {
   112  	s.RegisterService(&MigrationService_ServiceDesc, srv)
   113  }
   114  
   115  func _MigrationService_SearchMigratableResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   116  	in := new(SearchMigratableResourcesRequest)
   117  	if err := dec(in); err != nil {
   118  		return nil, err
   119  	}
   120  	if interceptor == nil {
   121  		return srv.(MigrationServiceServer).SearchMigratableResources(ctx, in)
   122  	}
   123  	info := &grpc.UnaryServerInfo{
   124  		Server:     srv,
   125  		FullMethod: MigrationService_SearchMigratableResources_FullMethodName,
   126  	}
   127  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   128  		return srv.(MigrationServiceServer).SearchMigratableResources(ctx, req.(*SearchMigratableResourcesRequest))
   129  	}
   130  	return interceptor(ctx, in, info, handler)
   131  }
   132  
   133  func _MigrationService_BatchMigrateResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   134  	in := new(BatchMigrateResourcesRequest)
   135  	if err := dec(in); err != nil {
   136  		return nil, err
   137  	}
   138  	if interceptor == nil {
   139  		return srv.(MigrationServiceServer).BatchMigrateResources(ctx, in)
   140  	}
   141  	info := &grpc.UnaryServerInfo{
   142  		Server:     srv,
   143  		FullMethod: MigrationService_BatchMigrateResources_FullMethodName,
   144  	}
   145  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   146  		return srv.(MigrationServiceServer).BatchMigrateResources(ctx, req.(*BatchMigrateResourcesRequest))
   147  	}
   148  	return interceptor(ctx, in, info, handler)
   149  }
   150  
   151  // MigrationService_ServiceDesc is the grpc.ServiceDesc for MigrationService service.
   152  // It's only intended for direct use with grpc.RegisterService,
   153  // and not to be introspected or modified (even as a copy)
   154  var MigrationService_ServiceDesc = grpc.ServiceDesc{
   155  	ServiceName: "google.cloud.aiplatform.v1.MigrationService",
   156  	HandlerType: (*MigrationServiceServer)(nil),
   157  	Methods: []grpc.MethodDesc{
   158  		{
   159  			MethodName: "SearchMigratableResources",
   160  			Handler:    _MigrationService_SearchMigratableResources_Handler,
   161  		},
   162  		{
   163  			MethodName: "BatchMigrateResources",
   164  			Handler:    _MigrationService_BatchMigrateResources_Handler,
   165  		},
   166  	},
   167  	Streams:  []grpc.StreamDesc{},
   168  	Metadata: "google/cloud/aiplatform/v1/migration_service.proto",
   169  }