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