Class: Google::Apis::DatamigrationV1::DatabaseEntity

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

Overview

The base entity type for all the database related entities. The message contains the entity name, the name of its parent, the entity type, and the specific details per entity type.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DatabaseEntity

Returns a new instance of DatabaseEntity.



1503
1504
1505
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1503

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

Instance Attribute Details

#databaseGoogle::Apis::DatamigrationV1::DatabaseInstanceEntity

DatabaseInstance acts as a parent entity to other database entities. Corresponds to the JSON property database



1407
1408
1409
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1407

def database
  @database
end

#database_functionGoogle::Apis::DatamigrationV1::FunctionEntity

Function's parent is a schema. Corresponds to the JSON property databaseFunction



1412
1413
1414
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1412

def database_function
  @database_function
end

#database_packageGoogle::Apis::DatamigrationV1::PackageEntity

Package's parent is a schema. Corresponds to the JSON property databasePackage



1417
1418
1419
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1417

def database_package
  @database_package
end

#entity_ddlArray<Google::Apis::DatamigrationV1::EntityDdl>

Details about the entity DDL script. Multiple DDL scripts are provided for child entities such as a table entity will have one DDL for the table with additional DDLs for each index, constraint and such. Corresponds to the JSON property entityDdl



1424
1425
1426
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1424

def entity_ddl
  @entity_ddl
end

#entity_typeString

The type of the database entity (table, view, index, ...). Corresponds to the JSON property entityType

Returns:

  • (String)


1429
1430
1431
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1429

def entity_type
  @entity_type
end

#issuesArray<Google::Apis::DatamigrationV1::EntityIssue>

Details about the various issues found for the entity. Corresponds to the JSON property issues



1434
1435
1436
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1434

def issues
  @issues
end

#mappingsArray<Google::Apis::DatamigrationV1::EntityMapping>

Details about entity mappings. For source tree entities, this holds the draft entities which were generated by the mapping rules. For draft tree entities, this holds the source entities which were converted to form the draft entity. Destination entities will have no mapping details. Corresponds to the JSON property mappings



1442
1443
1444
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1442

def mappings
  @mappings
end

#materialized_viewGoogle::Apis::DatamigrationV1::MaterializedViewEntity

MaterializedView's parent is a schema. Corresponds to the JSON property materializedView



1447
1448
1449
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1447

def materialized_view
  @materialized_view
end

#parent_entityString

The full name of the parent entity (e.g. schema name). Corresponds to the JSON property parentEntity

Returns:

  • (String)


1452
1453
1454
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1452

def parent_entity
  @parent_entity
end

#schemaGoogle::Apis::DatamigrationV1::SchemaEntity

Schema typically has no parent entity, but can have a parent entity DatabaseInstance (for database engines which support it). For some database engines, the terms schema and user can be used interchangeably when they refer to a namespace or a collection of other database entities. Can store additional information which is schema specific. Corresponds to the JSON property schema



1461
1462
1463
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1461

def schema
  @schema
end

#sequenceGoogle::Apis::DatamigrationV1::SequenceEntity

Sequence's parent is a schema. Corresponds to the JSON property sequence



1466
1467
1468
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1466

def sequence
  @sequence
end

#short_nameString

The short name (e.g. table name) of the entity. Corresponds to the JSON property shortName

Returns:

  • (String)


1471
1472
1473
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1471

def short_name
  @short_name
end

#stored_procedureGoogle::Apis::DatamigrationV1::StoredProcedureEntity

Stored procedure's parent is a schema. Corresponds to the JSON property storedProcedure



1476
1477
1478
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1476

def stored_procedure
  @stored_procedure
end

#synonymGoogle::Apis::DatamigrationV1::SynonymEntity

Synonym's parent is a schema. Corresponds to the JSON property synonym



1481
1482
1483
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1481

def synonym
  @synonym
end

#tableGoogle::Apis::DatamigrationV1::TableEntity

Table's parent is a schema. Corresponds to the JSON property table



1486
1487
1488
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1486

def table
  @table
end

#treeString

The type of tree the entity belongs to. Corresponds to the JSON property tree

Returns:

  • (String)


1491
1492
1493
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1491

def tree
  @tree
end

#udtGoogle::Apis::DatamigrationV1::UdtEntity

UDT's parent is a schema. Corresponds to the JSON property udt



1496
1497
1498
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1496

def udt
  @udt
end

#viewGoogle::Apis::DatamigrationV1::ViewEntity

View's parent is a schema. Corresponds to the JSON property view



1501
1502
1503
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1501

def view
  @view
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
# File 'lib/google/apis/datamigration_v1/classes.rb', line 1508

def update!(**args)
  @database = args[:database] if args.key?(:database)
  @database_function = args[:database_function] if args.key?(:database_function)
  @database_package = args[:database_package] if args.key?(:database_package)
  @entity_ddl = args[:entity_ddl] if args.key?(:entity_ddl)
  @entity_type = args[:entity_type] if args.key?(:entity_type)
  @issues = args[:issues] if args.key?(:issues)
  @mappings = args[:mappings] if args.key?(:mappings)
  @materialized_view = args[:materialized_view] if args.key?(:materialized_view)
  @parent_entity = args[:parent_entity] if args.key?(:parent_entity)
  @schema = args[:schema] if args.key?(:schema)
  @sequence = args[:sequence] if args.key?(:sequence)
  @short_name = args[:short_name] if args.key?(:short_name)
  @stored_procedure = args[:stored_procedure] if args.key?(:stored_procedure)
  @synonym = args[:synonym] if args.key?(:synonym)
  @table = args[:table] if args.key?(:table)
  @tree = args[:tree] if args.key?(:tree)
  @udt = args[:udt] if args.key?(:udt)
  @view = args[:view] if args.key?(:view)
end