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



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

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)


577
578
579
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 577

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)


583
584
585
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 583

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



589
590
591
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 589

def error
  @error
end

#export_contextGoogle::Apis::SqladminV1beta3::ExportContext

Database instance export context. Corresponds to the JSON property exportContext



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

def export_context
  @export_context
end

#import_contextGoogle::Apis::SqladminV1beta3::ImportContext

Database instance import context. Corresponds to the JSON property importContext



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

def import_context
  @import_context
end

#instanceString

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

Returns:

  • (String)


604
605
606
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 604

def instance
  @instance
end

#kindString

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

Returns:

  • (String)


609
610
611
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 609

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)


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

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)


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

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)


628
629
630
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 628

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)


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

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)


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

def user_email_address
  @user_email_address
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



645
646
647
648
649
650
651
652
653
654
655
656
657
658
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 645

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