Class: Google::Apis::SqladminV1beta3::InstanceOperation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/sqladmin_v1beta3/classes.rb,
generated/google/apis/sqladmin_v1beta3/representations.rb,
generated/google/apis/sqladmin_v1beta3/representations.rb

Overview

An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ InstanceOperation

Returns a new instance of InstanceOperation



657
658
659
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 657

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#end_timeDateTime

The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. Corresponds to the JSON property endTime

Returns:

  • (DateTime)


594
595
596
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 594

def end_time
  @end_time
end

#enqueued_timeDateTime

The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. Corresponds to the JSON property enqueuedTime

Returns:

  • (DateTime)


600
601
602
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 600

def enqueued_time
  @enqueued_time
end

#errorArray<Google::Apis::SqladminV1beta3::OperationError>

The error(s) encountered by this operation. Only set if the operation results in an error. Corresponds to the JSON property error



606
607
608
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 606

def error
  @error
end

#export_contextGoogle::Apis::SqladminV1beta3::ExportContext

Database instance export context. Corresponds to the JSON property exportContext



611
612
613
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 611

def export_context
  @export_context
end

#import_contextGoogle::Apis::SqladminV1beta3::ImportContext

Database instance import context. Corresponds to the JSON property importContext



616
617
618
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 616

def import_context
  @import_context
end

#instanceString

Name of the database instance. Corresponds to the JSON property instance

Returns:

  • (String)


621
622
623
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 621

def instance
  @instance
end

#kindString

This is always sql#instanceOperation. Corresponds to the JSON property kind

Returns:

  • (String)


626
627
628
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 626

def kind
  @kind
end

#operationString

An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. Corresponds to the JSON property operation

Returns:

  • (String)


633
634
635
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 633

def operation
  @operation
end

#operation_typeString

The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME. Corresponds to the JSON property operationType

Returns:

  • (String)


639
640
641
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 639

def operation_type
  @operation_type
end

#start_timeDateTime

The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. Corresponds to the JSON property startTime

Returns:

  • (DateTime)


645
646
647
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 645

def start_time
  @start_time
end

#stateString

The state of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN. Corresponds to the JSON property state

Returns:

  • (String)


650
651
652
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 650

def state
  @state
end

#user_email_addressString

The email address of the user who initiated this operation. Corresponds to the JSON property userEmailAddress

Returns:

  • (String)


655
656
657
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 655

def user_email_address
  @user_email_address
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



662
663
664
665
666
667
668
669
670
671
672
673
674
675
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 662

def update!(**args)
  @end_time = args[:end_time] if args.key?(:end_time)
  @enqueued_time = args[:enqueued_time] if args.key?(:enqueued_time)
  @error = args[:error] if args.key?(:error)
  @export_context = args[:export_context] if args.key?(:export_context)
  @import_context = args[:import_context] if args.key?(:import_context)
  @instance = args[:instance] if args.key?(:instance)
  @kind = args[:kind] if args.key?(:kind)
  @operation = args[:operation] if args.key?(:operation)
  @operation_type = args[:operation_type] if args.key?(:operation_type)
  @start_time = args[:start_time] if args.key?(:start_time)
  @state = args[:state] if args.key?(:state)
  @user_email_address = args[:user_email_address] if args.key?(:user_email_address)
end