// SetBlockSplitter implements the Config interface for ConfigLocal.
189347
func (c *ConfigLocal) SetBlockSplitter(b data.BlockSplitter) {
	c.lock.Lock()
	defer c.lock.Unlock()
	c.bsplit = b
}
915902
func (s *InputSettings) SetDeblockFilter(v string) *InputSettings {
	s.DeblockFilter = &v
	return s
}
1157675
func (c *ConfigLocal) BlockCryptVersion() kbfscrypto.EncryptionVer {
	c.lock.RLock()
	defer c.lock.RUnlock()
	return c.blockCryptVersion
}
368672
func (s *InputTemplate) SetDeblockFilter(v string) *InputTemplate {
	s.DeblockFilter = &v
	return s
}
469075
func (db *SQLDB) SetBlock(eventTables types.EventTables, eventData types.EventData) error {
	db.Log.Info("msg", "Synchronize Block..........")

	//Declarations
	var logStmt *sql.Stmt
	var tx *sql.Tx
	var safeTable string
	var query string
	var queryVal types.UpsertDeleteQuery
	var err error
	var errQuery error
	var txHash interface{}
	var jsonData []byte
	var sqlValues []byte

	// Begin tx
	if tx, err = db.DB.Begin(); err != nil {
		db.Log.Info("msg", "Error beginning transaction", "err", err)
		return err
	}
	defer tx.Rollback()

	// Prepare log statement
	logQuery := db.DBAdapter.InsertLogQuery()
	if logStmt, err = tx.Prepare(logQuery); err != nil {
		db.Log.Info("msg", "Error preparing log stmt", "err", err)
		return err
	}

loop:
	// for each table in the block
	for en, table := range eventTables {
		safeTable = safe(table.Name)
		dataRows := eventData.Tables[table.Name]
		// for Each Row
		for _, row := range dataRows {

			switch row.Action {
			case types.ActionUpsert:
				//Prepare Upsert
				if queryVal, txHash, errQuery = db.DBAdapter.UpsertQuery(table, row); errQuery != nil {
					db.Log.Info("msg", "Error building upsert query", "err", errQuery, "value", fmt.Sprintf("%v %v", table, row))
					break loop // exits from all loops -> continue in close log stmt
				}

			case types.ActionDelete:
				//Prepare Delete
				txHash = nil
				if queryVal, errQuery = db.DBAdapter.DeleteQuery(table, row); errQuery != nil {
					db.Log.Info("msg", "Error building delete query", "err", errQuery, "value", fmt.Sprintf("%v %v", table, row))
					break loop // exits from all loops -> continue in close log stmt
				}
			default:
				//Invalid Action
				db.Log.Info("msg", "invalid action", "value", row.Action)
				err = fmt.Errorf("invalid row action %s", row.Action)
				break loop // exits from all loops -> continue in close log stmt
			}

			query = queryVal.Query

			// Perform row action
			db.Log.Info("msg", row.Action, "query", query, "value", queryVal.Values)
			if _, err = tx.Exec(query, queryVal.Pointers...); err != nil {
				db.Log.Info("msg", fmt.Sprintf("error performing %s on row", row.Action), "err", err, "value", queryVal.Values)
				break loop // exits from all loops -> continue in close log stmt
			}

			// Marshal the rowData map
			if jsonData, err = db.getJSON(row.RowData); err != nil {
				db.Log.Info("msg", "error marshaling rowData", "err", err, "value", fmt.Sprintf("%v", row.RowData))
				break loop // exits from all loops -> continue in close log stmt
			}

			// Marshal sql values
			if sqlValues, err = db.getJSONFromValues(queryVal.Pointers); err != nil {
				db.Log.Info("msg", "error marshaling rowdata", "err", err, "value", fmt.Sprintf("%v", row.RowData))
				break loop // exits from all loops -> continue in close log stmt
			}

			eventName, _ := row.RowData[types.SQLColumnLabelEventName].(string)
			// Insert in log
			db.Log.Info("msg", "INSERT LOG", "query", logQuery, "value",
				fmt.Sprintf("tableName = %s eventName = %s block = %d", safeTable, en, eventData.BlockHeight))

			if _, err = logStmt.Exec(safeTable, eventName, row.EventClass.GetFilter(), eventData.BlockHeight, txHash,
				row.Action, jsonData, query, sqlValues); err != nil {
				db.Log.Info("msg", "Error inserting into log", "err", err)
				break loop // exits from all loops -> continue in close log stmt
			}
		}
	}

	// Close log statement
	if err == nil {
		if err = logStmt.Close(); err != nil {
			db.Log.Info("msg", "Error closing log stmt", "err", err)
		}
	}

	// Error handling
	if err != nil {
		// Rollback error
		if errRb := tx.Rollback(); errRb != nil {
			db.Log.Info("msg", "Error on rollback", "err", errRb)
			return errRb
		}

		//Is a SQL error
		if db.DBAdapter.ErrorEquals(err, types.SQLErrorTypeGeneric) {

			// Table does not exists
			if db.DBAdapter.ErrorEquals(err, types.SQLErrorTypeUndefinedTable) {
				db.Log.Warn("msg", "Table not found", "value", safeTable)
				//Synchronize DB
				if err = db.SynchronizeDB(eventTables); err != nil {
					return err
				}
				//Retry
				return db.SetBlock(eventTables, eventData)
			}

			// Columns do not match
			if db.DBAdapter.ErrorEquals(err, types.SQLErrorTypeUndefinedColumn) {
				db.Log.Warn("msg", "Column not found", "value", safeTable)
				//Synchronize DB
				if err = db.SynchronizeDB(eventTables); err != nil {
					return err
				}
				//Retry
				return db.SetBlock(eventTables, eventData)
			}
			return err
		}
		return err
	}

	db.Log.Info("msg", "COMMIT")

	if err := tx.Commit(); err != nil {
		db.Log.Info("msg", "Error on commit", "err", err)
		return err
	}

	return nil
}
575175
func (s *PutObjectLockConfigurationInput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *PutObjectLockConfigurationInput {
	s.ObjectLockConfiguration = v
	return s
}
599462
func (s *GetLoadBalancerOutput) SetLoadBalancer(v *LoadBalancer) *GetLoadBalancerOutput {
	s.LoadBalancer = v
	return s
}
430657
func (s *Eac3Settings) SetLfeFilter(v string) *Eac3Settings {
	s.LfeFilter = &v
	return s
}
1256970
func (s *PortProbeAction) SetBlocked(v bool) *PortProbeAction {
	s.Blocked = &v
	return s
}
495903
func (hc *halfConn) splitBlock(b *block, n int) (*block, *block) {
	if len(b.data) <= n {
		return b, nil
	}
	bb := hc.newBlock()
	bb.resize(len(b.data) - n)
	copy(bb.data, b.data[n:])
	b.data = b.data[0:n]
	return b, bb
}
567188
func (s *UpdateFileSystemInput) SetLustreConfiguration(v *UpdateFileSystemLustreConfiguration) *UpdateFileSystemInput {
	s.LustreConfiguration = v
	return s
}
1332902
func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput {
	s.PublicAccessBlockConfiguration = v
	return s
}
987409
func (s *StageDeclaration) SetBlockers(v []*BlockerDeclaration) *StageDeclaration {
	s.Blockers = v
	return s
}
175994
func (s *SpotProvisioningSpecification) SetBlockDurationMinutes(v int64) *SpotProvisioningSpecification {
	s.BlockDurationMinutes = &v
	return s
}
207228
func (b *Box) SetBorder(show bool) *Box {
	b.border = show
	return b
}
73360
func (o *Cluster) SetSecurityConfiguration(v *string) *Cluster {
	if o.SecurityConfiguration = v; o.SecurityConfiguration == nil {
		o.nullFields = append(o.nullFields, "SecurityConfiguration")
	}
	return o
}
1259535
func (s *RemoveFromGlobalClusterOutput) SetGlobalCluster(v *GlobalCluster) *RemoveFromGlobalClusterOutput {
	s.GlobalCluster = v
	return s
}