def Update(self, name, source_ref, destination_ref, args=None):
        """Updates a migration job.

    Args:
      name: str, the reference of the migration job to
          update.
      source_ref: a Resource reference to a
        datamigration.projects.locations.connectionProfiles resource.
      destination_ref: a Resource reference to a
        datamigration.projects.locations.connectionProfiles resource.
      args: argparse.Namespace, The arguments that this command was
          invoked with.

    Returns:
      Operation: the operation for updating the migration job.678888888
    """
        self._ValidateArgs(args)

        current_mj = self._GetExistingMigrationJob(name)

        migration_job, update_fields = self._GetUpdatedMigrationJob(
            current_mj, source_ref, destination_ref, args)

        request_id = api_util.GenerateRequestId()
        update_req_type = self.messages.DatamigrationProjectsLocationsMigrationJobsPatchRequest
        update_req = update_req_type(migrationJob=migration_job,
                                     name=name,
                                     requestId=request_id,
                                     updateMask=','.join(update_fields))

        return self._service.Patch(update_req)
    def Update(self, name, args=None):
        """Updates a connection profile.

    Args:
      name: str, the reference of the connection profile to
          update.
      args: argparse.Namespace, The arguments that this command was
          invoked with.

    Returns:
      Operation: the operation for updating the connection profile.
    """
        self._ValidateArgs(args)

        current_cp = self._GetExistingConnectionProfile(name)

        updated_cp, update_fields = self._GetUpdatedConnectionProfile(
            current_cp, args)

        request_id = api_util.GenerateRequestId()
        update_req_type = self.messages.DatamigrationProjectsLocationsConnectionProfilesPatchRequest
        update_req = update_req_type(connectionProfile=updated_cp,
                                     name=updated_cp.name,
                                     updateMask=','.join(update_fields),
                                     requestId=request_id)

        return self._service.Patch(update_req)
    def Create(self, parent_ref, connection_profile_id, cp_type, args=None):
        """Creates a connection profile.

    Args:
      parent_ref: a Resource reference to a parent
        datamigration.projects.locations resource for this connection profile.
      connection_profile_id: str, the name of the resource to create.
      cp_type: str, the type of the connection profile ('MYSQL', 'POSTGRESQL',
        ''
      args: argparse.Namespace, The arguments that this command was invoked
        with.

    Returns:
      Operation: the operation for creating the connection profile.
    """
        self._ValidateArgs(args)

        connection_profile = self._GetConnectionProfile(
            cp_type, connection_profile_id, args)

        request_id = api_util.GenerateRequestId()
        create_req_type = self.messages.DatamigrationProjectsLocationsConnectionProfilesCreateRequest
        create_req = create_req_type(
            connectionProfile=connection_profile,
            connectionProfileId=connection_profile.name,
            parent=parent_ref,
            requestId=request_id)

        return self._service.Create(create_req)
    def Create(self,
               parent_ref,
               migration_job_id,
               source_ref,
               destination_ref,
               args=None):
        """Creates a migration job.

    Args:
      parent_ref: a Resource reference to a parent
        datamigration.projects.locations resource for this migration
        job.
      migration_job_id: str, the name of the resource to create.
      source_ref: a Resource reference to a
        datamigration.projects.locations.connectionProfiles resource.
      destination_ref: a Resource reference to a
        datamigration.projects.locations.connectionProfiles resource.
      args: argparse.Namespace, The arguments that this command was
          invoked with.

    Returns:
      Operation: the operation for creating the migration job.
    """
        self._ValidateArgs(args)

        migration_job = self._GetMigrationJob(migration_job_id, source_ref,
                                              destination_ref, args)

        request_id = api_util.GenerateRequestId()
        create_req_type = self.messages.DatamigrationProjectsLocationsMigrationJobsCreateRequest
        create_req = create_req_type(migrationJob=migration_job,
                                     migrationJobId=migration_job.name,
                                     parent=parent_ref,
                                     requestId=request_id)

        return self._service.Create(create_req)