Class: Google::Apis::SqladminV1beta4::Operation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/sqladmin_v1beta4/classes.rb,
generated/google/apis/sqladmin_v1beta4/representations.rb,
generated/google/apis/sqladmin_v1beta4/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) ⇒ Operation

Returns a new instance of Operation



1549
1550
1551
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1549

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)


1471
1472
1473
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1471

def end_time
  @end_time
end

#errorGoogle::Apis::SqladminV1beta4::OperationErrors

Database instance operation errors list wrapper. Corresponds to the JSON property error



1476
1477
1478
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1476

def error
  @error
end

#export_contextGoogle::Apis::SqladminV1beta4::ExportContext

Database instance export context. Corresponds to the JSON property exportContext



1481
1482
1483
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1481

def export_context
  @export_context
end

#import_contextGoogle::Apis::SqladminV1beta4::ImportContext

Database instance import context. Corresponds to the JSON property importContext



1486
1487
1488
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1486

def import_context
  @import_context
end

#insert_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 insertTime

Returns:

  • (DateTime)


1492
1493
1494
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1492

def insert_time
  @insert_time
end

#kindString

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

Returns:

  • (String)


1497
1498
1499
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1497

def kind
  @kind
end

#nameString

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 name

Returns:

  • (String)


1504
1505
1506
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1504

def name
  @name
end

#operation_typeString

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

Returns:

  • (String)


1511
1512
1513
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1511

def operation_type
  @operation_type
end

The URI of this resource. Corresponds to the JSON property selfLink

Returns:

  • (String)


1516
1517
1518
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1516

def self_link
  @self_link
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)


1522
1523
1524
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1522

def start_time
  @start_time
end

#statusString

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

Returns:

  • (String)


1527
1528
1529
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1527

def status
  @status
end

#target_idString

Name of the database instance related to this operation. Corresponds to the JSON property targetId

Returns:

  • (String)


1532
1533
1534
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1532

def target_id
  @target_id
end

Corresponds to the JSON property targetLink

Returns:

  • (String)


1537
1538
1539
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1537

def target_link
  @target_link
end

#target_projectString

The project ID of the target instance related to this operation. Corresponds to the JSON property targetProject

Returns:

  • (String)


1542
1543
1544
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1542

def target_project
  @target_project
end

#userString

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

Returns:

  • (String)


1547
1548
1549
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1547

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
# File 'generated/google/apis/sqladmin_v1beta4/classes.rb', line 1554

def update!(**args)
  @end_time = args[:end_time] if args.key?(:end_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)
  @insert_time = args[:insert_time] if args.key?(:insert_time)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @operation_type = args[:operation_type] if args.key?(:operation_type)
  @self_link = args[:self_link] if args.key?(:self_link)
  @start_time = args[:start_time] if args.key?(:start_time)
  @status = args[:status] if args.key?(:status)
  @target_id = args[:target_id] if args.key?(:target_id)
  @target_link = args[:target_link] if args.key?(:target_link)
  @target_project = args[:target_project] if args.key?(:target_project)
  @user = args[:user] if args.key?(:user)
end