4841 lines
137 KiB
Go
4841 lines
137 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)
|
|
// Start a storage snapshot and block until it completes.
|
|
Snapshot() (r *Response, err error)
|
|
// Forcibly rewrites the stored definition of user configurations. This is intended to be used
|
|
// in a controlled setting, primarily to migrate pieces of configurations that are opaque to the
|
|
// scheduler (e.g. executorConfig).
|
|
// The scheduler may do some validation of the rewritten configurations, but it is important
|
|
// that the caller take care to provide valid input and alter only necessary fields.
|
|
//
|
|
// Parameters:
|
|
// - Request
|
|
RewriteConfigs(request *RewriteConfigsRequest) (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 {
|
|
error304 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error305 error
|
|
error305, err = error304.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error305
|
|
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 {
|
|
error306 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error307 error
|
|
error307, err = error306.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error307
|
|
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 {
|
|
error308 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error309 error
|
|
error309, err = error308.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error309
|
|
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 {
|
|
error310 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error311 error
|
|
error311, err = error310.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error311
|
|
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 {
|
|
error312 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error313 error
|
|
error313, err = error312.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error313
|
|
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 {
|
|
error314 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
|
|
var error315 error
|
|
error315, err = error314.Read(iprot)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if err = iprot.ReadMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
err = error315
|
|
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 {
|
|
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, "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 {
|
|
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, "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 {
|
|
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, "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 {
|
|
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, "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 {
|
|
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, "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 {
|
|
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, "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 {
|
|
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, "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
|
|
}
|
|
|
|
// 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 {
|
|
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, "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
|
|
}
|
|
|
|
// Forcibly rewrites the stored definition of user configurations. This is intended to be used
|
|
// in a controlled setting, primarily to migrate pieces of configurations that are opaque to the
|
|
// scheduler (e.g. executorConfig).
|
|
// The scheduler may do some validation of the rewritten configurations, but it is important
|
|
// that the caller take care to provide valid input and alter only necessary fields.
|
|
//
|
|
// Parameters:
|
|
// - Request
|
|
func (p *AuroraAdminClient) RewriteConfigs(request *RewriteConfigsRequest) (r *Response, err error) {
|
|
if err = p.sendRewriteConfigs(request); err != nil {
|
|
return
|
|
}
|
|
return p.recvRewriteConfigs()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) sendRewriteConfigs(request *RewriteConfigsRequest) (err error) {
|
|
oprot := p.OutputProtocol
|
|
if oprot == nil {
|
|
oprot = p.ProtocolFactory.GetProtocol(p.Transport)
|
|
p.OutputProtocol = oprot
|
|
}
|
|
p.SeqId++
|
|
if err = oprot.WriteMessageBegin("rewriteConfigs", thrift.CALL, p.SeqId); err != nil {
|
|
return
|
|
}
|
|
args := AuroraAdminRewriteConfigsArgs{
|
|
Request: request,
|
|
}
|
|
if err = args.Write(oprot); err != nil {
|
|
return
|
|
}
|
|
if err = oprot.WriteMessageEnd(); err != nil {
|
|
return
|
|
}
|
|
return oprot.Flush()
|
|
}
|
|
|
|
func (p *AuroraAdminClient) recvRewriteConfigs() (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 != "rewriteConfigs" {
|
|
err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "rewriteConfigs failed: wrong method name")
|
|
return
|
|
}
|
|
if p.SeqId != seqId {
|
|
err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "rewriteConfigs 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, "rewriteConfigs failed: invalid message type")
|
|
return
|
|
}
|
|
result := AuroraAdminRewriteConfigsResult{}
|
|
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 {
|
|
self334 := &AuroraAdminProcessor{NewAuroraSchedulerManagerProcessor(handler)}
|
|
self334.AddToProcessorMap("setQuota", &auroraAdminProcessorSetQuota{handler: handler})
|
|
self334.AddToProcessorMap("forceTaskState", &auroraAdminProcessorForceTaskState{handler: handler})
|
|
self334.AddToProcessorMap("performBackup", &auroraAdminProcessorPerformBackup{handler: handler})
|
|
self334.AddToProcessorMap("listBackups", &auroraAdminProcessorListBackups{handler: handler})
|
|
self334.AddToProcessorMap("stageRecovery", &auroraAdminProcessorStageRecovery{handler: handler})
|
|
self334.AddToProcessorMap("queryRecovery", &auroraAdminProcessorQueryRecovery{handler: handler})
|
|
self334.AddToProcessorMap("deleteRecoveryTasks", &auroraAdminProcessorDeleteRecoveryTasks{handler: handler})
|
|
self334.AddToProcessorMap("commitRecovery", &auroraAdminProcessorCommitRecovery{handler: handler})
|
|
self334.AddToProcessorMap("unloadRecovery", &auroraAdminProcessorUnloadRecovery{handler: handler})
|
|
self334.AddToProcessorMap("startMaintenance", &auroraAdminProcessorStartMaintenance{handler: handler})
|
|
self334.AddToProcessorMap("drainHosts", &auroraAdminProcessorDrainHosts{handler: handler})
|
|
self334.AddToProcessorMap("maintenanceStatus", &auroraAdminProcessorMaintenanceStatus{handler: handler})
|
|
self334.AddToProcessorMap("endMaintenance", &auroraAdminProcessorEndMaintenance{handler: handler})
|
|
self334.AddToProcessorMap("snapshot", &auroraAdminProcessorSnapshot{handler: handler})
|
|
self334.AddToProcessorMap("rewriteConfigs", &auroraAdminProcessorRewriteConfigs{handler: handler})
|
|
return self334
|
|
}
|
|
|
|
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 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 auroraAdminProcessorRewriteConfigs struct {
|
|
handler AuroraAdmin
|
|
}
|
|
|
|
func (p *auroraAdminProcessorRewriteConfigs) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
|
args := AuroraAdminRewriteConfigsArgs{}
|
|
if err = args.Read(iprot); err != nil {
|
|
iprot.ReadMessageEnd()
|
|
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
|
oprot.WriteMessageBegin("rewriteConfigs", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return false, err
|
|
}
|
|
|
|
iprot.ReadMessageEnd()
|
|
result := AuroraAdminRewriteConfigsResult{}
|
|
var retval *Response
|
|
var err2 error
|
|
if retval, err2 = p.handler.RewriteConfigs(args.Request); err2 != nil {
|
|
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing rewriteConfigs: "+err2.Error())
|
|
oprot.WriteMessageBegin("rewriteConfigs", thrift.EXCEPTION, seqId)
|
|
x.Write(oprot)
|
|
oprot.WriteMessageEnd()
|
|
oprot.Flush()
|
|
return true, err2
|
|
} else {
|
|
result.Success = retval
|
|
}
|
|
if err2 = oprot.WriteMessageBegin("rewriteConfigs", 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)
|
|
}
|
|
|
|
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:
|
|
// - Request
|
|
type AuroraAdminRewriteConfigsArgs struct {
|
|
Request *RewriteConfigsRequest `thrift:"request,1" json:"request"`
|
|
}
|
|
|
|
func NewAuroraAdminRewriteConfigsArgs() *AuroraAdminRewriteConfigsArgs {
|
|
return &AuroraAdminRewriteConfigsArgs{}
|
|
}
|
|
|
|
var AuroraAdminRewriteConfigsArgs_Request_DEFAULT *RewriteConfigsRequest
|
|
|
|
func (p *AuroraAdminRewriteConfigsArgs) GetRequest() *RewriteConfigsRequest {
|
|
if !p.IsSetRequest() {
|
|
return AuroraAdminRewriteConfigsArgs_Request_DEFAULT
|
|
}
|
|
return p.Request
|
|
}
|
|
func (p *AuroraAdminRewriteConfigsArgs) IsSetRequest() bool {
|
|
return p.Request != nil
|
|
}
|
|
|
|
func (p *AuroraAdminRewriteConfigsArgs) 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 *AuroraAdminRewriteConfigsArgs) readField1(iprot thrift.TProtocol) error {
|
|
p.Request = &RewriteConfigsRequest{}
|
|
if err := p.Request.Read(iprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Request), err)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (p *AuroraAdminRewriteConfigsArgs) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("rewriteConfigs_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 *AuroraAdminRewriteConfigsArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
|
if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:request: ", p), err)
|
|
}
|
|
if err := p.Request.Write(oprot); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Request), err)
|
|
}
|
|
if err := oprot.WriteFieldEnd(); err != nil {
|
|
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:request: ", p), err)
|
|
}
|
|
return err
|
|
}
|
|
|
|
func (p *AuroraAdminRewriteConfigsArgs) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminRewriteConfigsArgs(%+v)", *p)
|
|
}
|
|
|
|
// Attributes:
|
|
// - Success
|
|
type AuroraAdminRewriteConfigsResult struct {
|
|
Success *Response `thrift:"success,0" json:"success,omitempty"`
|
|
}
|
|
|
|
func NewAuroraAdminRewriteConfigsResult() *AuroraAdminRewriteConfigsResult {
|
|
return &AuroraAdminRewriteConfigsResult{}
|
|
}
|
|
|
|
var AuroraAdminRewriteConfigsResult_Success_DEFAULT *Response
|
|
|
|
func (p *AuroraAdminRewriteConfigsResult) GetSuccess() *Response {
|
|
if !p.IsSetSuccess() {
|
|
return AuroraAdminRewriteConfigsResult_Success_DEFAULT
|
|
}
|
|
return p.Success
|
|
}
|
|
func (p *AuroraAdminRewriteConfigsResult) IsSetSuccess() bool {
|
|
return p.Success != nil
|
|
}
|
|
|
|
func (p *AuroraAdminRewriteConfigsResult) 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 *AuroraAdminRewriteConfigsResult) 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 *AuroraAdminRewriteConfigsResult) Write(oprot thrift.TProtocol) error {
|
|
if err := oprot.WriteStructBegin("rewriteConfigs_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 *AuroraAdminRewriteConfigsResult) 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 *AuroraAdminRewriteConfigsResult) String() string {
|
|
if p == nil {
|
|
return "<nil>"
|
|
}
|
|
return fmt.Sprintf("AuroraAdminRewriteConfigsResult(%+v)", *p)
|
|
}
|