function Record(props, opts) {
  utils.classCallCheck(this, Record);
  Settable.call(this);
  props || (props = {});
  opts || (opts = {});
  var _set = this._set;
  var mapper = this.constructor.mapper;

  _set(creatingPath, true);

  _set(noValidatePath, !!opts.noValidate);

  _set(keepChangeHistoryPath, opts.keepChangeHistory === undefined ? mapper ? mapper.keepChangeHistory : true : opts.keepChangeHistory); // Set the idAttribute value first, if it exists.


  var id = mapper ? utils.get(props, mapper.idAttribute) : undefined;

  if (id !== undefined) {
    utils.set(this, mapper.idAttribute, id);
  }

  utils.fillIn(this, props);

  _set(creatingPath, false);

  if (opts.validateOnSet !== undefined) {
    _set(noValidatePath, !opts.validateOnSet);
  } else if (mapper && mapper.validateOnSet !== undefined) {
    _set(noValidatePath, !mapper.validateOnSet);
  } else {
    _set(noValidatePath, false);
  }

  _set(previousPath, mapper ? mapper.toJSON(props) : utils.plainCopy(props));
}
js-data's Record class. An instance of `Record` corresponds to an in-memory
representation of a single row or document in a database, Firebase,
localstorage, etc. Basically, a `Record` instance represents whatever kind of
entity in your persistence layer that has a primary key.

```javascript
import {Record} from 'js-data'
```

@example <caption>Record#constructor</caption>
const JSData = require('js-data');
const { Record } = JSData;
console.log('Using JSData v' + JSData.version.full);

// Instantiate a plain record
let record = new Record();
console.log('record: ' + JSON.stringify(record));

// You can supply properties on instantiation
record = new Record({ name: 'John' });
console.log('record: ' + JSON.stringify(record));

@example <caption>Record#constructor2</caption>
const JSData = require('js-data');
const { Mapper } = JSData;
console.log('Using JSData v' + JSData.version.full);

// Instantiate a record that's associated with a Mapper:
const UserMapper = new Mapper({ name: 'user' });
const User = UserMapper.recordClass;
const user = UserMapper.createRecord({ name: 'John' });
const user2 = new User({ name: 'Sally' });
console.log('user: ' + JSON.stringify(user));
console.log('user2: ' + JSON.stringify(user2));

@example <caption>Record#constructor3</caption>
const JSData = require('js-data');
const { Container } = JSData;
console.log('Using JSData v' + JSData.version.full);

const store = new Container();
store.defineMapper('user');

// Instantiate a record that's associated with a store's Mapper
const user = store.createRecord('user', { name: 'John' });
console.log('user: ' + JSON.stringify(user));

@example <caption>Record#constructor4</caption>
const JSData = require('js-data');
const { Container } = JSData;
console.log('Using JSData v' + JSData.version.full);

const store = new Container();
store.defineMapper('user', {
  schema: {
    properties: {
      name: { type: 'string' }
    }
  }
});

// Validate on instantiation
const user = store.createRecord('user', { name: 1234 });
console.log('user: ' + JSON.stringify(user));

@example <caption>Record#constructor5</caption>
const JSData = require('js-data');
const { Container } = JSData;
console.log('Using JSData v' + JSData.version.full);

const store = new Container();
store.defineMapper('user', {
  schema: {
    properties: {
      name: { type: 'string' }
    }
  }
});

// Skip validation on instantiation
const user = store.createRecord('user', { name: 1234 }, { noValidate: true });
console.log('user: ' + JSON.stringify(user));
console.log('user.isValid(): ' + user.isValid());

@class Record
@extends Component
@param {object} [props] The initial properties of the new Record instance.
@param {object} [opts] Configuration options.
@param {boolean} [opts.noValidate=false] Whether to skip validation on the
initial properties.
@param {boolean} [opts.validateOnSet=true] Whether to enable setter
validation on properties after the Record has been initialized.
@since 3.0.0