* Bringing thrift API up to date with Aurora 0.21.0. * Adding support for SLA Drain Host API.
5870 lines
168 KiB
Go
5870 lines
168 KiB
Go
// Autogenerated by Thrift Compiler (0.9.3)
|
|
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
|
package aurora
|
|
|
|
import (
|
|
"bytes"
|
|
"fmt"
|
|
"git.apache.org/thrift.git/lib/go/thrift"
|
|
)
|
|
|
|
// (needed to ensure safety because of naive import list construction.)
|
|
var _ = thrift.ZERO
|
|
var _ = fmt.Printf
|
|
var _ = bytes.Equal
|
|
|
|
type AuroraAdmin interface {
|
|
AuroraSchedulerManager
|
|
|
|
// Assign quota to a user. This will overwrite any pre-existing quota for the user.
|
|
//
|
|
// Parameters:
|
|
// - OwnerRole
|
|
// - Quota
|
|
SetQuota(ownerRole string, quota *ResourceAggregate) (r *Response, err error)
|
|
// Forces a task into a specific state. This does not guarantee the task will enter the given
|
|
// state, as the task must still transition within the bounds of the state machine. However,
|
|
// it attempts to enter that state via the state machine.
|
|
//
|
|
// Parameters:
|
|
// - TaskId
|
|
// - Status
|
|
ForceTaskState(taskId string, status ScheduleStatus) (r *Response, err error)
|
|
// Immediately writes a storage snapshot to disk.
|
|
PerformBackup() (r *Response, err error)
|
|
// Lists backups that are available for recovery.
|
|
ListBackups() (r *Response, err error)
|
|
// Loads a backup to an in-memory storage. This must precede all other recovery operations.
|
|
//
|
|
// Parameters:
|
|
// - BackupId
|
|
StageRecovery(backupId string) (r *Response, err error)
|
|
// Queries for tasks in a staged recovery.
|
|
//
|
|
// Parameters:
|
|
// - Query
|
|
QueryRecovery(query *TaskQuery) (r *Response, err error)
|
|
// Deletes tasks from a staged recovery.
|
|
//
|
|
// Parameters:
|
|
// - Query
|
|
DeleteRecoveryTasks(query *TaskQuery) (r *Response, err error)
|
|
// Commits a staged recovery, completely replacing the previous storage state.
|
|
CommitRecovery() (r *Response, err error)
|
|
// Unloads (aborts) a staged recovery.
|
|
UnloadRecovery() (r *Response, err error)
|
|
// Put the given hosts into maintenance mode.
|
|
//
|
|
// Parameters:
|
|
// - Hosts
|
|
StartMaintenance(hosts *Hosts) (r *Response, err error)
|
|
// Ask scheduler to begin moving tasks scheduled on given hosts.
|
|
//
|
|
// Parameters:
|
|
// - Hosts
|
|
DrainHosts(hosts *Hosts) (r *Response, err error)
|
|
// Retrieve the current maintenance states for a group of hosts.
|
|
//
|
|
// Parameters:
|
|
// - Hosts
|
|
MaintenanceStatus(hosts *Hosts) (r *Response, err error)
|
|
// Set the given hosts back into serving mode.
|
|
//
|
|
// Parameters:
|
|
// - Hosts
|
|
EndMaintenance(hosts *Hosts) (r *Response, err error)
|
|
// Ask scheduler to put hosts into DRAINING mode and move scheduled tasks off of the hosts
|
|
// such that its SLA requirements are satisfied. Use defaultSlaPolicy if it is not set for a task.
|
|
//
|
|
//
|
|
// Parameters:
|
|
// - Hosts
|
|
// - DefaultSlaPolicy
|
|
// - TimeoutSecs
|
|
SlaDrainHosts(hosts *Hosts, defaultSlaPolicy *SlaPolicy, timeoutSecs int64) (r *Response, err error)
|
|
// Start a storage snapshot and block until it completes.
|
|
Snapshot() (r *Response, err error)
|
|
// Tell scheduler to trigger an explicit task reconciliation with the given settings.
|
|
//
|
|
// Parameters:
|
|
// - Settings
|
|
TriggerExplicitTaskReconciliation(settings *ExplicitReconciliationSettings) (r *Response, err error)
|
|
// Tell scheduler to trigger an implicit task reconciliation.
|
|
TriggerImplicitTaskReconciliation() (r *Response, err error)
|
|
// Force prune any (terminal) tasks that match the query. If no statuses are supplied with the
|
|
// query, it will default to all terminal task states. If statuses are supplied, they must be
|
|
// terminal states.
|
|
//
|
|
// Parameters:
|
|
// - Query
|
|
PruneTasks(query *TaskQuery) (r *Response, err error)
|
|
}
|
|
|
|
type AuroraAdminClient struct {
|
|
*AuroraSchedulerManagerClient
|
|
}
|
|
|
|
func NewAuroraAdminClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *AuroraAdminClient {
|
|
return &AuroraAdminClient{AuroraSchedulerManagerClient: NewAuroraSchedulerManagerClientFactory(t, f)}
|
|
}
|
|
|
|
func NewAuroraAdminClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *AuroraAdminClient {
|
|
return &AuroraAdminClient{AuroraSchedulerManagerClient: NewAuroraSchedulerManagerClientProtocol(t, iprot, oprot)}
|
|
}
|
|
|
|
// Assign quota to a user. This will overwrite any pre-existing quota for the user.
|
|
//
|
|
// Parameters:
|
|
// - OwnerRole
|
|
// - Quota
|
|
func (p *AuroraAdminClient) SetQuota(ownerRole string, quota *ResourceAggregate) (r *Response, err error) {
|
|
if err = p.sendSetQuota(ownerRole, quota); err != nil {
|
|
return
|
|
}
|
|
return p.recvSetQuota()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendSetQuota(ownerRole string, quota *ResourceAggregate) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("setQuota", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminSetQuotaArgs{
|
|
OwnerRole: ownerRole,
|
|
Quota: quota,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvSetQuota() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "setQuota" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "setQuota failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "setQuota failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error316 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error317 error
|
|
error317, err = error316.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error317
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "setQuota failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminSetQuotaResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Forces a task into a specific state. This does not guarantee the task will enter the given
|
|
// state, as the task must still transition within the bounds of the state machine. However,
|
|
// it attempts to enter that state via the state machine.
|
|
//
|
|
// Parameters:
|
|
// - TaskId
|
|
// - Status
|
|
func (p *AuroraAdminClient) ForceTaskState(taskId string, status ScheduleStatus) (r *Response, err error) {
|
|
if err = p.sendForceTaskState(taskId, status); err != nil {
|
|
return
|
|
}
|
|
return p.recvForceTaskState()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendForceTaskState(taskId string, status ScheduleStatus) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("forceTaskState", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminForceTaskStateArgs{
|
|
TaskId: taskId,
|
|
Status: status,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvForceTaskState() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "forceTaskState" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "forceTaskState failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "forceTaskState failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error318 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error319 error
|
|
error319, err = error318.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error319
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "forceTaskState failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminForceTaskStateResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Immediately writes a storage snapshot to disk.
|
|
func (p *AuroraAdminClient) PerformBackup() (r *Response, err error) {
|
|
if err = p.sendPerformBackup(); err != nil {
|
|
return
|
|
}
|
|
return p.recvPerformBackup()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendPerformBackup() (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("performBackup", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminPerformBackupArgs{}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvPerformBackup() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "performBackup" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "performBackup failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "performBackup failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error320 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error321 error
|
|
error321, err = error320.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error321
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "performBackup failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminPerformBackupResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Lists backups that are available for recovery.
|
|
func (p *AuroraAdminClient) ListBackups() (r *Response, err error) {
|
|
if err = p.sendListBackups(); err != nil {
|
|
return
|
|
}
|
|
return p.recvListBackups()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendListBackups() (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("listBackups", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminListBackupsArgs{}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvListBackups() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "listBackups" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "listBackups failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "listBackups failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error322 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error323 error
|
|
error323, err = error322.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error323
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "listBackups failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminListBackupsResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Loads a backup to an in-memory storage. This must precede all other recovery operations.
|
|
//
|
|
// Parameters:
|
|
// - BackupId
|
|
func (p *AuroraAdminClient) StageRecovery(backupId string) (r *Response, err error) {
|
|
if err = p.sendStageRecovery(backupId); err != nil {
|
|
return
|
|
}
|
|
return p.recvStageRecovery()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendStageRecovery(backupId string) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("stageRecovery", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminStageRecoveryArgs{
|
|
BackupId: backupId,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvStageRecovery() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "stageRecovery" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "stageRecovery failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "stageRecovery failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error324 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error325 error
|
|
error325, err = error324.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error325
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "stageRecovery failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminStageRecoveryResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Queries for tasks in a staged recovery.
|
|
//
|
|
// Parameters:
|
|
// - Query
|
|
func (p *AuroraAdminClient) QueryRecovery(query *TaskQuery) (r *Response, err error) {
|
|
if err = p.sendQueryRecovery(query); err != nil {
|
|
return
|
|
}
|
|
return p.recvQueryRecovery()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendQueryRecovery(query *TaskQuery) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("queryRecovery", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminQueryRecoveryArgs{
|
|
Query: query,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvQueryRecovery() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "queryRecovery" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "queryRecovery failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "queryRecovery failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error326 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error327 error
|
|
error327, err = error326.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error327
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "queryRecovery failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminQueryRecoveryResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Deletes tasks from a staged recovery.
|
|
//
|
|
// Parameters:
|
|
// - Query
|
|
func (p *AuroraAdminClient) DeleteRecoveryTasks(query *TaskQuery) (r *Response, err error) {
|
|
if err = p.sendDeleteRecoveryTasks(query); err != nil {
|
|
return
|
|
}
|
|
return p.recvDeleteRecoveryTasks()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendDeleteRecoveryTasks(query *TaskQuery) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("deleteRecoveryTasks", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminDeleteRecoveryTasksArgs{
|
|
Query: query,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvDeleteRecoveryTasks() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "deleteRecoveryTasks" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "deleteRecoveryTasks failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "deleteRecoveryTasks failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error328 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error329 error
|
|
error329, err = error328.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error329
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "deleteRecoveryTasks failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminDeleteRecoveryTasksResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Commits a staged recovery, completely replacing the previous storage state.
|
|
func (p *AuroraAdminClient) CommitRecovery() (r *Response, err error) {
|
|
if err = p.sendCommitRecovery(); err != nil {
|
|
return
|
|
}
|
|
return p.recvCommitRecovery()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendCommitRecovery() (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("commitRecovery", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminCommitRecoveryArgs{}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvCommitRecovery() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "commitRecovery" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "commitRecovery failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "commitRecovery failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error330 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error331 error
|
|
error331, err = error330.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error331
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "commitRecovery failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminCommitRecoveryResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Unloads (aborts) a staged recovery.
|
|
func (p *AuroraAdminClient) UnloadRecovery() (r *Response, err error) {
|
|
if err = p.sendUnloadRecovery(); err != nil {
|
|
return
|
|
}
|
|
return p.recvUnloadRecovery()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendUnloadRecovery() (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("unloadRecovery", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminUnloadRecoveryArgs{}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvUnloadRecovery() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "unloadRecovery" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "unloadRecovery failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "unloadRecovery failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error332 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error333 error
|
|
error333, err = error332.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error333
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "unloadRecovery failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminUnloadRecoveryResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Put the given hosts into maintenance mode.
|
|
//
|
|
// Parameters:
|
|
// - Hosts
|
|
func (p *AuroraAdminClient) StartMaintenance(hosts *Hosts) (r *Response, err error) {
|
|
if err = p.sendStartMaintenance(hosts); err != nil {
|
|
return
|
|
}
|
|
return p.recvStartMaintenance()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendStartMaintenance(hosts *Hosts) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("startMaintenance", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminStartMaintenanceArgs{
|
|
Hosts: hosts,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvStartMaintenance() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "startMaintenance" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "startMaintenance failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "startMaintenance failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error334 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error335 error
|
|
error335, err = error334.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error335
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "startMaintenance failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminStartMaintenanceResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Ask scheduler to begin moving tasks scheduled on given hosts.
|
|
//
|
|
// Parameters:
|
|
// - Hosts
|
|
func (p *AuroraAdminClient) DrainHosts(hosts *Hosts) (r *Response, err error) {
|
|
if err = p.sendDrainHosts(hosts); err != nil {
|
|
return
|
|
}
|
|
return p.recvDrainHosts()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendDrainHosts(hosts *Hosts) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("drainHosts", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminDrainHostsArgs{
|
|
Hosts: hosts,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvDrainHosts() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "drainHosts" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "drainHosts failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "drainHosts failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error336 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error337 error
|
|
error337, err = error336.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error337
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "drainHosts failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminDrainHostsResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Retrieve the current maintenance states for a group of hosts.
|
|
//
|
|
// Parameters:
|
|
// - Hosts
|
|
func (p *AuroraAdminClient) MaintenanceStatus(hosts *Hosts) (r *Response, err error) {
|
|
if err = p.sendMaintenanceStatus(hosts); err != nil {
|
|
return
|
|
}
|
|
return p.recvMaintenanceStatus()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendMaintenanceStatus(hosts *Hosts) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("maintenanceStatus", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminMaintenanceStatusArgs{
|
|
Hosts: hosts,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvMaintenanceStatus() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "maintenanceStatus" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "maintenanceStatus failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "maintenanceStatus failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error338 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error339 error
|
|
error339, err = error338.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error339
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "maintenanceStatus failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminMaintenanceStatusResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Set the given hosts back into serving mode.
|
|
//
|
|
// Parameters:
|
|
// - Hosts
|
|
func (p *AuroraAdminClient) EndMaintenance(hosts *Hosts) (r *Response, err error) {
|
|
if err = p.sendEndMaintenance(hosts); err != nil {
|
|
return
|
|
}
|
|
return p.recvEndMaintenance()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendEndMaintenance(hosts *Hosts) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("endMaintenance", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminEndMaintenanceArgs{
|
|
Hosts: hosts,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvEndMaintenance() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "endMaintenance" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "endMaintenance failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "endMaintenance failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error340 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error341 error
|
|
error341, err = error340.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error341
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "endMaintenance failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminEndMaintenanceResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Ask scheduler to put hosts into DRAINING mode and move scheduled tasks off of the hosts
|
|
// such that its SLA requirements are satisfied. Use defaultSlaPolicy if it is not set for a task.
|
|
//
|
|
//
|
|
// Parameters:
|
|
// - Hosts
|
|
// - DefaultSlaPolicy
|
|
// - TimeoutSecs
|
|
func (p *AuroraAdminClient) SlaDrainHosts(hosts *Hosts, defaultSlaPolicy *SlaPolicy, timeoutSecs int64) (r *Response, err error) {
|
|
if err = p.sendSlaDrainHosts(hosts, defaultSlaPolicy, timeoutSecs); err != nil {
|
|
return
|
|
}
|
|
return p.recvSlaDrainHosts()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendSlaDrainHosts(hosts *Hosts, defaultSlaPolicy *SlaPolicy, timeoutSecs int64) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("slaDrainHosts", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminSlaDrainHostsArgs{
|
|
Hosts: hosts,
|
|
DefaultSlaPolicy: defaultSlaPolicy,
|
|
TimeoutSecs: timeoutSecs,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvSlaDrainHosts() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "slaDrainHosts" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "slaDrainHosts failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "slaDrainHosts failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error342 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error343 error
|
|
error343, err = error342.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error343
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "slaDrainHosts failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminSlaDrainHostsResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Start a storage snapshot and block until it completes.
|
|
func (p *AuroraAdminClient) Snapshot() (r *Response, err error) {
|
|
if err = p.sendSnapshot(); err != nil {
|
|
return
|
|
}
|
|
return p.recvSnapshot()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendSnapshot() (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("snapshot", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminSnapshotArgs{}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvSnapshot() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "snapshot" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "snapshot failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "snapshot failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error344 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error345 error
|
|
error345, err = error344.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error345
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "snapshot failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminSnapshotResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Tell scheduler to trigger an explicit task reconciliation with the given settings.
|
|
//
|
|
// Parameters:
|
|
// - Settings
|
|
func (p *AuroraAdminClient) TriggerExplicitTaskReconciliation(settings *ExplicitReconciliationSettings) (r *Response, err error) {
|
|
if err = p.sendTriggerExplicitTaskReconciliation(settings); err != nil {
|
|
return
|
|
}
|
|
return p.recvTriggerExplicitTaskReconciliation()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendTriggerExplicitTaskReconciliation(settings *ExplicitReconciliationSettings) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("triggerExplicitTaskReconciliation", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminTriggerExplicitTaskReconciliationArgs{
|
|
Settings: settings,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvTriggerExplicitTaskReconciliation() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "triggerExplicitTaskReconciliation" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "triggerExplicitTaskReconciliation failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "triggerExplicitTaskReconciliation failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error346 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error347 error
|
|
error347, err = error346.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error347
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "triggerExplicitTaskReconciliation failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminTriggerExplicitTaskReconciliationResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Tell scheduler to trigger an implicit task reconciliation.
|
|
func (p *AuroraAdminClient) TriggerImplicitTaskReconciliation() (r *Response, err error) {
|
|
if err = p.sendTriggerImplicitTaskReconciliation(); err != nil {
|
|
return
|
|
}
|
|
return p.recvTriggerImplicitTaskReconciliation()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendTriggerImplicitTaskReconciliation() (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("triggerImplicitTaskReconciliation", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminTriggerImplicitTaskReconciliationArgs{}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvTriggerImplicitTaskReconciliation() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "triggerImplicitTaskReconciliation" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "triggerImplicitTaskReconciliation failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "triggerImplicitTaskReconciliation failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error348 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error349 error
|
|
error349, err = error348.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error349
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "triggerImplicitTaskReconciliation failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminTriggerImplicitTaskReconciliationResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
// Force prune any (terminal) tasks that match the query. If no statuses are supplied with the
|
|
// query, it will default to all terminal task states. If statuses are supplied, they must be
|
|
// terminal states.
|
|
//
|
|
// Parameters:
|
|
// - Query
|
|
func (p *AuroraAdminClient) PruneTasks(query *TaskQuery) (r *Response, err error) {
|
|
if err = p.sendPruneTasks(query); err != nil {
|
|
return
|
|
}
|
|
return p.recvPruneTasks()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendPruneTasks(query *TaskQuery) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("pruneTasks", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminPruneTasksArgs{
|
|
Query: query,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvPruneTasks() (value *Response, err error) {
|
|
iprot := p.InputProtocol
|
|
if iprot == nil {
|
|
iprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.InputProtocol = iprot
|
|
}
|
|
method, mTypeId, seqId, err := iprot.ReadMessageBegin()
|
|
if err != nil {
|
|
return
|
|
}
|
|
if method != "pruneTasks" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "pruneTasks failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "pruneTasks failed: out of sequence response")
|
|
return
|
|
}
|
|
if mTypeId == thrift.EXCEPTION {
|
|
error350 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error351 error
|
|
error351, err = error350.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error351
|
|
return
|
|
}
|
|
if mTypeId != thrift.REPLY {
|
|
err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "pruneTasks failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminPruneTasksResult{}
|
|
if err = result.Read(iprot); err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
value = result.GetSuccess()
|
|
return
|
|
}
|
|
|
|
type AuroraAdminProcessor struct {
|
|
*AuroraSchedulerManagerProcessor
|
|
}
|
|
|
|
func NewAuroraAdminProcessor(handler AuroraAdmin) *AuroraAdminProcessor {
|
|
self352 := &AuroraAdminProcessor{NewAuroraSchedulerManagerProcessor(handler)}
|
|
self352.AddToProcessorMap("setQuota", &auroraAdminProcessorSetQuota{handler: handler})
|
|
self352.AddToProcessorMap("forceTaskState", &auroraAdminProcessorForceTaskState{handler: handler})
|
|
self352.AddToProcessorMap("performBackup", &auroraAdminProcessorPerformBackup{handler: handler})
|
|
self352.AddToProcessorMap("listBackups", &auroraAdminProcessorListBackups{handler: handler})
|
|
self352.AddToProcessorMap("stageRecovery", &auroraAdminProcessorStageRecovery{handler: handler})
|
|
self352.AddToProcessorMap("queryRecovery", &auroraAdminProcessorQueryRecovery{handler: handler})
|
|
self352.AddToProcessorMap("deleteRecoveryTasks", &auroraAdminProcessorDeleteRecoveryTasks{handler: handler})
|
|
self352.AddToProcessorMap("commitRecovery", &auroraAdminProcessorCommitRecovery{handler: handler})
|
|
self352.AddToProcessorMap("unloadRecovery", &auroraAdminProcessorUnloadRecovery{handler: handler})
|
|
self352.AddToProcessorMap("startMaintenance", &auroraAdminProcessorStartMaintenance{handler: handler})
|
|
self352.AddToProcessorMap("drainHosts", &auroraAdminProcessorDrainHosts{handler: handler})
|
|
self352.AddToProcessorMap("maintenanceStatus", &auroraAdminProcessorMaintenanceStatus{handler: handler})
|
|
self352.AddToProcessorMap("endMaintenance", &auroraAdminProcessorEndMaintenance{handler: handler})
|
|
self352.AddToProcessorMap("slaDrainHosts", &auroraAdminProcessorSlaDrainHosts{handler: handler})
|
|
self352.AddToProcessorMap("snapshot", &auroraAdminProcessorSnapshot{handler: handler})
|
|
self352.AddToProcessorMap("triggerExplicitTaskReconciliation", &auroraAdminProcessorTriggerExplicitTaskReconciliation{handler: handler})
|
|
self352.AddToProcessorMap("triggerImplicitTaskReconciliation", &auroraAdminProcessorTriggerImplicitTaskReconciliation{handler: handler})
|
|
self352.AddToProcessorMap("pruneTasks", &auroraAdminProcessorPruneTasks{handler: handler})
|
|
return self352
|
|
}
|
|
|
|
type auroraAdminProcessorSetQuota struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorSetQuota) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminSetQuotaArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("setQuota", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminSetQuotaResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.SetQuota(args.OwnerRole, args.Quota); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setQuota: "+err2.Error())
|
|
oprot.WriteMessageBegin("setQuota", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("setQuota", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorForceTaskState struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorForceTaskState) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminForceTaskStateArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("forceTaskState", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminForceTaskStateResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.ForceTaskState(args.TaskId, args.Status); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing forceTaskState: "+err2.Error())
|
|
oprot.WriteMessageBegin("forceTaskState", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("forceTaskState", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorPerformBackup struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorPerformBackup) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminPerformBackupArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("performBackup", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminPerformBackupResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.PerformBackup(); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing performBackup: "+err2.Error())
|
|
oprot.WriteMessageBegin("performBackup", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("performBackup", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorListBackups struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorListBackups) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminListBackupsArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("listBackups", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminListBackupsResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.ListBackups(); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listBackups: "+err2.Error())
|
|
oprot.WriteMessageBegin("listBackups", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("listBackups", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorStageRecovery struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorStageRecovery) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminStageRecoveryArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("stageRecovery", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminStageRecoveryResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.StageRecovery(args.BackupId); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing stageRecovery: "+err2.Error())
|
|
oprot.WriteMessageBegin("stageRecovery", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("stageRecovery", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorQueryRecovery struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorQueryRecovery) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminQueryRecoveryArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("queryRecovery", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminQueryRecoveryResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.QueryRecovery(args.Query); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing queryRecovery: "+err2.Error())
|
|
oprot.WriteMessageBegin("queryRecovery", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("queryRecovery", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorDeleteRecoveryTasks struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorDeleteRecoveryTasks) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminDeleteRecoveryTasksArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("deleteRecoveryTasks", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminDeleteRecoveryTasksResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.DeleteRecoveryTasks(args.Query); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteRecoveryTasks: "+err2.Error())
|
|
oprot.WriteMessageBegin("deleteRecoveryTasks", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("deleteRecoveryTasks", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorCommitRecovery struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorCommitRecovery) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminCommitRecoveryArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("commitRecovery", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminCommitRecoveryResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.CommitRecovery(); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing commitRecovery: "+err2.Error())
|
|
oprot.WriteMessageBegin("commitRecovery", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("commitRecovery", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorUnloadRecovery struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorUnloadRecovery) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminUnloadRecoveryArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("unloadRecovery", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminUnloadRecoveryResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.UnloadRecovery(); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing unloadRecovery: "+err2.Error())
|
|
oprot.WriteMessageBegin("unloadRecovery", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("unloadRecovery", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorStartMaintenance struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorStartMaintenance) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminStartMaintenanceArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("startMaintenance", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminStartMaintenanceResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.StartMaintenance(args.Hosts); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing startMaintenance: "+err2.Error())
|
|
oprot.WriteMessageBegin("startMaintenance", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("startMaintenance", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorDrainHosts struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorDrainHosts) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminDrainHostsArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("drainHosts", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminDrainHostsResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.DrainHosts(args.Hosts); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing drainHosts: "+err2.Error())
|
|
oprot.WriteMessageBegin("drainHosts", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("drainHosts", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorMaintenanceStatus struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorMaintenanceStatus) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminMaintenanceStatusArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("maintenanceStatus", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminMaintenanceStatusResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.MaintenanceStatus(args.Hosts); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing maintenanceStatus: "+err2.Error())
|
|
oprot.WriteMessageBegin("maintenanceStatus", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("maintenanceStatus", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorEndMaintenance struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorEndMaintenance) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminEndMaintenanceArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("endMaintenance", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminEndMaintenanceResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.EndMaintenance(args.Hosts); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing endMaintenance: "+err2.Error())
|
|
oprot.WriteMessageBegin("endMaintenance", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("endMaintenance", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorSlaDrainHosts struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorSlaDrainHosts) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminSlaDrainHostsArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("slaDrainHosts", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminSlaDrainHostsResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.SlaDrainHosts(args.Hosts, args.DefaultSlaPolicy, args.TimeoutSecs); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing slaDrainHosts: "+err2.Error())
|
|
oprot.WriteMessageBegin("slaDrainHosts", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("slaDrainHosts", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorSnapshot struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorSnapshot) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminSnapshotArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("snapshot", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminSnapshotResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.Snapshot(); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing snapshot: "+err2.Error())
|
|
oprot.WriteMessageBegin("snapshot", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("snapshot", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorTriggerExplicitTaskReconciliation struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorTriggerExplicitTaskReconciliation) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminTriggerExplicitTaskReconciliationArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("triggerExplicitTaskReconciliation", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminTriggerExplicitTaskReconciliationResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.TriggerExplicitTaskReconciliation(args.Settings); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing triggerExplicitTaskReconciliation: "+err2.Error())
|
|
oprot.WriteMessageBegin("triggerExplicitTaskReconciliation", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("triggerExplicitTaskReconciliation", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorTriggerImplicitTaskReconciliation struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorTriggerImplicitTaskReconciliation) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminTriggerImplicitTaskReconciliationArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("triggerImplicitTaskReconciliation", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminTriggerImplicitTaskReconciliationResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.TriggerImplicitTaskReconciliation(); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing triggerImplicitTaskReconciliation: "+err2.Error())
|
|
oprot.WriteMessageBegin("triggerImplicitTaskReconciliation", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("triggerImplicitTaskReconciliation", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
type auroraAdminProcessorPruneTasks struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorPruneTasks) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminPruneTasksArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("pruneTasks", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminPruneTasksResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.PruneTasks(args.Query); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pruneTasks: "+err2.Error())
|
|
oprot.WriteMessageBegin("pruneTasks", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("pruneTasks", thrift.REPLY, seqId); err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err2 = oprot.Flush(); err == nil && err2 != nil {
|
|
err = err2
|
|
}
|
|
if err != nil {
|
|
return
|
|
}
|
|
return true, err
|
|
}
|
|
|
|
// HELPER FUNCTIONS AND STRUCTURES
|
|
|
|
// Attributes:
|
|
// - OwnerRole
|
|
// - Quota
|
|
type AuroraAdminSetQuotaArgs struct {
|
|
OwnerRole string `thrift:"ownerRole,1" json:"ownerRole"`
|
|
Quota *ResourceAggregate `thrift:"quota,2" json:"quota"`
|
|
}
|
|
|
|
func NewAuroraAdminSetQuotaArgs() *AuroraAdminSetQuotaArgs {
|
|
return &AuroraAdminSetQuotaArgs{}
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaArgs) GetOwnerRole() string {
|
|
return p.OwnerRole
|
|
}
|
|
|
|
var AuroraAdminSetQuotaArgs_Quota_DEFAULT *ResourceAggregate
|
|
|
|
func (p *AuroraAdminSetQuotaArgs) GetQuota() *ResourceAggregate {
|
|
if !p.IsSetQuota() {
|
|
return AuroraAdminSetQuotaArgs_Quota_DEFAULT
|
|
}
|
|
return p.Quota
|
|
}
|
|
func (p *AuroraAdminSetQuotaArgs) IsSetQuota() bool {
|
|
return p.Quota != nil
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
case 2:
|
|
if err := p.readField2(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaArgs) readField1(iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(); err != nil {
|
|
return thrift.PrependError("error reading field 1: ", err)
|
|
} else {
|
|
p.OwnerRole = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaArgs) readField2(iprot thrift.TProtocol) error {
|
|
p.Quota = &ResourceAggregate{}
|
|
if err := p.Quota.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Quota), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("setQuota_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := p.writeField2(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("ownerRole", thrift.STRING, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ownerRole: ", p), err)
|
|
}
|
|
if err := oprot.WriteString(string(p.OwnerRole)); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T.ownerRole (1) field write error: ", p), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ownerRole: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaArgs) writeField2(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("quota", thrift.STRUCT, 2); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:quota: ", p), err)
|
|
}
|
|
if err := p.Quota.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Quota), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 2:quota: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminSetQuotaArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminSetQuotaResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminSetQuotaResult() *AuroraAdminSetQuotaResult {
|
|
return &AuroraAdminSetQuotaResult{}
|
|
}
|
|
|
|
var AuroraAdminSetQuotaResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminSetQuotaResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminSetQuotaResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminSetQuotaResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("setQuota_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminSetQuotaResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminSetQuotaResult(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - TaskId
|
|
// - Status
|
|
type AuroraAdminForceTaskStateArgs struct {
|
|
TaskId string `thrift:"taskId,1" json:"taskId"`
|
|
Status ScheduleStatus `thrift:"status,2" json:"status"`
|
|
}
|
|
|
|
func NewAuroraAdminForceTaskStateArgs() *AuroraAdminForceTaskStateArgs {
|
|
return &AuroraAdminForceTaskStateArgs{}
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateArgs) GetTaskId() string {
|
|
return p.TaskId
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateArgs) GetStatus() ScheduleStatus {
|
|
return p.Status
|
|
}
|
|
func (p *AuroraAdminForceTaskStateArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
case 2:
|
|
if err := p.readField2(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateArgs) readField1(iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(); err != nil {
|
|
return thrift.PrependError("error reading field 1: ", err)
|
|
} else {
|
|
p.TaskId = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateArgs) readField2(iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI32(); err != nil {
|
|
return thrift.PrependError("error reading field 2: ", err)
|
|
} else {
|
|
temp := ScheduleStatus(v)
|
|
p.Status = temp
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("forceTaskState_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := p.writeField2(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("taskId", thrift.STRING, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:taskId: ", p), err)
|
|
}
|
|
if err := oprot.WriteString(string(p.TaskId)); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T.taskId (1) field write error: ", p), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:taskId: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateArgs) writeField2(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("status", thrift.I32, 2); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:status: ", p), err)
|
|
}
|
|
if err := oprot.WriteI32(int32(p.Status)); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T.status (2) field write error: ", p), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 2:status: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminForceTaskStateArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminForceTaskStateResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminForceTaskStateResult() *AuroraAdminForceTaskStateResult {
|
|
return &AuroraAdminForceTaskStateResult{}
|
|
}
|
|
|
|
var AuroraAdminForceTaskStateResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminForceTaskStateResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminForceTaskStateResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminForceTaskStateResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("forceTaskState_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminForceTaskStateResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminForceTaskStateResult(%+v)", *p)
|
|
}
|
|
|
|
type AuroraAdminPerformBackupArgs struct {
|
|
}
|
|
|
|
func NewAuroraAdminPerformBackupArgs() *AuroraAdminPerformBackupArgs {
|
|
return &AuroraAdminPerformBackupArgs{}
|
|
}
|
|
|
|
func (p *AuroraAdminPerformBackupArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminPerformBackupArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("performBackup_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminPerformBackupArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminPerformBackupArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminPerformBackupResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminPerformBackupResult() *AuroraAdminPerformBackupResult {
|
|
return &AuroraAdminPerformBackupResult{}
|
|
}
|
|
|
|
var AuroraAdminPerformBackupResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminPerformBackupResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminPerformBackupResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminPerformBackupResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminPerformBackupResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminPerformBackupResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminPerformBackupResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("performBackup_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminPerformBackupResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminPerformBackupResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminPerformBackupResult(%+v)", *p)
|
|
}
|
|
|
|
type AuroraAdminListBackupsArgs struct {
|
|
}
|
|
|
|
func NewAuroraAdminListBackupsArgs() *AuroraAdminListBackupsArgs {
|
|
return &AuroraAdminListBackupsArgs{}
|
|
}
|
|
|
|
func (p *AuroraAdminListBackupsArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminListBackupsArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("listBackups_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminListBackupsArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminListBackupsArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminListBackupsResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminListBackupsResult() *AuroraAdminListBackupsResult {
|
|
return &AuroraAdminListBackupsResult{}
|
|
}
|
|
|
|
var AuroraAdminListBackupsResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminListBackupsResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminListBackupsResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminListBackupsResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminListBackupsResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminListBackupsResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminListBackupsResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("listBackups_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminListBackupsResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminListBackupsResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminListBackupsResult(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - BackupId
|
|
type AuroraAdminStageRecoveryArgs struct {
|
|
BackupId string `thrift:"backupId,1" json:"backupId"`
|
|
}
|
|
|
|
func NewAuroraAdminStageRecoveryArgs() *AuroraAdminStageRecoveryArgs {
|
|
return &AuroraAdminStageRecoveryArgs{}
|
|
}
|
|
|
|
func (p *AuroraAdminStageRecoveryArgs) GetBackupId() string {
|
|
return p.BackupId
|
|
}
|
|
func (p *AuroraAdminStageRecoveryArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStageRecoveryArgs) readField1(iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadString(); err != nil {
|
|
return thrift.PrependError("error reading field 1: ", err)
|
|
} else {
|
|
p.BackupId = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStageRecoveryArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("stageRecovery_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStageRecoveryArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("backupId", thrift.STRING, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:backupId: ", p), err)
|
|
}
|
|
if err := oprot.WriteString(string(p.BackupId)); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T.backupId (1) field write error: ", p), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:backupId: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminStageRecoveryArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminStageRecoveryArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminStageRecoveryResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminStageRecoveryResult() *AuroraAdminStageRecoveryResult {
|
|
return &AuroraAdminStageRecoveryResult{}
|
|
}
|
|
|
|
var AuroraAdminStageRecoveryResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminStageRecoveryResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminStageRecoveryResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminStageRecoveryResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminStageRecoveryResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStageRecoveryResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStageRecoveryResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("stageRecovery_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStageRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminStageRecoveryResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminStageRecoveryResult(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Query
|
|
type AuroraAdminQueryRecoveryArgs struct {
|
|
Query *TaskQuery `thrift:"query,1" json:"query"`
|
|
}
|
|
|
|
func NewAuroraAdminQueryRecoveryArgs() *AuroraAdminQueryRecoveryArgs {
|
|
return &AuroraAdminQueryRecoveryArgs{}
|
|
}
|
|
|
|
var AuroraAdminQueryRecoveryArgs_Query_DEFAULT *TaskQuery
|
|
|
|
func (p *AuroraAdminQueryRecoveryArgs) GetQuery() *TaskQuery {
|
|
if !p.IsSetQuery() {
|
|
return AuroraAdminQueryRecoveryArgs_Query_DEFAULT
|
|
}
|
|
return p.Query
|
|
}
|
|
func (p *AuroraAdminQueryRecoveryArgs) IsSetQuery() bool {
|
|
return p.Query != nil
|
|
}
|
|
|
|
func (p *AuroraAdminQueryRecoveryArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminQueryRecoveryArgs) readField1(iprot thrift.TProtocol) error {
|
|
p.Query = &TaskQuery{}
|
|
if err := p.Query.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminQueryRecoveryArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("queryRecovery_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminQueryRecoveryArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("query", thrift.STRUCT, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:query: ", p), err)
|
|
}
|
|
if err := p.Query.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminQueryRecoveryArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminQueryRecoveryArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminQueryRecoveryResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminQueryRecoveryResult() *AuroraAdminQueryRecoveryResult {
|
|
return &AuroraAdminQueryRecoveryResult{}
|
|
}
|
|
|
|
var AuroraAdminQueryRecoveryResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminQueryRecoveryResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminQueryRecoveryResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminQueryRecoveryResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminQueryRecoveryResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminQueryRecoveryResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminQueryRecoveryResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("queryRecovery_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminQueryRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminQueryRecoveryResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminQueryRecoveryResult(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Query
|
|
type AuroraAdminDeleteRecoveryTasksArgs struct {
|
|
Query *TaskQuery `thrift:"query,1" json:"query"`
|
|
}
|
|
|
|
func NewAuroraAdminDeleteRecoveryTasksArgs() *AuroraAdminDeleteRecoveryTasksArgs {
|
|
return &AuroraAdminDeleteRecoveryTasksArgs{}
|
|
}
|
|
|
|
var AuroraAdminDeleteRecoveryTasksArgs_Query_DEFAULT *TaskQuery
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksArgs) GetQuery() *TaskQuery {
|
|
if !p.IsSetQuery() {
|
|
return AuroraAdminDeleteRecoveryTasksArgs_Query_DEFAULT
|
|
}
|
|
return p.Query
|
|
}
|
|
func (p *AuroraAdminDeleteRecoveryTasksArgs) IsSetQuery() bool {
|
|
return p.Query != nil
|
|
}
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksArgs) readField1(iprot thrift.TProtocol) error {
|
|
p.Query = &TaskQuery{}
|
|
if err := p.Query.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("deleteRecoveryTasks_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("query", thrift.STRUCT, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:query: ", p), err)
|
|
}
|
|
if err := p.Query.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminDeleteRecoveryTasksArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminDeleteRecoveryTasksResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminDeleteRecoveryTasksResult() *AuroraAdminDeleteRecoveryTasksResult {
|
|
return &AuroraAdminDeleteRecoveryTasksResult{}
|
|
}
|
|
|
|
var AuroraAdminDeleteRecoveryTasksResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminDeleteRecoveryTasksResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminDeleteRecoveryTasksResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("deleteRecoveryTasks_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminDeleteRecoveryTasksResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminDeleteRecoveryTasksResult(%+v)", *p)
|
|
}
|
|
|
|
type AuroraAdminCommitRecoveryArgs struct {
|
|
}
|
|
|
|
func NewAuroraAdminCommitRecoveryArgs() *AuroraAdminCommitRecoveryArgs {
|
|
return &AuroraAdminCommitRecoveryArgs{}
|
|
}
|
|
|
|
func (p *AuroraAdminCommitRecoveryArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminCommitRecoveryArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("commitRecovery_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminCommitRecoveryArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminCommitRecoveryArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminCommitRecoveryResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminCommitRecoveryResult() *AuroraAdminCommitRecoveryResult {
|
|
return &AuroraAdminCommitRecoveryResult{}
|
|
}
|
|
|
|
var AuroraAdminCommitRecoveryResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminCommitRecoveryResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminCommitRecoveryResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminCommitRecoveryResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminCommitRecoveryResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminCommitRecoveryResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminCommitRecoveryResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("commitRecovery_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminCommitRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminCommitRecoveryResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminCommitRecoveryResult(%+v)", *p)
|
|
}
|
|
|
|
type AuroraAdminUnloadRecoveryArgs struct {
|
|
}
|
|
|
|
func NewAuroraAdminUnloadRecoveryArgs() *AuroraAdminUnloadRecoveryArgs {
|
|
return &AuroraAdminUnloadRecoveryArgs{}
|
|
}
|
|
|
|
func (p *AuroraAdminUnloadRecoveryArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminUnloadRecoveryArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("unloadRecovery_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminUnloadRecoveryArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminUnloadRecoveryArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminUnloadRecoveryResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminUnloadRecoveryResult() *AuroraAdminUnloadRecoveryResult {
|
|
return &AuroraAdminUnloadRecoveryResult{}
|
|
}
|
|
|
|
var AuroraAdminUnloadRecoveryResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminUnloadRecoveryResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminUnloadRecoveryResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminUnloadRecoveryResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminUnloadRecoveryResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminUnloadRecoveryResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminUnloadRecoveryResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("unloadRecovery_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminUnloadRecoveryResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminUnloadRecoveryResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminUnloadRecoveryResult(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Hosts
|
|
type AuroraAdminStartMaintenanceArgs struct {
|
|
Hosts *Hosts `thrift:"hosts,1" json:"hosts"`
|
|
}
|
|
|
|
func NewAuroraAdminStartMaintenanceArgs() *AuroraAdminStartMaintenanceArgs {
|
|
return &AuroraAdminStartMaintenanceArgs{}
|
|
}
|
|
|
|
var AuroraAdminStartMaintenanceArgs_Hosts_DEFAULT *Hosts
|
|
|
|
func (p *AuroraAdminStartMaintenanceArgs) GetHosts() *Hosts {
|
|
if !p.IsSetHosts() {
|
|
return AuroraAdminStartMaintenanceArgs_Hosts_DEFAULT
|
|
}
|
|
return p.Hosts
|
|
}
|
|
func (p *AuroraAdminStartMaintenanceArgs) IsSetHosts() bool {
|
|
return p.Hosts != nil
|
|
}
|
|
|
|
func (p *AuroraAdminStartMaintenanceArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStartMaintenanceArgs) readField1(iprot thrift.TProtocol) error {
|
|
p.Hosts = &Hosts{}
|
|
if err := p.Hosts.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStartMaintenanceArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("startMaintenance_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStartMaintenanceArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("hosts", thrift.STRUCT, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hosts: ", p), err)
|
|
}
|
|
if err := p.Hosts.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminStartMaintenanceArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminStartMaintenanceArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminStartMaintenanceResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminStartMaintenanceResult() *AuroraAdminStartMaintenanceResult {
|
|
return &AuroraAdminStartMaintenanceResult{}
|
|
}
|
|
|
|
var AuroraAdminStartMaintenanceResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminStartMaintenanceResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminStartMaintenanceResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminStartMaintenanceResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminStartMaintenanceResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStartMaintenanceResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStartMaintenanceResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("startMaintenance_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminStartMaintenanceResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminStartMaintenanceResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminStartMaintenanceResult(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Hosts
|
|
type AuroraAdminDrainHostsArgs struct {
|
|
Hosts *Hosts `thrift:"hosts,1" json:"hosts"`
|
|
}
|
|
|
|
func NewAuroraAdminDrainHostsArgs() *AuroraAdminDrainHostsArgs {
|
|
return &AuroraAdminDrainHostsArgs{}
|
|
}
|
|
|
|
var AuroraAdminDrainHostsArgs_Hosts_DEFAULT *Hosts
|
|
|
|
func (p *AuroraAdminDrainHostsArgs) GetHosts() *Hosts {
|
|
if !p.IsSetHosts() {
|
|
return AuroraAdminDrainHostsArgs_Hosts_DEFAULT
|
|
}
|
|
return p.Hosts
|
|
}
|
|
func (p *AuroraAdminDrainHostsArgs) IsSetHosts() bool {
|
|
return p.Hosts != nil
|
|
}
|
|
|
|
func (p *AuroraAdminDrainHostsArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDrainHostsArgs) readField1(iprot thrift.TProtocol) error {
|
|
p.Hosts = &Hosts{}
|
|
if err := p.Hosts.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDrainHostsArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("drainHosts_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDrainHostsArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("hosts", thrift.STRUCT, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hosts: ", p), err)
|
|
}
|
|
if err := p.Hosts.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminDrainHostsArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminDrainHostsArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminDrainHostsResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminDrainHostsResult() *AuroraAdminDrainHostsResult {
|
|
return &AuroraAdminDrainHostsResult{}
|
|
}
|
|
|
|
var AuroraAdminDrainHostsResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminDrainHostsResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminDrainHostsResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminDrainHostsResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminDrainHostsResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDrainHostsResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDrainHostsResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("drainHosts_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminDrainHostsResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminDrainHostsResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminDrainHostsResult(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Hosts
|
|
type AuroraAdminMaintenanceStatusArgs struct {
|
|
Hosts *Hosts `thrift:"hosts,1" json:"hosts"`
|
|
}
|
|
|
|
func NewAuroraAdminMaintenanceStatusArgs() *AuroraAdminMaintenanceStatusArgs {
|
|
return &AuroraAdminMaintenanceStatusArgs{}
|
|
}
|
|
|
|
var AuroraAdminMaintenanceStatusArgs_Hosts_DEFAULT *Hosts
|
|
|
|
func (p *AuroraAdminMaintenanceStatusArgs) GetHosts() *Hosts {
|
|
if !p.IsSetHosts() {
|
|
return AuroraAdminMaintenanceStatusArgs_Hosts_DEFAULT
|
|
}
|
|
return p.Hosts
|
|
}
|
|
func (p *AuroraAdminMaintenanceStatusArgs) IsSetHosts() bool {
|
|
return p.Hosts != nil
|
|
}
|
|
|
|
func (p *AuroraAdminMaintenanceStatusArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminMaintenanceStatusArgs) readField1(iprot thrift.TProtocol) error {
|
|
p.Hosts = &Hosts{}
|
|
if err := p.Hosts.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminMaintenanceStatusArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("maintenanceStatus_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminMaintenanceStatusArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("hosts", thrift.STRUCT, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hosts: ", p), err)
|
|
}
|
|
if err := p.Hosts.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminMaintenanceStatusArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminMaintenanceStatusArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminMaintenanceStatusResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminMaintenanceStatusResult() *AuroraAdminMaintenanceStatusResult {
|
|
return &AuroraAdminMaintenanceStatusResult{}
|
|
}
|
|
|
|
var AuroraAdminMaintenanceStatusResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminMaintenanceStatusResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminMaintenanceStatusResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminMaintenanceStatusResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminMaintenanceStatusResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminMaintenanceStatusResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminMaintenanceStatusResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("maintenanceStatus_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminMaintenanceStatusResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminMaintenanceStatusResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminMaintenanceStatusResult(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Hosts
|
|
type AuroraAdminEndMaintenanceArgs struct {
|
|
Hosts *Hosts `thrift:"hosts,1" json:"hosts"`
|
|
}
|
|
|
|
func NewAuroraAdminEndMaintenanceArgs() *AuroraAdminEndMaintenanceArgs {
|
|
return &AuroraAdminEndMaintenanceArgs{}
|
|
}
|
|
|
|
var AuroraAdminEndMaintenanceArgs_Hosts_DEFAULT *Hosts
|
|
|
|
func (p *AuroraAdminEndMaintenanceArgs) GetHosts() *Hosts {
|
|
if !p.IsSetHosts() {
|
|
return AuroraAdminEndMaintenanceArgs_Hosts_DEFAULT
|
|
}
|
|
return p.Hosts
|
|
}
|
|
func (p *AuroraAdminEndMaintenanceArgs) IsSetHosts() bool {
|
|
return p.Hosts != nil
|
|
}
|
|
|
|
func (p *AuroraAdminEndMaintenanceArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminEndMaintenanceArgs) readField1(iprot thrift.TProtocol) error {
|
|
p.Hosts = &Hosts{}
|
|
if err := p.Hosts.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminEndMaintenanceArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("endMaintenance_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminEndMaintenanceArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("hosts", thrift.STRUCT, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hosts: ", p), err)
|
|
}
|
|
if err := p.Hosts.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminEndMaintenanceArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminEndMaintenanceArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminEndMaintenanceResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminEndMaintenanceResult() *AuroraAdminEndMaintenanceResult {
|
|
return &AuroraAdminEndMaintenanceResult{}
|
|
}
|
|
|
|
var AuroraAdminEndMaintenanceResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminEndMaintenanceResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminEndMaintenanceResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminEndMaintenanceResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminEndMaintenanceResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminEndMaintenanceResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminEndMaintenanceResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("endMaintenance_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminEndMaintenanceResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminEndMaintenanceResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminEndMaintenanceResult(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Hosts
|
|
// - DefaultSlaPolicy
|
|
// - TimeoutSecs
|
|
type AuroraAdminSlaDrainHostsArgs struct {
|
|
Hosts *Hosts `thrift:"hosts,1" json:"hosts"`
|
|
DefaultSlaPolicy *SlaPolicy `thrift:"defaultSlaPolicy,2" json:"defaultSlaPolicy"`
|
|
TimeoutSecs int64 `thrift:"timeoutSecs,3" json:"timeoutSecs"`
|
|
}
|
|
|
|
func NewAuroraAdminSlaDrainHostsArgs() *AuroraAdminSlaDrainHostsArgs {
|
|
return &AuroraAdminSlaDrainHostsArgs{}
|
|
}
|
|
|
|
var AuroraAdminSlaDrainHostsArgs_Hosts_DEFAULT *Hosts
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) GetHosts() *Hosts {
|
|
if !p.IsSetHosts() {
|
|
return AuroraAdminSlaDrainHostsArgs_Hosts_DEFAULT
|
|
}
|
|
return p.Hosts
|
|
}
|
|
|
|
var AuroraAdminSlaDrainHostsArgs_DefaultSlaPolicy_DEFAULT *SlaPolicy
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) GetDefaultSlaPolicy() *SlaPolicy {
|
|
if !p.IsSetDefaultSlaPolicy() {
|
|
return AuroraAdminSlaDrainHostsArgs_DefaultSlaPolicy_DEFAULT
|
|
}
|
|
return p.DefaultSlaPolicy
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) GetTimeoutSecs() int64 {
|
|
return p.TimeoutSecs
|
|
}
|
|
func (p *AuroraAdminSlaDrainHostsArgs) IsSetHosts() bool {
|
|
return p.Hosts != nil
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) IsSetDefaultSlaPolicy() bool {
|
|
return p.DefaultSlaPolicy != nil
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
case 2:
|
|
if err := p.readField2(iprot); err != nil {
|
|
return err
|
|
}
|
|
case 3:
|
|
if err := p.readField3(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) readField1(iprot thrift.TProtocol) error {
|
|
p.Hosts = &Hosts{}
|
|
if err := p.Hosts.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Hosts), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) readField2(iprot thrift.TProtocol) error {
|
|
p.DefaultSlaPolicy = &SlaPolicy{}
|
|
if err := p.DefaultSlaPolicy.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DefaultSlaPolicy), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) readField3(iprot thrift.TProtocol) error {
|
|
if v, err := iprot.ReadI64(); err != nil {
|
|
return thrift.PrependError("error reading field 3: ", err)
|
|
} else {
|
|
p.TimeoutSecs = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("slaDrainHosts_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := p.writeField2(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := p.writeField3(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("hosts", thrift.STRUCT, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hosts: ", p), err)
|
|
}
|
|
if err := p.Hosts.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Hosts), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hosts: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) writeField2(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("defaultSlaPolicy", thrift.STRUCT, 2); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:defaultSlaPolicy: ", p), err)
|
|
}
|
|
if err := p.DefaultSlaPolicy.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DefaultSlaPolicy), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 2:defaultSlaPolicy: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) writeField3(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("timeoutSecs", thrift.I64, 3); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timeoutSecs: ", p), err)
|
|
}
|
|
if err := oprot.WriteI64(int64(p.TimeoutSecs)); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T.timeoutSecs (3) field write error: ", p), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timeoutSecs: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminSlaDrainHostsArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminSlaDrainHostsResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminSlaDrainHostsResult() *AuroraAdminSlaDrainHostsResult {
|
|
return &AuroraAdminSlaDrainHostsResult{}
|
|
}
|
|
|
|
var AuroraAdminSlaDrainHostsResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminSlaDrainHostsResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminSlaDrainHostsResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminSlaDrainHostsResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("slaDrainHosts_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminSlaDrainHostsResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminSlaDrainHostsResult(%+v)", *p)
|
|
}
|
|
|
|
type AuroraAdminSnapshotArgs struct {
|
|
}
|
|
|
|
func NewAuroraAdminSnapshotArgs() *AuroraAdminSnapshotArgs {
|
|
return &AuroraAdminSnapshotArgs{}
|
|
}
|
|
|
|
func (p *AuroraAdminSnapshotArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSnapshotArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("snapshot_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSnapshotArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminSnapshotArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminSnapshotResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminSnapshotResult() *AuroraAdminSnapshotResult {
|
|
return &AuroraAdminSnapshotResult{}
|
|
}
|
|
|
|
var AuroraAdminSnapshotResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminSnapshotResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminSnapshotResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminSnapshotResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminSnapshotResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSnapshotResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSnapshotResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("snapshot_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminSnapshotResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminSnapshotResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminSnapshotResult(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Settings
|
|
type AuroraAdminTriggerExplicitTaskReconciliationArgs struct {
|
|
Settings *ExplicitReconciliationSettings `thrift:"settings,1" json:"settings"`
|
|
}
|
|
|
|
func NewAuroraAdminTriggerExplicitTaskReconciliationArgs() *AuroraAdminTriggerExplicitTaskReconciliationArgs {
|
|
return &AuroraAdminTriggerExplicitTaskReconciliationArgs{}
|
|
}
|
|
|
|
var AuroraAdminTriggerExplicitTaskReconciliationArgs_Settings_DEFAULT *ExplicitReconciliationSettings
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) GetSettings() *ExplicitReconciliationSettings {
|
|
if !p.IsSetSettings() {
|
|
return AuroraAdminTriggerExplicitTaskReconciliationArgs_Settings_DEFAULT
|
|
}
|
|
return p.Settings
|
|
}
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) IsSetSettings() bool {
|
|
return p.Settings != nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) readField1(iprot thrift.TProtocol) error {
|
|
p.Settings = &ExplicitReconciliationSettings{}
|
|
if err := p.Settings.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Settings), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("triggerExplicitTaskReconciliation_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("settings", thrift.STRUCT, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:settings: ", p), err)
|
|
}
|
|
if err := p.Settings.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Settings), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:settings: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminTriggerExplicitTaskReconciliationArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminTriggerExplicitTaskReconciliationResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminTriggerExplicitTaskReconciliationResult() *AuroraAdminTriggerExplicitTaskReconciliationResult {
|
|
return &AuroraAdminTriggerExplicitTaskReconciliationResult{}
|
|
}
|
|
|
|
var AuroraAdminTriggerExplicitTaskReconciliationResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminTriggerExplicitTaskReconciliationResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("triggerExplicitTaskReconciliation_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerExplicitTaskReconciliationResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminTriggerExplicitTaskReconciliationResult(%+v)", *p)
|
|
}
|
|
|
|
type AuroraAdminTriggerImplicitTaskReconciliationArgs struct {
|
|
}
|
|
|
|
func NewAuroraAdminTriggerImplicitTaskReconciliationArgs() *AuroraAdminTriggerImplicitTaskReconciliationArgs {
|
|
return &AuroraAdminTriggerImplicitTaskReconciliationArgs{}
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerImplicitTaskReconciliationArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerImplicitTaskReconciliationArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("triggerImplicitTaskReconciliation_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerImplicitTaskReconciliationArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminTriggerImplicitTaskReconciliationArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminTriggerImplicitTaskReconciliationResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminTriggerImplicitTaskReconciliationResult() *AuroraAdminTriggerImplicitTaskReconciliationResult {
|
|
return &AuroraAdminTriggerImplicitTaskReconciliationResult{}
|
|
}
|
|
|
|
var AuroraAdminTriggerImplicitTaskReconciliationResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminTriggerImplicitTaskReconciliationResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("triggerImplicitTaskReconciliation_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminTriggerImplicitTaskReconciliationResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminTriggerImplicitTaskReconciliationResult(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Query
|
|
type AuroraAdminPruneTasksArgs struct {
|
|
Query *TaskQuery `thrift:"query,1" json:"query"`
|
|
}
|
|
|
|
func NewAuroraAdminPruneTasksArgs() *AuroraAdminPruneTasksArgs {
|
|
return &AuroraAdminPruneTasksArgs{}
|
|
}
|
|
|
|
var AuroraAdminPruneTasksArgs_Query_DEFAULT *TaskQuery
|
|
|
|
func (p *AuroraAdminPruneTasksArgs) GetQuery() *TaskQuery {
|
|
if !p.IsSetQuery() {
|
|
return AuroraAdminPruneTasksArgs_Query_DEFAULT
|
|
}
|
|
return p.Query
|
|
}
|
|
func (p *AuroraAdminPruneTasksArgs) IsSetQuery() bool {
|
|
return p.Query != nil
|
|
}
|
|
|
|
func (p *AuroraAdminPruneTasksArgs) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 1:
|
|
if err := p.readField1(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminPruneTasksArgs) readField1(iprot thrift.TProtocol) error {
|
|
p.Query = &TaskQuery{}
|
|
if err := p.Query.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Query), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminPruneTasksArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("pruneTasks_args"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField1(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminPruneTasksArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("query", thrift.STRUCT, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:query: ", p), err)
|
|
}
|
|
if err := p.Query.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Query), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:query: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminPruneTasksArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminPruneTasksArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminPruneTasksResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminPruneTasksResult() *AuroraAdminPruneTasksResult {
|
|
return &AuroraAdminPruneTasksResult{}
|
|
}
|
|
|
|
var AuroraAdminPruneTasksResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminPruneTasksResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminPruneTasksResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminPruneTasksResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminPruneTasksResult) Read(iprot thrift.TProtocol) error {
|
|
if _, err := iprot.ReadStructBegin(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
|
|
}
|
|
|
|
for {
|
|
_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
|
|
if err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
|
|
}
|
|
if fieldTypeId == thrift.STOP {
|
|
break
|
|
}
|
|
switch fieldId {
|
|
case 0:
|
|
if err := p.readField0(iprot); err != nil {
|
|
return err
|
|
}
|
|
default:
|
|
if err := iprot.Skip(fieldTypeId); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadFieldEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
if err := iprot.ReadStructEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminPruneTasksResult) readField0(iprot thrift.TProtocol) error {
|
|
p.Success = &Response{}
|
|
if err := p.Success.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminPruneTasksResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("pruneTasks_result"); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
|
}
|
|
if err := p.writeField0(oprot); err != nil {
|
|
return err
|
|
}
|
|
if err := oprot.WriteFieldStop(); err != nil {
|
|
return thrift.PrependError("write field stop error: ", err)
|
|
}
|
|
if err := oprot.WriteStructEnd(); err != nil {
|
|
return thrift.PrependError("write struct stop error: ", err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminPruneTasksResult) writeField0(oprot thrift.TProtocol) (err error) {
|
|
if p.IsSetSuccess() {
|
|
if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
|
|
}
|
|
if err := p.Success.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
|
|
}
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminPruneTasksResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminPruneTasksResult(%+v)", *p)
|
|
}
|