public function map(ValueObject $value): RoleCreateData
    {
        if (!$value instanceof RoleCreateStruct) {
            throw new InvalidArgumentException('value', 'must be an instance of ' . RoleCreateStruct::class);
        }

        $data = new RoleCreateData();

        $data->setIdentifier($value->identifier);

        return $data;
    }
public function map(ValueObject $value): RoleCreateData
    {
        if (!$value instanceof RoleCreateStruct) {
            throw new InvalidArgumentException('value', 'must be an instance of ' . RoleCreateStruct::class);
        }

        $data = new RoleCreateData();

        $data->setIdentifier($value->identifier);

        return $data;
    }
public function map ( ValueObject $ value ) : RoleCreateData { if ( ! $ value instanceof RoleCreateStruct ) { throw new InvalidArgumentException ( 'value' , 'must be an instance of ' . RoleCreateStruct :: class ) ; } $ data = new RoleCreateData ( ) ; $ data -> setIdentifier ( $ value -> identifier ) ; return $ data ; }
Maps given RoleCreateStruct object to a RoleCreateData object.

@param ValueObject|RoleCreateStruct $value

@return RoleCreateData

@throws InvalidArgumentException
Maps given RoleCreateStruct object to a RoleCreateData object .