cloud.google.com/go/aiplatform@v1.106.0/apiv1beta1/aiplatformpb/schedule_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/v1beta1/schedule_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  	emptypb "google.golang.org/protobuf/types/known/emptypb"
    30  )
    31  
    32  // This is a compile-time assertion to ensure that this generated file
    33  // is compatible with the grpc package it is being compiled against.
    34  // Requires gRPC-Go v1.32.0 or later.
    35  const _ = grpc.SupportPackageIsVersion7
    36  
    37  const (
    38  	ScheduleService_CreateSchedule_FullMethodName = "/google.cloud.aiplatform.v1beta1.ScheduleService/CreateSchedule"
    39  	ScheduleService_DeleteSchedule_FullMethodName = "/google.cloud.aiplatform.v1beta1.ScheduleService/DeleteSchedule"
    40  	ScheduleService_GetSchedule_FullMethodName    = "/google.cloud.aiplatform.v1beta1.ScheduleService/GetSchedule"
    41  	ScheduleService_ListSchedules_FullMethodName  = "/google.cloud.aiplatform.v1beta1.ScheduleService/ListSchedules"
    42  	ScheduleService_PauseSchedule_FullMethodName  = "/google.cloud.aiplatform.v1beta1.ScheduleService/PauseSchedule"
    43  	ScheduleService_ResumeSchedule_FullMethodName = "/google.cloud.aiplatform.v1beta1.ScheduleService/ResumeSchedule"
    44  	ScheduleService_UpdateSchedule_FullMethodName = "/google.cloud.aiplatform.v1beta1.ScheduleService/UpdateSchedule"
    45  )
    46  
    47  // ScheduleServiceClient is the client API for ScheduleService service.
    48  //
    49  // 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.
    50  type ScheduleServiceClient interface {
    51  	// Creates a Schedule.
    52  	CreateSchedule(ctx context.Context, in *CreateScheduleRequest, opts ...grpc.CallOption) (*Schedule, error)
    53  	// Deletes a Schedule.
    54  	DeleteSchedule(ctx context.Context, in *DeleteScheduleRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
    55  	// Gets a Schedule.
    56  	GetSchedule(ctx context.Context, in *GetScheduleRequest, opts ...grpc.CallOption) (*Schedule, error)
    57  	// Lists Schedules in a Location.
    58  	ListSchedules(ctx context.Context, in *ListSchedulesRequest, opts ...grpc.CallOption) (*ListSchedulesResponse, error)
    59  	// Pauses a Schedule. Will mark
    60  	// [Schedule.state][google.cloud.aiplatform.v1beta1.Schedule.state] to
    61  	// 'PAUSED'. If the schedule is paused, no new runs will be created. Already
    62  	// created runs will NOT be paused or canceled.
    63  	PauseSchedule(ctx context.Context, in *PauseScheduleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
    64  	// Resumes a paused Schedule to start scheduling new runs. Will mark
    65  	// [Schedule.state][google.cloud.aiplatform.v1beta1.Schedule.state] to
    66  	// 'ACTIVE'. Only paused Schedule can be resumed.
    67  	//
    68  	// When the Schedule is resumed, new runs will be scheduled starting from the
    69  	// next execution time after the current time based on the time_specification
    70  	// in the Schedule. If [Schedule.catchUp][] is set up true, all
    71  	// missed runs will be scheduled for backfill first.
    72  	ResumeSchedule(ctx context.Context, in *ResumeScheduleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
    73  	// Updates an active or paused Schedule.
    74  	//
    75  	// When the Schedule is updated, new runs will be scheduled starting from the
    76  	// updated next execution time after the update time based on the
    77  	// time_specification in the updated Schedule. All unstarted runs before the
    78  	// update time will be skipped while already created runs will NOT be paused
    79  	// or canceled.
    80  	UpdateSchedule(ctx context.Context, in *UpdateScheduleRequest, opts ...grpc.CallOption) (*Schedule, error)
    81  }
    82  
    83  type scheduleServiceClient struct {
    84  	cc grpc.ClientConnInterface
    85  }
    86  
    87  func NewScheduleServiceClient(cc grpc.ClientConnInterface) ScheduleServiceClient {
    88  	return &scheduleServiceClient{cc}
    89  }
    90  
    91  func (c *scheduleServiceClient) CreateSchedule(ctx context.Context, in *CreateScheduleRequest, opts ...grpc.CallOption) (*Schedule, error) {
    92  	out := new(Schedule)
    93  	err := c.cc.Invoke(ctx, ScheduleService_CreateSchedule_FullMethodName, in, out, opts...)
    94  	if err != nil {
    95  		return nil, err
    96  	}
    97  	return out, nil
    98  }
    99  
   100  func (c *scheduleServiceClient) DeleteSchedule(ctx context.Context, in *DeleteScheduleRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
   101  	out := new(longrunningpb.Operation)
   102  	err := c.cc.Invoke(ctx, ScheduleService_DeleteSchedule_FullMethodName, in, out, opts...)
   103  	if err != nil {
   104  		return nil, err
   105  	}
   106  	return out, nil
   107  }
   108  
   109  func (c *scheduleServiceClient) GetSchedule(ctx context.Context, in *GetScheduleRequest, opts ...grpc.CallOption) (*Schedule, error) {
   110  	out := new(Schedule)
   111  	err := c.cc.Invoke(ctx, ScheduleService_GetSchedule_FullMethodName, in, out, opts...)
   112  	if err != nil {
   113  		return nil, err
   114  	}
   115  	return out, nil
   116  }
   117  
   118  func (c *scheduleServiceClient) ListSchedules(ctx context.Context, in *ListSchedulesRequest, opts ...grpc.CallOption) (*ListSchedulesResponse, error) {
   119  	out := new(ListSchedulesResponse)
   120  	err := c.cc.Invoke(ctx, ScheduleService_ListSchedules_FullMethodName, in, out, opts...)
   121  	if err != nil {
   122  		return nil, err
   123  	}
   124  	return out, nil
   125  }
   126  
   127  func (c *scheduleServiceClient) PauseSchedule(ctx context.Context, in *PauseScheduleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
   128  	out := new(emptypb.Empty)
   129  	err := c.cc.Invoke(ctx, ScheduleService_PauseSchedule_FullMethodName, in, out, opts...)
   130  	if err != nil {
   131  		return nil, err
   132  	}
   133  	return out, nil
   134  }
   135  
   136  func (c *scheduleServiceClient) ResumeSchedule(ctx context.Context, in *ResumeScheduleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
   137  	out := new(emptypb.Empty)
   138  	err := c.cc.Invoke(ctx, ScheduleService_ResumeSchedule_FullMethodName, in, out, opts...)
   139  	if err != nil {
   140  		return nil, err
   141  	}
   142  	return out, nil
   143  }
   144  
   145  func (c *scheduleServiceClient) UpdateSchedule(ctx context.Context, in *UpdateScheduleRequest, opts ...grpc.CallOption) (*Schedule, error) {
   146  	out := new(Schedule)
   147  	err := c.cc.Invoke(ctx, ScheduleService_UpdateSchedule_FullMethodName, in, out, opts...)
   148  	if err != nil {
   149  		return nil, err
   150  	}
   151  	return out, nil
   152  }
   153  
   154  // ScheduleServiceServer is the server API for ScheduleService service.
   155  // All implementations should embed UnimplementedScheduleServiceServer
   156  // for forward compatibility
   157  type ScheduleServiceServer interface {
   158  	// Creates a Schedule.
   159  	CreateSchedule(context.Context, *CreateScheduleRequest) (*Schedule, error)
   160  	// Deletes a Schedule.
   161  	DeleteSchedule(context.Context, *DeleteScheduleRequest) (*longrunningpb.Operation, error)
   162  	// Gets a Schedule.
   163  	GetSchedule(context.Context, *GetScheduleRequest) (*Schedule, error)
   164  	// Lists Schedules in a Location.
   165  	ListSchedules(context.Context, *ListSchedulesRequest) (*ListSchedulesResponse, error)
   166  	// Pauses a Schedule. Will mark
   167  	// [Schedule.state][google.cloud.aiplatform.v1beta1.Schedule.state] to
   168  	// 'PAUSED'. If the schedule is paused, no new runs will be created. Already
   169  	// created runs will NOT be paused or canceled.
   170  	PauseSchedule(context.Context, *PauseScheduleRequest) (*emptypb.Empty, error)
   171  	// Resumes a paused Schedule to start scheduling new runs. Will mark
   172  	// [Schedule.state][google.cloud.aiplatform.v1beta1.Schedule.state] to
   173  	// 'ACTIVE'. Only paused Schedule can be resumed.
   174  	//
   175  	// When the Schedule is resumed, new runs will be scheduled starting from the
   176  	// next execution time after the current time based on the time_specification
   177  	// in the Schedule. If [Schedule.catchUp][] is set up true, all
   178  	// missed runs will be scheduled for backfill first.
   179  	ResumeSchedule(context.Context, *ResumeScheduleRequest) (*emptypb.Empty, error)
   180  	// Updates an active or paused Schedule.
   181  	//
   182  	// When the Schedule is updated, new runs will be scheduled starting from the
   183  	// updated next execution time after the update time based on the
   184  	// time_specification in the updated Schedule. All unstarted runs before the
   185  	// update time will be skipped while already created runs will NOT be paused
   186  	// or canceled.
   187  	UpdateSchedule(context.Context, *UpdateScheduleRequest) (*Schedule, error)
   188  }
   189  
   190  // UnimplementedScheduleServiceServer should be embedded to have forward compatible implementations.
   191  type UnimplementedScheduleServiceServer struct {
   192  }
   193  
   194  func (UnimplementedScheduleServiceServer) CreateSchedule(context.Context, *CreateScheduleRequest) (*Schedule, error) {
   195  	return nil, status.Errorf(codes.Unimplemented, "method CreateSchedule not implemented")
   196  }
   197  func (UnimplementedScheduleServiceServer) DeleteSchedule(context.Context, *DeleteScheduleRequest) (*longrunningpb.Operation, error) {
   198  	return nil, status.Errorf(codes.Unimplemented, "method DeleteSchedule not implemented")
   199  }
   200  func (UnimplementedScheduleServiceServer) GetSchedule(context.Context, *GetScheduleRequest) (*Schedule, error) {
   201  	return nil, status.Errorf(codes.Unimplemented, "method GetSchedule not implemented")
   202  }
   203  func (UnimplementedScheduleServiceServer) ListSchedules(context.Context, *ListSchedulesRequest) (*ListSchedulesResponse, error) {
   204  	return nil, status.Errorf(codes.Unimplemented, "method ListSchedules not implemented")
   205  }
   206  func (UnimplementedScheduleServiceServer) PauseSchedule(context.Context, *PauseScheduleRequest) (*emptypb.Empty, error) {
   207  	return nil, status.Errorf(codes.Unimplemented, "method PauseSchedule not implemented")
   208  }
   209  func (UnimplementedScheduleServiceServer) ResumeSchedule(context.Context, *ResumeScheduleRequest) (*emptypb.Empty, error) {
   210  	return nil, status.Errorf(codes.Unimplemented, "method ResumeSchedule not implemented")
   211  }
   212  func (UnimplementedScheduleServiceServer) UpdateSchedule(context.Context, *UpdateScheduleRequest) (*Schedule, error) {
   213  	return nil, status.Errorf(codes.Unimplemented, "method UpdateSchedule not implemented")
   214  }
   215  
   216  // UnsafeScheduleServiceServer may be embedded to opt out of forward compatibility for this service.
   217  // Use of this interface is not recommended, as added methods to ScheduleServiceServer will
   218  // result in compilation errors.
   219  type UnsafeScheduleServiceServer interface {
   220  	mustEmbedUnimplementedScheduleServiceServer()
   221  }
   222  
   223  func RegisterScheduleServiceServer(s grpc.ServiceRegistrar, srv ScheduleServiceServer) {
   224  	s.RegisterService(&ScheduleService_ServiceDesc, srv)
   225  }
   226  
   227  func _ScheduleService_CreateSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   228  	in := new(CreateScheduleRequest)
   229  	if err := dec(in); err != nil {
   230  		return nil, err
   231  	}
   232  	if interceptor == nil {
   233  		return srv.(ScheduleServiceServer).CreateSchedule(ctx, in)
   234  	}
   235  	info := &grpc.UnaryServerInfo{
   236  		Server:     srv,
   237  		FullMethod: ScheduleService_CreateSchedule_FullMethodName,
   238  	}
   239  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   240  		return srv.(ScheduleServiceServer).CreateSchedule(ctx, req.(*CreateScheduleRequest))
   241  	}
   242  	return interceptor(ctx, in, info, handler)
   243  }
   244  
   245  func _ScheduleService_DeleteSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   246  	in := new(DeleteScheduleRequest)
   247  	if err := dec(in); err != nil {
   248  		return nil, err
   249  	}
   250  	if interceptor == nil {
   251  		return srv.(ScheduleServiceServer).DeleteSchedule(ctx, in)
   252  	}
   253  	info := &grpc.UnaryServerInfo{
   254  		Server:     srv,
   255  		FullMethod: ScheduleService_DeleteSchedule_FullMethodName,
   256  	}
   257  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   258  		return srv.(ScheduleServiceServer).DeleteSchedule(ctx, req.(*DeleteScheduleRequest))
   259  	}
   260  	return interceptor(ctx, in, info, handler)
   261  }
   262  
   263  func _ScheduleService_GetSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   264  	in := new(GetScheduleRequest)
   265  	if err := dec(in); err != nil {
   266  		return nil, err
   267  	}
   268  	if interceptor == nil {
   269  		return srv.(ScheduleServiceServer).GetSchedule(ctx, in)
   270  	}
   271  	info := &grpc.UnaryServerInfo{
   272  		Server:     srv,
   273  		FullMethod: ScheduleService_GetSchedule_FullMethodName,
   274  	}
   275  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   276  		return srv.(ScheduleServiceServer).GetSchedule(ctx, req.(*GetScheduleRequest))
   277  	}
   278  	return interceptor(ctx, in, info, handler)
   279  }
   280  
   281  func _ScheduleService_ListSchedules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   282  	in := new(ListSchedulesRequest)
   283  	if err := dec(in); err != nil {
   284  		return nil, err
   285  	}
   286  	if interceptor == nil {
   287  		return srv.(ScheduleServiceServer).ListSchedules(ctx, in)
   288  	}
   289  	info := &grpc.UnaryServerInfo{
   290  		Server:     srv,
   291  		FullMethod: ScheduleService_ListSchedules_FullMethodName,
   292  	}
   293  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   294  		return srv.(ScheduleServiceServer).ListSchedules(ctx, req.(*ListSchedulesRequest))
   295  	}
   296  	return interceptor(ctx, in, info, handler)
   297  }
   298  
   299  func _ScheduleService_PauseSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   300  	in := new(PauseScheduleRequest)
   301  	if err := dec(in); err != nil {
   302  		return nil, err
   303  	}
   304  	if interceptor == nil {
   305  		return srv.(ScheduleServiceServer).PauseSchedule(ctx, in)
   306  	}
   307  	info := &grpc.UnaryServerInfo{
   308  		Server:     srv,
   309  		FullMethod: ScheduleService_PauseSchedule_FullMethodName,
   310  	}
   311  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   312  		return srv.(ScheduleServiceServer).PauseSchedule(ctx, req.(*PauseScheduleRequest))
   313  	}
   314  	return interceptor(ctx, in, info, handler)
   315  }
   316  
   317  func _ScheduleService_ResumeSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   318  	in := new(ResumeScheduleRequest)
   319  	if err := dec(in); err != nil {
   320  		return nil, err
   321  	}
   322  	if interceptor == nil {
   323  		return srv.(ScheduleServiceServer).ResumeSchedule(ctx, in)
   324  	}
   325  	info := &grpc.UnaryServerInfo{
   326  		Server:     srv,
   327  		FullMethod: ScheduleService_ResumeSchedule_FullMethodName,
   328  	}
   329  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   330  		return srv.(ScheduleServiceServer).ResumeSchedule(ctx, req.(*ResumeScheduleRequest))
   331  	}
   332  	return interceptor(ctx, in, info, handler)
   333  }
   334  
   335  func _ScheduleService_UpdateSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   336  	in := new(UpdateScheduleRequest)
   337  	if err := dec(in); err != nil {
   338  		return nil, err
   339  	}
   340  	if interceptor == nil {
   341  		return srv.(ScheduleServiceServer).UpdateSchedule(ctx, in)
   342  	}
   343  	info := &grpc.UnaryServerInfo{
   344  		Server:     srv,
   345  		FullMethod: ScheduleService_UpdateSchedule_FullMethodName,
   346  	}
   347  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   348  		return srv.(ScheduleServiceServer).UpdateSchedule(ctx, req.(*UpdateScheduleRequest))
   349  	}
   350  	return interceptor(ctx, in, info, handler)
   351  }
   352  
   353  // ScheduleService_ServiceDesc is the grpc.ServiceDesc for ScheduleService service.
   354  // It's only intended for direct use with grpc.RegisterService,
   355  // and not to be introspected or modified (even as a copy)
   356  var ScheduleService_ServiceDesc = grpc.ServiceDesc{
   357  	ServiceName: "google.cloud.aiplatform.v1beta1.ScheduleService",
   358  	HandlerType: (*ScheduleServiceServer)(nil),
   359  	Methods: []grpc.MethodDesc{
   360  		{
   361  			MethodName: "CreateSchedule",
   362  			Handler:    _ScheduleService_CreateSchedule_Handler,
   363  		},
   364  		{
   365  			MethodName: "DeleteSchedule",
   366  			Handler:    _ScheduleService_DeleteSchedule_Handler,
   367  		},
   368  		{
   369  			MethodName: "GetSchedule",
   370  			Handler:    _ScheduleService_GetSchedule_Handler,
   371  		},
   372  		{
   373  			MethodName: "ListSchedules",
   374  			Handler:    _ScheduleService_ListSchedules_Handler,
   375  		},
   376  		{
   377  			MethodName: "PauseSchedule",
   378  			Handler:    _ScheduleService_PauseSchedule_Handler,
   379  		},
   380  		{
   381  			MethodName: "ResumeSchedule",
   382  			Handler:    _ScheduleService_ResumeSchedule_Handler,
   383  		},
   384  		{
   385  			MethodName: "UpdateSchedule",
   386  			Handler:    _ScheduleService_UpdateSchedule_Handler,
   387  		},
   388  	},
   389  	Streams:  []grpc.StreamDesc{},
   390  	Metadata: "google/cloud/aiplatform/v1beta1/schedule_service.proto",
   391  }